com.vwp.jLCD
Class IconWidget

java.lang.Object
  extended by com.vwp.jLCD.Widget
      extended by com.vwp.jLCD.IconWidget

public class IconWidget
extends Widget

A icon widget is able to display one single icon with a size of one single character.


Field Summary
static int ICON_ARROW_DOWN
           
static int ICON_ARROW_LEFT
           
static int ICON_ARROW_RIGHT
           
static int ICON_ARROW_UP
           
static int ICON_BLOCK_FILLED
           
static int ICON_CHECKBOX_GRAY
           
static int ICON_CHECKBOX_OFF
           
static int ICON_CHECKBOX_ON
           
static int ICON_ELLIPSIS
           
static int ICON_FF
           
static int ICON_FR
           
static int ICON_HEART_FILLED
           
static int ICON_HEART_OPEN
           
static int ICON_NEXT
           
static int ICON_PAUSE
           
static int ICON_PLAY
           
static int ICON_PLAYR
           
static int ICON_PREV
           
static int ICON_REC
           
static int ICON_SELECTOR_AT_LEFT
           
static int ICON_SELECTOR_AT_RIGHT
           
static int ICON_STOP
           
 
Fields inherited from class com.vwp.jLCD.Widget
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT
 
Constructor Summary
IconWidget(int x, int y, int icon)
          Constructor for a new widget; here the top and left position have to be given.
 
Method Summary
 int getIcon()
           
 String getType()
           
 int getX()
           
 int getY()
           
 void refresh()
          Refreshes the icon on the display: if was is overwritten by a different widget the call to refresh updates the icon
 void setIcon(int icon)
           
 void setX(int x)
           
 void setY(int y)
           
 
Methods inherited from class com.vwp.jLCD.Widget
getID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ICON_BLOCK_FILLED

public static final int ICON_BLOCK_FILLED
See Also:
Constant Field Values

ICON_HEART_FILLED

public static final int ICON_HEART_FILLED
See Also:
Constant Field Values

ICON_HEART_OPEN

public static final int ICON_HEART_OPEN
See Also:
Constant Field Values

ICON_ARROW_UP

public static final int ICON_ARROW_UP
See Also:
Constant Field Values

ICON_ARROW_DOWN

public static final int ICON_ARROW_DOWN
See Also:
Constant Field Values

ICON_ARROW_LEFT

public static final int ICON_ARROW_LEFT
See Also:
Constant Field Values

ICON_ARROW_RIGHT

public static final int ICON_ARROW_RIGHT
See Also:
Constant Field Values

ICON_CHECKBOX_OFF

public static final int ICON_CHECKBOX_OFF
See Also:
Constant Field Values

ICON_CHECKBOX_ON

public static final int ICON_CHECKBOX_ON
See Also:
Constant Field Values

ICON_CHECKBOX_GRAY

public static final int ICON_CHECKBOX_GRAY
See Also:
Constant Field Values

ICON_SELECTOR_AT_LEFT

public static final int ICON_SELECTOR_AT_LEFT
See Also:
Constant Field Values

ICON_SELECTOR_AT_RIGHT

public static final int ICON_SELECTOR_AT_RIGHT
See Also:
Constant Field Values

ICON_ELLIPSIS

public static final int ICON_ELLIPSIS
See Also:
Constant Field Values

ICON_STOP

public static final int ICON_STOP
See Also:
Constant Field Values

ICON_PAUSE

public static final int ICON_PAUSE
See Also:
Constant Field Values

ICON_PLAY

public static final int ICON_PLAY
See Also:
Constant Field Values

ICON_PLAYR

public static final int ICON_PLAYR
See Also:
Constant Field Values

ICON_FF

public static final int ICON_FF
See Also:
Constant Field Values

ICON_FR

public static final int ICON_FR
See Also:
Constant Field Values

ICON_NEXT

public static final int ICON_NEXT
See Also:
Constant Field Values

ICON_PREV

public static final int ICON_PREV
See Also:
Constant Field Values

ICON_REC

public static final int ICON_REC
See Also:
Constant Field Values
Constructor Detail

IconWidget

public IconWidget(int x,
                  int y,
                  int icon)
Constructor for a new widget; here the top and left position have to be given. These parameters are 1-based, so a position of 1,1 specifies the upper left corner of the display

Parameters:
x - position of the text in horizontal direction in unit cells
y - position of the text in vertical direction in unit cells
icon - the ID of the icon that has to be displayed at this position
Method Detail

getX

public int getX()
Returns:
the current horizontal position in unit cells

setX

public void setX(int x)
Parameters:
x - the new horizontal position where the text has to be displayed at

getY

public int getY()
Returns:
the current vertical position in unit cells

setY

public void setY(int y)
Parameters:
y - the new vertical position where the text has to be displayed at

getIcon

public int getIcon()
Returns:
the icon ID that is currently displayed by this widget

setIcon

public void setIcon(int icon)
Parameters:
icon - a new icons ID that has to be displayed left-aligned by this widget

refresh

public void refresh()
Refreshes the icon on the display: if was is overwritten by a different widget the call to refresh updates the icon


getType

public String getType()
Specified by:
getType in class Widget