Package com.microej.wear.components
Interface Renderable
-
public interface Renderable
Represents a UI that can be rendered on a graphics context and that can be shown on the display.The methods of a renderable are called in the following order:
- one call to
onAttached()
- any number of calls to
render(ej.microui.display.GraphicsContext)
- one optional call to
showOnDisplay()
- one call to
onDetached()
- one call to
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onAttached()
Called when this instance is scheduled for imminent rendering.void
onDetached()
Called when this instance is no longer scheduled for imminent rendering.void
render(ej.microui.display.GraphicsContext g)
Renders this instance on the given graphics context.void
showOnDisplay()
Shows this instance on the display.
-
-
-
Method Detail
-
onAttached
void onAttached()
Called when this instance is scheduled for imminent rendering.For example, this method can load the resources necessary for rendering.
-
onDetached
void onDetached()
Called when this instance is no longer scheduled for imminent rendering.For example, this method can dispose the resources loaded in
onAttached()
.
-
render
void render(ej.microui.display.GraphicsContext g)
Renders this instance on the given graphics context.This method applies the translation and clip set in the given graphics context (it should not reset the translation and clip before drawing).
- Parameters:
g
- the graphics context to draw with.
-
showOnDisplay
void showOnDisplay()
Shows this instance on the display.Once the displayable is shown on the display, it can start animations and handle events. Once it is hidden (due to an other displayable being shown), it can stop the started animations and dispose the resources loaded in
onAttached()
.
-
-