com.vwp.jLCD
Class StringWidget

java.lang.Object
  extended by com.vwp.jLCD.Widget
      extended by com.vwp.jLCD.StringWidget
Direct Known Subclasses:
ScrollerWidget

public class StringWidget
extends Widget

A string widget is able to handle a simple static text


Field Summary
 
Fields inherited from class com.vwp.jLCD.Widget
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT
 
Constructor Summary
StringWidget(int x, int y, String text)
          Constructor for a new widget
 
Method Summary
 String getText()
           
 String getType()
           
 int getX()
           
 int getY()
           
 void setText(String text)
           
 void setText(String text, int align)
          Set a new text to the widget
 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
 

Constructor Detail

StringWidget

public StringWidget(int x,
                    int y,
                    String text)
Constructor for a new widget

Parameters:
x - position of the text in horizontal direction in unit cells
y - position of the text in vertical direction in unit cells
text - the text 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

getText

public String getText()
Returns:
the text that is currently displayed by this widget

setText

public void setText(String text)
Parameters:
text - a new text string that has to be displayed left-aligned by this widget

setText

public void setText(String text,
                    int align)
Set a new text to the widget

Parameters:
text - the new text to set
align - the text alignment to use

getType

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