|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.phidgets.Phidget
com.phidgets.TextLCDPhidget
This class represents a Phidget Text LCD. All methods to control the Text LCD are implemented in this class.
The TextLCD Phidget consists of a Vacuum Fluorescent display that is capable of displaying Standard as well as custom characters in multiple rows.
Field Summary | |
static int |
PHIDGET_TEXTLCD_SCREEN_1x16
1 row, 16 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_1x40
1 row, 40 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_1x8
1 row, 8 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_2x16
2 row, 16 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_2x20
2 row, 20 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_2x24
2 row, 24 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_2x40
2 row, 40 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_2x8
2 row, 8 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_4x16
4 row, 16 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_4x20
4 row, 20 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_4x40
4 row, 40 column screen. |
static int |
PHIDGET_TEXTLCD_SCREEN_NONE
No screens attached. |
static int |
PHIDGET_TEXTLCD_SCREEN_UNKNOWN
Unknown screen size. |
Constructor Summary | |
TextLCDPhidget()
|
Method Summary | |
boolean |
getBacklight()
Returns the status of the backlight. |
int |
getBrightness()
Returns the brightness of the display. |
int |
getColumnCount()
Returns the number of columns (characters per row) available on the display. |
int |
getContrast()
Returns the contrast of the display. |
boolean |
getCursor()
Returns the status of the cursor. |
boolean |
getCursorBlink()
Returns the status of the cursor blink. |
int |
getRowCount()
Returns the number of rows available on the display. |
int |
getScreen()
Returns the active screen. |
int |
getScreenCount()
Returns the number of screens supported by the TextLCD. |
int |
getScreenSize()
Returns the screen size for the active TextLCD display. |
void |
initialize()
Initializes the active TextLCD Display. |
void |
setBacklight(boolean backlight)
Sets the status of the backlight. |
void |
setBrightness(int brightness)
Sets the brightness of the display. |
void |
setContrast(int contrast)
Sets the contrast of the display. |
void |
setCursor(boolean cursor)
Sets the state of the cursor. |
void |
setCursorBlink(boolean cursorblink)
Sets the state of the cursor blink. |
void |
setCustomCharacter(int index,
int param1,
int param2)
Sets a custom character. |
void |
setDisplayCharacter(int row,
int column,
char character)
Sets the character to display at a certain row and column. |
void |
setDisplayString(int index,
java.lang.String text)
Sets the display string of a certain row. |
void |
setScreen(int screen)
Sets the active screen. |
void |
setScreenSize(int screenSize)
Sets the screen size for the active TextLCD display. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PHIDGET_TEXTLCD_SCREEN_NONE
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_1x8
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_2x8
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_1x16
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_2x16
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_4x16
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_2x20
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_4x20
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_2x24
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_1x40
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_2x40
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_4x40
getScreenSize
and setScreenSize
public static final int PHIDGET_TEXTLCD_SCREEN_UNKNOWN
getScreenSize
and setScreenSize
Constructor Detail |
public TextLCDPhidget() throws PhidgetException
Method Detail |
public int getRowCount() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public int getColumnCount() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public int getScreenCount() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public int getScreen() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached, or screen is not supported.
See open
for information on determining if a device is attached.public void setScreen(int screen) throws PhidgetException
screen
- Screen
PhidgetException
- If this Phidget is not opened and attached, the screen number is out of range, or screen is not supported.
See open
for information on determining if a device is attached.public int getScreenSize() throws PhidgetException
PHIDGET_TEXTLCD_SCREEN_NONE
.
Not all TextLCDs support this method.
The possible values for screen size are PHIDGET_TEXTLCD_SCREEN_NONE
,
PHIDGET_TEXTLCD_SCREEN_1x8
, PHIDGET_TEXTLCD_SCREEN_2x8
,
PHIDGET_TEXTLCD_SCREEN_1x16
, PHIDGET_TEXTLCD_SCREEN_2x16
,
PHIDGET_TEXTLCD_SCREEN_4x16
, PHIDGET_TEXTLCD_SCREEN_2x20
,
PHIDGET_TEXTLCD_SCREEN_4x20
, PHIDGET_TEXTLCD_SCREEN_2x24
,
PHIDGET_TEXTLCD_SCREEN_1x40
, PHIDGET_TEXTLCD_SCREEN_2x40
,
PHIDGET_TEXTLCD_SCREEN_4x40
, PHIDGET_TEXTLCD_SCREEN_UNKNOWN
By default, all screens are set to PHIDGET_TEXTLCD_SCREEN_NONE
PhidgetException
- If this Phidget is not opened and attached, or screen size is not supported.
See open
for information on determining if a device is attached.public void setScreenSize(int screenSize) throws PhidgetException
screenSize
- Screen size
The possible values for screen size are PHIDGET_TEXTLCD_SCREEN_NONE
,
PHIDGET_TEXTLCD_SCREEN_1x8
, PHIDGET_TEXTLCD_SCREEN_2x8
,
PHIDGET_TEXTLCD_SCREEN_1x16
, PHIDGET_TEXTLCD_SCREEN_2x16
,
PHIDGET_TEXTLCD_SCREEN_4x16
, PHIDGET_TEXTLCD_SCREEN_2x20
,
PHIDGET_TEXTLCD_SCREEN_4x20
, PHIDGET_TEXTLCD_SCREEN_2x24
,
PHIDGET_TEXTLCD_SCREEN_1x40
, PHIDGET_TEXTLCD_SCREEN_2x40
,
PHIDGET_TEXTLCD_SCREEN_4x40
, PHIDGET_TEXTLCD_SCREEN_UNKNOWN
By default, all screens are set to PHIDGET_TEXTLCD_SCREEN_NONE
PhidgetException
- If this Phidget is not opened and attached, the screen number is out of range, or screen size is not supported.
See open
for information on determining if a device is attached.public int getContrast() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public void setContrast(int contrast) throws PhidgetException
contrast
- New contrast to set
PhidgetException
- If this Phidget is not opened and attached, or the contrast value is out of range.
See open
for information on determining if a device is attached.public int getBrightness() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached, or brightness is not supported.public void setBrightness(int brightness) throws PhidgetException
brightness
- New brightness to set
PhidgetException
- If this Phidget is not opened and attached, or the brightness value is out of range, or brightness is not supported.
See open
for information on determining if a device is attached.public boolean getBacklight() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public void setBacklight(boolean backlight) throws PhidgetException
backlight
- New backlight state
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public boolean getCursor() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public void setCursor(boolean cursor) throws PhidgetException
cursor
- New cursor state
PhidgetException
- If this Phidget is not opened and attached, or if the cursor has not been set
See open
for information on determining if a device is attached.public boolean getCursorBlink() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public void setCursorBlink(boolean cursorblink) throws PhidgetException
cursorblink
- New cursor blink state
PhidgetException
- If this Phidget is not opened and attached, or if the cursor has not been set.
See open
for information on determining if a device is attached.public void setDisplayString(int index, java.lang.String text) throws PhidgetException
index
- rowtext
- String
PhidgetException
- If this Phidget is not opened and attached, if the string is too long, or if the row is invalid.
See open
for information on determining if a device is attached.public void setDisplayCharacter(int row, int column, char character) throws PhidgetException
row
- rowcolumn
- columncharacter
- character
PhidgetException
- If this Phidget is not opened and attached, or if the row or column is invalid.
See open
for information on determining if a device is attached.public void setCustomCharacter(int index, int param1, int param2) throws PhidgetException
index
- position ( 8-15 )param1
- first half of the character codeparam2
- second half of the character code
PhidgetException
- If this Phidget is not opened and attached, or if the index is invalid.
See open
for information on determining if a device is attached.public void initialize() throws PhidgetException
PhidgetException
- If this Phidget is not opened and attached, or initialize is not supported.
See open
for information on determining if a device is attached.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |