| javax.microedition.lcdui.Canvas com.sun.midp.util.LcduiTestCanvas
LcduiTestCanvas | public class LcduiTestCanvas extends Canvas (Code) | | A simple test canvas. Adds the ability to wait for the Canvas to become
visible for the first time.
|
Method Summary | |
public boolean | awaitPaint() Waits until this canvas is painted for the first time. | public boolean | awaitShow() Waits until this canvas is shown for the first time. | final public void | hideNotify() Tracks the shown state. | public void | hideNotify1() Subclassers should override this to do hideNotify() processing. | final public void | paint(Graphics g) Notifies when painted for the first time. | public void | paint1(Graphics g) Subclassers should override this to do actual painting. | public synchronized boolean | showCalled() Returns a boolean indicating whether showNotify has been called on this
canvas more recently than hideNotify. | final public void | showNotify() Tracks the shown state. | public void | showNotify1() Subclassers should override this to do showNotify() processing. | public synchronized boolean | wasShown() Returns a boolean indicating whether showNotify() has ever been called
at any time since the canvas was created. |
TIMEOUT | final static long TIMEOUT(Code) | | |
everShown | boolean everShown(Code) | | |
awaitPaint | public boolean awaitPaint()(Code) | | Waits until this canvas is painted for the first time. Proper operation
relies on the caller to have arranged for this canvas to be shown, for
example, with setCurrent(). Returns immediately if the canvas has been
painted already, even if it's been hidden and shown again. Returns true
if the canvas has been painted at least once. Returns false if the wait
was interrupted or if it timed out. This method must not be called on
the event thread. If it is, it will block paint processing and will
eventually timeout.
|
awaitShow | public boolean awaitShow()(Code) | | Waits until this canvas is shown for the first time. Proper operation
relies on the caller to have arranged for this canvas to be shown, for
example, with setCurrent(). Returns immediately if the canvas has been
shown already, even if it has subsequently been hidden. Returns true if
the canvas has ever been shown. Returns false if the wait was
interrupted or if it timed out. This method must not be called on the
event thread. If it is, it will block show processing and will
eventually timeout.
|
hideNotify | final public void hideNotify()(Code) | | Tracks the shown state. This is made final so that subclassers can't
accidentally break the protocol if they override and forget to call
super(). Subclassers may override hideNotify1() if they wish to do hide
processing.
|
hideNotify1 | public void hideNotify1()(Code) | | Subclassers should override this to do hideNotify() processing.
|
paint | final public void paint(Graphics g)(Code) | | Notifies when painted for the first time. This is made final so that
subclassers can't accidentally break this if they override and forget
to call super(). Subclassers should override paint1() to do actual
painting.
|
paint1 | public void paint1(Graphics g)(Code) | | Subclassers should override this to do actual painting.
|
showCalled | public synchronized boolean showCalled()(Code) | | Returns a boolean indicating whether showNotify has been called on this
canvas more recently than hideNotify. This differs from the
Displayable.isShown() method, which checks the internal state of the
Displayable object.
|
showNotify | final public void showNotify()(Code) | | Tracks the shown state. If this is the first time the Canvas is being
shown, sets everShown and does a monitor notify. This is made final so
that subclassers can't accidentally break the protocol if they override
and forget to call super(). Subclassers may override showNotify1() if
they wish to do show processing.
|
showNotify1 | public void showNotify1()(Code) | | Subclassers should override this to do showNotify() processing.
|
wasShown | public synchronized boolean wasShown()(Code) | | Returns a boolean indicating whether showNotify() has ever been called
at any time since the canvas was created.
|
|
|