PenProfile 2.x

com.livescribe.display
Class Display

java.lang.Object
  extended by com.livescribe.display.Display

public abstract class Display
extends Object

Display encapsulates the display device of the pen. Applications can get a reference to the display using the PenletContext.getDisplay() method.

A portion of the display is used as a notification area on demand, dynamically. This is known as the system tray. The dimensions of the system tray can be retrieved using getTrayWidth() and getTrayHeight().


Method Summary
static byte getBlackColor()
          Gets the pixel value used for black color
 Displayable getCurrent()
          Gets the current Displayable instance.
static int getHeight()
          Gets the height of the display in pixels.
 Transition getTransition()
          Gets the current Transition object.
static int getTrayHeight()
          Gets the height of the system tray in pixels.
static int getTrayWidth()
          Gets the width of the system tray in pixels.
static byte getWhiteColor()
          Gets the pixel value used for white color
static int getWidth()
          Gets the width of the display in pixels.
 void setCurrent(Displayable displayable)
          Sets a new Displayable instance to be current.
 void setTransition(Transition transition)
          Sets a new Transition on the display.
abstract  void showDefaultScreen()
          Shows the platform default screen on the display.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWidth

public static int getWidth()
Gets the width of the display in pixels.

Returns:
display width.

getHeight

public static int getHeight()
Gets the height of the display in pixels.

Returns:
display height.

getTrayWidth

public static int getTrayWidth()
Gets the width of the system tray in pixels.

Returns:
system tray width.

getTrayHeight

public static int getTrayHeight()
Gets the height of the system tray in pixels.

Returns:
system tray height.

getWhiteColor

public static byte getWhiteColor()
Gets the pixel value used for white color

Returns:
white pixel color.

getBlackColor

public static byte getBlackColor()
Gets the pixel value used for black color

Returns:
black pixel color.

getCurrent

public Displayable getCurrent()
Gets the current Displayable instance. This can be null if the display does not have any displayables.

Returns:
the current Displayable instance; or null if this Display does not have any displayable.

setCurrent

public void setCurrent(Displayable displayable)
Sets a new Displayable instance to be current.

Parameters:
displayable - the new Displayable. If the value is null, the current Displayable (if any) is not changed.

setTransition

public void setTransition(Transition transition)
Sets a new Transition on the display.

Parameters:
transition - the Transition to be used. This can be null to use no transition.
See Also:
Transition.DEFAULT, getTransition()

getTransition

public Transition getTransition()
Gets the current Transition object. Note that this may be null for the default transition.

Returns:
the currently set Transition.
See Also:
setTransition(Transition)

showDefaultScreen

public abstract void showDefaultScreen()
Shows the platform default screen on the display.


PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.