|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iu.cnets.klatsch.gui.Widget
public abstract class Widget
This is the basic class of all the display widgets in the Klatsch GUI.
Field Summary | |
---|---|
protected KlatschGui |
parent
the applet we're working for |
protected int |
x1
the boundaries of the widget |
protected int |
x2
the boundaries of the widget |
protected int |
y1
the boundaries of the widget |
protected int |
y2
the boundaries of the widget |
Constructor Summary | |
---|---|
Widget(KlatschGui parent,
int x1,
int y1,
int x2,
int y2)
Default constructor. |
Method Summary | |
---|---|
protected void |
clear()
Clears the rectangle belonging to the widget. |
protected abstract void |
draw()
|
protected boolean |
in(int x,
int y)
Returns true if the given position is in the widget. |
protected void |
keyPressed(int which)
|
protected void |
keyReleased(int which)
|
protected void |
mouseDragged(int which,
int x,
int y)
|
protected void |
mousePressed(int which,
int x,
int y)
|
protected void |
mouseReleased(int which,
int x,
int y)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int x1
protected int y1
protected int x2
protected int y2
protected KlatschGui parent
Constructor Detail |
---|
public Widget(KlatschGui parent, int x1, int y1, int x2, int y2)
parent
- the applet this widget belongs tox1
- x-coordinate of the upper-left cornery1
- y-coordinate of the upper-left cornerx2
- x-coordinate of the lower-right cornery2
- y-coordinate of the lower-right cornerMethod Detail |
---|
protected abstract void draw()
protected void keyPressed(int which)
protected void keyReleased(int which)
protected void mouseDragged(int which, int x, int y)
protected void mousePressed(int which, int x, int y)
protected void mouseReleased(int which, int x, int y)
protected void clear()
protected boolean in(int x, int y)
x
- x-coordinate to testy
- y-coordinate to test
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |