com.vwp.jLCD
Class StringWidget
java.lang.Object
com.vwp.jLCD.Widget
com.vwp.jLCD.StringWidget
- Direct Known Subclasses:
- ScrollerWidget
public class StringWidget
- extends Widget
A string widget is able to handle a simple static text
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 cellsy - position of the text in vertical direction in unit cellstext - the text that has to be displayed at this position
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 setalign - the text alignment to use
getType
public String getType()
- Specified by:
getType in class Widget