|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Object
Component
Canvas
public class Canvas
Canvas is a component which is painted by
script. Whenever system wants to paint
the contents of Canvas it calls
Script.paint(Component, Graphics, Style, int, int) callback, passing the
Canvas instance as argument.
A custom paint callback function can be supplied also.
| Constructor Summary | |
|---|---|
Canvas(Style style)
Constructs a new Canvas component. |
|
Canvas(Style style,
PaintCallback callback)
Constructs a new Canvas component with custom paint callback. |
|
| Method Summary |
|---|
| Methods inherited from class Component |
|---|
add, appendText, clear, find, first, get, getAction, getData, getElement, getFlags, getImage, getLocation, getParent, getShell, getSize, getStyle, getText, getViewPort, hasLinefeed, indexOf, insert, isFocusable, isShown, isVisible, isWrapping, last, operator_get, operator_set, remove, remove, repaint, set, setAction, setData, setElement, setFlags, setImage, setLocation, setPreferredHeight, setPreferredSize, setPreferredWidth, setStyle, setText, size |
| Methods inherited from class Object |
|---|
toString, equals, hashCode |
| Methods inherited from |
|---|
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Canvas(Style style)
style - Style to use
public Canvas(Style style,
PaintCallback callback)
It is possible to set a custom paint function as an
argument in the constructor. Whenever the system decides
to paint the Canvas it will call this function that
must match the signature of
PaintCallback.paint(Component, Graphics, Style, int, int).
If the supplied callback is null the generic function
Script.paint(Component, Graphics, Style, int, int) will be called.
style - Style to usecallback - Callback to use or null to
use the generic callback
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||