|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoka.lang.Object
moka.event.EventListener
moka.x.Component
Component is the base class for user-interface objects.
Field Summary | |
boolean |
enabled
Is the Component enabled ? Should be only read. |
short |
height
The height of this Component. |
EventListener |
listen
The event listener for this component. |
char |
mnemonic
The mnemonic associated with this component. |
protected Component |
next
The next component in the container of this Component. |
protected Container |
parent
The parent Container of this Component. |
protected Component |
prev
The previous component in the container of this Component. |
boolean |
visible
Is the Component visible ? Should be only read. |
short |
width
The width of this Component. |
short |
x
The horizontal coordinate of this Component. |
short |
y
The vertical coordinate of this Component. |
Constructor Summary | |
Component()
Constructs a newly allocated Component. |
Method Summary | |
void |
bottom()
|
void |
center()
|
void |
checkMnemonic(char m)
Checks if the mnemonic of this component correspond to the current mnemonic. |
protected void |
clean()
Disposes of all ressources used by this component. |
void |
eventTriggered(java.lang.Object sender)
Invoked when an event is triggered. |
void |
finalize()
Free the memory and system ressources used by this Component. |
boolean |
isCursorOver(short x,
short y)
Indicates if the cursor is over this component. |
void |
left()
|
void |
move(short x,
short y)
|
void |
onPaint()
Called when a PaintEvent occurs to paint the image of the component and stores it in its virtual memory. |
void |
paint()
This method is called to draw the component. |
void |
right()
|
void |
setBounds(short x,
short y,
short width,
short height)
|
void |
setEnabled(boolean b)
Sets if the component is enabled or not. |
void |
setHeight(short height)
|
void |
setMnemonic(char mnemonic)
Sets the mnemonic for this component. |
void |
setVisible(boolean b)
Sets the visibility of the component. |
void |
setWidth(short width)
|
void |
setX(short x)
|
void |
setY(short y)
|
Component |
toFront(Component c)
Called to brings a component to the front of a container. |
void |
top()
|
void |
use()
This method is invoked by the GEM when the user interacts with the component. |
Methods inherited from class moka.event.EventListener |
eventTriggered |
Methods inherited from class moka.lang.Object |
equals, getClassName, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Component next
protected Component prev
protected Container parent
public short height
public short width
public short x
public short y
public boolean visible
public boolean enabled
public char mnemonic
public EventListener listen
Constructor Detail |
public Component()
Method Detail |
public void eventTriggered(java.lang.Object sender)
sender
- The object who triggered the event.public void finalize()
finalize
in class Object
public void onPaint()
public void paint()
paint
method.
public void setBounds(short x, short y, short width, short height)
public void setX(short x)
public void setY(short y)
public void setWidth(short width)
public void setHeight(short height)
public void move(short x, short y)
public void setVisible(boolean b)
b
- true if the component should be visible, false otherwize.public void setEnabled(boolean b)
b
- true if the component should be enabled, false otherwize.public void setMnemonic(char mnemonic)
public void use()
public boolean isCursorOver(short x, short y)
x
- the reference's horizontal coordinatey
- the reference's vertical coordinate
public void center()
public void top()
public void bottom()
public void left()
public void right()
public Component toFront(Component c)
c
- the component to bring to front.
protected void clean()
public void checkMnemonic(char m)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |