Public Member Functions | |
native boolean | getBacklight () throws PhidgetException |
native int | getBrightness () throws PhidgetException |
native int | getColumnCount () throws PhidgetException |
native int | getContrast () throws PhidgetException |
native boolean | getCursor () throws PhidgetException |
native boolean | getCursorBlink () throws PhidgetException |
native int | getRowCount () throws PhidgetException |
native int | getScreen () throws PhidgetException |
native int | getScreenCount () throws PhidgetException |
native int | getScreenSize () throws PhidgetException |
native void | initialize () throws PhidgetException |
native void | setBacklight (boolean backlight) throws PhidgetException |
native void | setBrightness (int brightness) throws PhidgetException |
native void | setContrast (int contrast) throws PhidgetException |
native void | setCursor (boolean cursor) throws PhidgetException |
native void | setCursorBlink (boolean cursorblink) throws PhidgetException |
native void | setCustomCharacter (int index, int param1, int param2) throws PhidgetException |
native void | setDisplayCharacter (int row, int column, char character) throws PhidgetException |
native void | setDisplayString (int index, String text) throws PhidgetException |
native void | setScreen (int screen) throws PhidgetException |
native void | setScreenSize (int screenSize) throws PhidgetException |
TextLCDPhidget () throws PhidgetException | |
Static Public Attributes | |
static final int | PHIDGET_TEXTLCD_SCREEN_1x16 = 4 |
static final int | PHIDGET_TEXTLCD_SCREEN_1x40 = 10 |
static final int | PHIDGET_TEXTLCD_SCREEN_1x8 = 2 |
static final int | PHIDGET_TEXTLCD_SCREEN_2x16 = 5 |
static final int | PHIDGET_TEXTLCD_SCREEN_2x20 = 7 |
static final int | PHIDGET_TEXTLCD_SCREEN_2x24 = 9 |
static final int | PHIDGET_TEXTLCD_SCREEN_2x40 = 11 |
static final int | PHIDGET_TEXTLCD_SCREEN_2x8 = 3 |
static final int | PHIDGET_TEXTLCD_SCREEN_4x16 = 6 |
static final int | PHIDGET_TEXTLCD_SCREEN_4x20 = 8 |
static final int | PHIDGET_TEXTLCD_SCREEN_4x40 = 12 |
static final int | PHIDGET_TEXTLCD_SCREEN_NONE = 1 |
static final int | PHIDGET_TEXTLCD_SCREEN_UNKNOWN = 13 |
Private Member Functions | |
final void | enableDeviceSpecificEvents (boolean b) |
Static Private Member Functions | |
static native long | create () throws PhidgetException |
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.
Definition at line 19 of file TextLCDPhidget.java.
com.phidgets.TextLCDPhidget.TextLCDPhidget | ( | ) | throws PhidgetException [inline] |
Definition at line 21 of file TextLCDPhidget.java.
static native long com.phidgets.TextLCDPhidget.create | ( | ) | throws PhidgetException [static, private] |
final void com.phidgets.TextLCDPhidget.enableDeviceSpecificEvents | ( | boolean | b | ) | [inline, private] |
Reimplemented from com.phidgets.Phidget.
Definition at line 275 of file TextLCDPhidget.java.
native boolean com.phidgets.TextLCDPhidget.getBacklight | ( | ) | throws PhidgetException |
Returns the status of the backlight. True indicated that the backlight is on, False indicated that it is off. The backlight is by default turned on.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.TextLCDPhidget.getBrightness | ( | ) | throws PhidgetException |
Returns the brightness of the display. This is the brightness of the backlight. Not all TextLCDs support this method.
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. |
native int com.phidgets.TextLCDPhidget.getColumnCount | ( | ) | throws PhidgetException |
Returns the number of columns (characters per row) available on the display. This value is the same for every row.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.TextLCDPhidget.getContrast | ( | ) | throws PhidgetException |
Returns the contrast of the display. This is the contrast of the entire display.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native boolean com.phidgets.TextLCDPhidget.getCursor | ( | ) | throws PhidgetException |
Returns the status of the cursor. True turns the cursor is on, False turns it off. The cursor is an underscore which appears directly to the right of the last entered character on the display. The cursor is by default disabled.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native boolean com.phidgets.TextLCDPhidget.getCursorBlink | ( | ) | throws PhidgetException |
Returns the status of the cursor blink. True turns the cursor blink on, False turns it off. The cursor blink is an flashing box which appears directly to the right of the last entered character on the display, in the same spot as the cursor if it is enabled. The cursor blink is by default disabled.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.TextLCDPhidget.getRowCount | ( | ) | throws PhidgetException |
Returns the number of rows available on the display.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.TextLCDPhidget.getScreen | ( | ) | throws PhidgetException |
Returns the active screen. Not all TextLCDs support this method.
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. |
native int com.phidgets.TextLCDPhidget.getScreenCount | ( | ) | throws PhidgetException |
Returns the number of screens supported by the TextLCD. Not all TextLCDs support this method.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.TextLCDPhidget.getScreenSize | ( | ) | throws PhidgetException |
Returns the screen size for the active TextLCD display. The TextLCD Adapter supports a pre-defined set of screen sizes to choose from. By default, all screens are set to 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. |
native void com.phidgets.TextLCDPhidget.initialize | ( | ) | throws PhidgetException |
Initializes the active TextLCD Display. This runs an initialization routine which sets up and clears the display. This can be used for activating a display that was plugged in after the TextLCD Adapter was attached, to clear the display after setting/getting the screen size, and to re-initialize a display if it has become corrupted(display not working). Not all TextLCDs supported this method.
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. |
native void com.phidgets.TextLCDPhidget.setBacklight | ( | boolean | backlight | ) | throws PhidgetException |
Sets the status of the backlight. True turns the backlight on, False turns it off. The backlight is by default turned on.
backlight | New backlight state |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native void com.phidgets.TextLCDPhidget.setBrightness | ( | int | brightness | ) | throws PhidgetException |
Sets the brightness of the display. The valid range is 0-255. Changing the brightness can increase the readability of the display in certain viewing situation, such as at an odd angle. Not all TextLCDs support this method.
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. |
native void com.phidgets.TextLCDPhidget.setContrast | ( | int | contrast | ) | throws PhidgetException |
Sets the contrast of the display. The valid range is 0-255. Changing the contrast can increase the readability of the display in certain viewing situation, such as at an odd angle.
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. |
native void com.phidgets.TextLCDPhidget.setCursor | ( | boolean | cursor | ) | throws PhidgetException |
Sets the state of the cursor. True indicates that the cursor on, False indicates that it is off. The cursor is an underscore which appears directly to the right of the last entered character on the display. The cursor is by default disabled.
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. |
native void com.phidgets.TextLCDPhidget.setCursorBlink | ( | boolean | cursorblink | ) | throws PhidgetException |
Sets the state of the cursor blink. True indicates that the cursor blink is on, False indicates that it is off. The cursor blink is an flashing box which appears directly to the right of the last entered character on the display, in the same spot as the cursor if it is enabled. The cursor blink is by default disabled.
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. |
native void com.phidgets.TextLCDPhidget.setCustomCharacter | ( | int | index, |
int | param1, | ||
int | param2 | ||
) | throws PhidgetException |
Sets a custom character. You can set up to 8 custom characters, each one is completely defined by two integers, and gets stored in the character display until power is removed, whence they must be re-programmed. The characters lie in positions 8-15, and can be displayed by sending these codes to setDisplayString in amongst standard ASCII characters. See the TextLCD Java example for more information.
index | position ( 8-15 ) |
param1 | first half of the character code |
param2 | 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. |
native void com.phidgets.TextLCDPhidget.setDisplayCharacter | ( | int | row, |
int | column, | ||
char | character | ||
) | throws PhidgetException |
Sets the character to display at a certain row and column.
row | row |
column | column |
character | 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. |
native void com.phidgets.TextLCDPhidget.setDisplayString | ( | int | index, |
String | text | ||
) | throws PhidgetException |
Sets the display string of a certain row.
index | row |
text | 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. |
native void com.phidgets.TextLCDPhidget.setScreen | ( | int | screen | ) | throws PhidgetException |
Sets the active screen. All other API calls depend on this being called first to select the screen that subsequent calls affect. When making calls from multiple threads, selecting the screen should be synchronized with setting screen properties in order to avoid having messages go to the wrong display. Not all TextLCDs support this method.
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. |
native void com.phidgets.TextLCDPhidget.setScreenSize | ( | int | screenSize | ) | throws PhidgetException |
Sets the screen size for the active TextLCD display. The TextLCD Adapter supports a pre-defined set of screen sizes to choose from. This method must always be called when trying to write text to a display. Not all TextLCDs support this method.
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. |
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_1x16 = 4 [static] |
1 row, 16 column screen. This is used with getScreenSize and setScreenSize
Definition at line 41 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_1x40 = 10 [static] |
1 row, 40 column screen. This is used with getScreenSize and setScreenSize
Definition at line 65 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_1x8 = 2 [static] |
1 row, 8 column screen. This is used with getScreenSize and setScreenSize
Definition at line 33 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_2x16 = 5 [static] |
2 row, 16 column screen. This is used with getScreenSize and setScreenSize
Definition at line 45 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_2x20 = 7 [static] |
2 row, 20 column screen. This is used with getScreenSize and setScreenSize
Definition at line 53 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_2x24 = 9 [static] |
2 row, 24 column screen. This is used with getScreenSize and setScreenSize
Definition at line 61 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_2x40 = 11 [static] |
2 row, 40 column screen. This is used with getScreenSize and setScreenSize
Definition at line 69 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_2x8 = 3 [static] |
2 row, 8 column screen. This is used with getScreenSize and setScreenSize
Definition at line 37 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_4x16 = 6 [static] |
4 row, 16 column screen. This is used with getScreenSize and setScreenSize
Definition at line 49 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_4x20 = 8 [static] |
4 row, 20 column screen. This is used with getScreenSize and setScreenSize
Definition at line 57 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_4x40 = 12 [static] |
4 row, 40 column screen. This is used with getScreenSize and setScreenSize
Definition at line 73 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_NONE = 1 [static] |
No screens attached. This is used with getScreenSize and setScreenSize
Definition at line 29 of file TextLCDPhidget.java.
final int com.phidgets.TextLCDPhidget.PHIDGET_TEXTLCD_SCREEN_UNKNOWN = 13 [static] |
Unknown screen size. This is used with getScreenSize and setScreenSize
Definition at line 77 of file TextLCDPhidget.java.