PenProfile 2.x

com.livescribe.display
Class Displayable

java.lang.Object
  extended by com.livescribe.display.Displayable
Direct Known Subclasses:
BrowseList, Canvas

public abstract class Displayable
extends Object

A Displayable object can be placed on the pen display. The Displayable UI takes over the entire display. It is set on a Display using Display.setCurrent(Displayable).


Method Summary
protected  Image getSurface()
          Gets the drawing surface of the Displayable.
 boolean isCurrent()
          Indicates if this Displayable is set as the current Displayable on the pen display.
protected  void notifyHidden(Display d)
          This is invoked by the system to notify this Displayable when it is not current.
protected  void notifyShown(Display d)
          This is invoked by the system to notify this Displayable when it has become current.
protected  void notifySystemTrayHidden()
          This is invoked by the system to notify the Displayable when the system tray has been hidden.
protected  void notifySystemTrayShown()
          This is invoked by the system to notify the Displayable when the system tray has been displayed.
protected abstract  void paint(Graphics graphics)
          Invoked by the system to allow the Displayable to render contents using the graphics context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

notifyShown

protected void notifyShown(Display d)
This is invoked by the system to notify this Displayable when it has become current. Overriding methods should call super.notifyShown(d) before its own implementation. Failure to do this could result in unknown behavior.

Parameters:
d - The Display on which this Displayale is current

notifyHidden

protected void notifyHidden(Display d)
This is invoked by the system to notify this Displayable when it is not current. Overriding methods should call super.notifyHidden(d) before its own implementation. Failure to do this could result in unknown behavior.

Parameters:
d - The Display on which this Displayale was current

notifySystemTrayShown

protected void notifySystemTrayShown()
This is invoked by the system to notify the Displayable when the system tray has been displayed.


notifySystemTrayHidden

protected void notifySystemTrayHidden()
This is invoked by the system to notify the Displayable when the system tray has been hidden.

The default implementation would schedule a paint call that allows the Displayable to render to the full screen.


isCurrent

public boolean isCurrent()
Indicates if this Displayable is set as the current Displayable on the pen display.

Returns:
true if the Displayable is current; false if the Displayable is not current.

getSurface

protected Image getSurface()
Gets the drawing surface of the Displayable. If the surface is the physical display, then a copy of the display buffer is returned.

Returns:
the Image that is the drawing surface.

paint

protected abstract void paint(Graphics graphics)
Invoked by the system to allow the Displayable to render contents using the graphics context.

Parameters:
graphics - the Graphics context to be used to render on the Displayable.

PenProfile 2.x

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