public abstract class Displayable extends Object implements EventHandler
Displayableis an abstract class which defines the very objects that can be shown on the
Displayablemay be shown or hidden, but at most one
Displayableis shown on the
Displayablecontents and their possible interactions with the user.
Displayableobject is not visible on the display.
|Constructor and Description|
|Modifier and Type||Method and Description|
This method is called by system as soon as the displayable becomes hidden.
This method is called by system as soon as the displayable becomes visible.
Renders the displayable.
Requests a rendering for the entire displayable.
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void onHidden()
protected void onShown()
protected abstract void render(GraphicsContext gc)
gc- the graphics context of display.
public void requestRender()
render(GraphicsContext)on the displayable.
The call to
render(GraphicsContext) occurs asynchronously to this call. That is, this method will not
block waiting for
render(GraphicsContext) to finish. After render action (after call to
render(GraphicsContext), a call to
Display.flush() is synchronously performed.
This call may have no effect under certain conditions:
Display.isShown(Displayable)): the request is refused.
Display.requestShow(Displayable)has been performed with another displayable): the request is abandoned (this displayable is no longer the current displayable).