com.vwp.jLCD
Class Screen

java.lang.Object
  extended by com.vwp.jLCD.Screen

public class Screen
extends Object

The screen is the base for all further elements. When a screen was added to an LCD object some widgets can be added to that screen. These widgets then contain the displayed data and influence what is visible on the display


Field Summary
static int PRIORITY_BACKGROUND
          lowest priority value for a info screen, if no foreground screens are available but more than one info screen they will rotate
static int PRIORITY_FOREGROUND
          priority value for a hidden screen, this one will never be visible
static int PRIORITY_HIDDEN
           
static int PRIORITY_INFO
          lowest priority value for a foreground screen, this specifies an active screen, only the one with the highest foreground priority value will be visible
 
Constructor Summary
Screen()
          Default constructor for a new screen
Screen(String name)
          Constructor for a new screen with a default priority of 3
 
Method Summary
 void addListener(ScreenListener listener)
           
 void addWidget(Widget w)
          Only after a widget is added to a screen the display will show something.
 int getDuration()
           
 boolean getHeartbeat()
          The heartbeat feature is some kind of alive-information that shows that the system is still up and running
 int getHeight()
          A screen has a size that can be independent from the displays size
 Integer getID()
           
 String getName()
           
 int getPriority()
          The priority of a screen decides if and on what level such a screen is displayed
 int getWidth()
          A screen has a size that can be independent from the displays size
 void ignore()
           
 void listen()
           
 void removeListener(ScreenListener listener)
           
 void setDuration(int duration)
           
 void setHeartbeat(boolean heartbeat)
          The heartbeat feature is some kind of alive-information that shows that the system is still up and running
 void setHeight(int height)
          A screen has a size that can be independent from the displays size
 void setName(String name)
           
 void setPriority(int priority)
          The priority of a screen decides if and on what level such a screen is displayed
 void setWidth(int width)
          A screen has a size that can be independent from the displays size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIORITY_HIDDEN

public static final int PRIORITY_HIDDEN
See Also:
Constant Field Values

PRIORITY_FOREGROUND

public static final int PRIORITY_FOREGROUND
priority value for a hidden screen, this one will never be visible

See Also:
Constant Field Values

PRIORITY_INFO

public static final int PRIORITY_INFO
lowest priority value for a foreground screen, this specifies an active screen, only the one with the highest foreground priority value will be visible

See Also:
Constant Field Values

PRIORITY_BACKGROUND

public static final int PRIORITY_BACKGROUND
lowest priority value for a info screen, if no foreground screens are available but more than one info screen they will rotate

See Also:
Constant Field Values
Constructor Detail

Screen

public Screen()
Default constructor for a new screen


Screen

public Screen(String name)
Constructor for a new screen with a default priority of 3

Parameters:
name - the name for the screen
Method Detail

getPriority

public int getPriority()
The priority of a screen decides if and on what level such a screen is displayed

Returns:
the current priority of that screen

setPriority

public void setPriority(int priority)
The priority of a screen decides if and on what level such a screen is displayed

Parameters:
priority - the new priority for that screen

getHeartbeat

public boolean getHeartbeat()
The heartbeat feature is some kind of alive-information that shows that the system is still up and running

Returns:
true if heartbeat is turned on, false otherwise

setHeartbeat

public void setHeartbeat(boolean heartbeat)
The heartbeat feature is some kind of alive-information that shows that the system is still up and running

Parameters:
heartbeat - if this parameter is set to true the heartbeat feature will be turned on

getName

public String getName()
Returns:
the name of the screen

setName

public void setName(String name)
Parameters:
name - the new name for that screen

getWidth

public int getWidth()
A screen has a size that can be independent from the displays size

Returns:
the current width of the screen

setWidth

public void setWidth(int width)
A screen has a size that can be independent from the displays size

Parameters:
width - the new width this screen needs to have

getHeight

public int getHeight()
A screen has a size that can be independent from the displays size

Returns:
the current height of the screen

setHeight

public void setHeight(int height)
A screen has a size that can be independent from the displays size

Parameters:
height - the new width this screen needs to have

getDuration

public int getDuration()

setDuration

public void setDuration(int duration)

getID

public Integer getID()

addListener

public void addListener(ScreenListener listener)

removeListener

public void removeListener(ScreenListener listener)

listen

public void listen()

ignore

public void ignore()

addWidget

public void addWidget(Widget w)
Only after a widget is added to a screen the display will show something. Using this function such a widget - that contains the data to be displayed - can be added

Parameters:
w - the widget to be added to the screen