|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcontrol.ui.vole.Component
public abstract class Component
Component is the base class for VOLE user interface objects.
(c) Copyright 2003-2007 DOMOLOGIC GmbH
Field Summary | |
---|---|
protected static java.util.Vector |
eventQueue
Event queue for this component |
protected static Component |
focusOwner
Current focus owner (global flag) |
protected jcontrol.io.Resource |
font
A font resource for drawing text. |
protected jcontrol.io.Graphics |
g
The graphic context |
protected int |
height
The control's height |
protected ActionListener |
listener
ActionListener, called on ActionEvents |
protected Container |
parent
The parent of the control. |
protected boolean |
visible
Our visibility |
protected int |
width
The control's width |
protected int |
x
The control's x location |
protected int |
y
The control's y location |
Constructor Summary | |
---|---|
Component()
|
Method Summary | |
---|---|
int[] |
getBounds()
Returns the current bounds of this component as array of int. |
Container |
getParent()
Return the parent container if available. |
boolean |
isVisible()
Get visible state. |
void |
onActionEvent(ActionEvent e)
ActionEvent event handler. |
boolean |
onKeyEvent(KeyEvent e)
Keyboard event handler. |
void |
paint()
Paints this component. |
void |
remove()
Removes this component and draws a rectangle in the background color. |
void |
removeFocus()
Removes the focus from this Component. |
void |
requestFocus()
Sets the focus to this Component. |
void |
setBounds(int x,
int y,
int width,
int height)
Set the dimensions of this component. |
void |
setFont(jcontrol.io.Resource font)
Sets the font for this component. |
void |
setGraphics(jcontrol.io.Graphics g)
This method is called to set the main Display context for this component. |
void |
setParent(Container parent)
Sets the parent Container |
void |
setVisible(boolean visible)
Turns the component visible or invisible. |
boolean |
transferFocus()
Transfers the focus to the next component. |
void |
validate()
Calculate and set the preferred size of this Component . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, notifyAll, wait |
Field Detail |
---|
protected static java.util.Vector eventQueue
protected static Component focusOwner
protected jcontrol.io.Resource font
protected jcontrol.io.Graphics g
protected int height
protected ActionListener listener
protected Container parent
protected boolean visible
protected int width
protected int x
protected int y
Constructor Detail |
---|
public Component()
Method Detail |
---|
public int[] getBounds()
public Container getParent()
public boolean isVisible()
public void onActionEvent(ActionEvent e)
e
- the ActionEventpublic boolean onKeyEvent(KeyEvent e)
e
- the KeyEvent
Container
.public void paint()
public void remove()
public void removeFocus()
public void requestFocus()
public void setBounds(int x, int y, int width, int height)
x
- x coordinate of the upper left cornery
- y coordinate of the upper left cornerwidth
- The width of this componentheight
- The height of this componentpublic void setFont(jcontrol.io.Resource font)
font
- The new font.public void setGraphics(jcontrol.io.Graphics g)
g
- the Displaypublic void setParent(Container parent)
parent
- the Container to be the parent Objectpublic void setVisible(boolean visible)
onoff
- true, if visible - false, otherwisepublic boolean transferFocus()
public void validate()
Component
.
The calculated values depend on various parameters like font size
and drawing styles. After calculation, the component's paint
-
method should be invoked.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |