Ascent Phase Corp.

org.ascentphase.suit
Class Panel

java.lang.Object
  |
  +--Canvas
        |
        +--org.ascentphase.suit.Panel
Direct Known Subclasses:
InputPopup

public class Panel
extends Canvas

A container that holds one or more widgets internally to be displayed.

Version:
Author:
huyd
See Also:
Serialized Form

Field Summary
protected  boolean clearReq
           
 
Constructor Summary
Panel()
           
 
Method Summary
 void add(org.ascentphase.suit.Widget w, int x, int y)
          Adds a widget to the Panel at the given coordinate.
 void add(org.ascentphase.suit.Widget w, int x, int y, boolean focus)
          Adds a widget to the Panel at the given coordinate and give the widget initial focus.
protected  void handleCommandEvent(Command evt)
          Notifies any listeners when a Command event occurs.
protected  void keyPressed(int keyCode)
          Called when a key is pressed.
protected  void keyReleased(int keyCode)
          Called when a key is released.
protected  void keyRepeated(int keyCode)
          Called when a key is repeated (held down).
 void paint(Graphics g)
          paint
protected  void pointerDragged(int x, int y)
          Called when the pointer is dragged.
protected  void pointerPressed(int x, int y)
          Called when the pointer is pressed.
protected  void pointerReleased(int x, int y)
          Called when the pointer is released.
 void remove(org.ascentphase.suit.Widget w)
          Removes the given widget from the Panel.
 void setCommandListener(CommandListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clearReq

protected boolean clearReq
Constructor Detail

Panel

public Panel()
Method Detail

add

public void add(org.ascentphase.suit.Widget w,
                int x,
                int y)
Adds a widget to the Panel at the given coordinate.

Parameters:
w - the Widget to add.
x - the x coordinate on the screen.
y - the y coordinate on the screen.

add

public void add(org.ascentphase.suit.Widget w,
                int x,
                int y,
                boolean focus)
Adds a widget to the Panel at the given coordinate and give the widget initial focus. It will overried any other Widget who may have initial focus.

Parameters:
w - the Widget to add.
x - the x coordinate on the screen.
y - the y coordinate on the screen.
focus - true to give the Widget initial focus.

remove

public void remove(org.ascentphase.suit.Widget w)
Removes the given widget from the Panel.

Parameters:
w - the widget to remove.

paint

public void paint(Graphics g)
paint


keyPressed

protected void keyPressed(int keyCode)
Called when a key is pressed.


keyReleased

protected void keyReleased(int keyCode)
Called when a key is released.


keyRepeated

protected void keyRepeated(int keyCode)
Called when a key is repeated (held down).


pointerDragged

protected void pointerDragged(int x,
                              int y)
Called when the pointer is dragged.


pointerPressed

protected void pointerPressed(int x,
                              int y)
Called when the pointer is pressed.


pointerReleased

protected void pointerReleased(int x,
                               int y)
Called when the pointer is released.


setCommandListener

public void setCommandListener(CommandListener l)

handleCommandEvent

protected void handleCommandEvent(Command evt)
Notifies any listeners when a Command event occurs.

Parameters:
evt - the Command evt to pass to listeners.

Ascent Phase Corp.

Copyright © 2002 Ascent Phase Corp. All Rights Reserved.