|
Ascent Phase Corp. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.ascentphase.suit.Widget
The superclass of any suit component.
| Field Summary | |
protected Command |
cmdToThrow
|
| Constructor Summary | |
Widget()
|
|
| Method Summary | |
boolean |
contains(int x,
int y)
Returns whether the given coordinate lies within this widget's area of interest. |
Command |
getCommand()
Returns the Command associated with this widget. |
Command |
keyPressed(int code)
Method called by the widget's containing Panel when a key is pressed and the widget has the Panel's focus. |
Command |
keyReleased(int code)
Method called by the widget's containing Panel when a key is released and the widget has the Panel's focus. |
abstract void |
paint(Graphics g)
Draws the widget. |
Command |
pointerDragged(int x,
int y)
Method called by the widget's containing Panel when a pointer is being dragged over the widget area. |
Command |
pointerPressed(int x,
int y)
Method called by the widget's containing Panel when a pointer is pressed over the widget area. |
Command |
pointerReleased(int x,
int y)
Method called by the widget's containing Panel when a pointer is released over the widget area. |
void |
setCommand(Command c)
The command to throw for this widget. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Command cmdToThrow
| Constructor Detail |
public Widget()
| Method Detail |
public abstract void paint(Graphics g)
g - the Graphics object to draw with.
public boolean contains(int x,
int y)
x - the x coordinate.y - the y coordinate.public Command keyPressed(int code)
code - the keycode of key pressed.
public Command keyReleased(int code)
code - the keycode of key released.
public Command pointerDragged(int x,
int y)
x - the x-coordinate relative to the widget's origin.y - the y-coordinate relative to the widget's origin.
public Command pointerPressed(int x,
int y)
x - the x-coordinate relative to the widget's origin.y - the y-coordinate relative to the widget's origin.
public Command pointerReleased(int x,
int y)
x - the x-coordinate relative to the widget's origin.y - the y-coordinate relative to the widget's origin.
public Command getCommand()
public void setCommand(Command c)
c - the Command object to throw to CommandListeners.
|
Ascent Phase Corp. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||