|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcontrol.ui.vole.Component jcontrol.ui.vole.Container
public class Container
A container is a component that can contain other Vole components.
Components added to a container are tracked in a list. The order of the list will define the component's front-to-back stacking order within the container.
The Vole container does not support virtual coordinates. Thus child-component coordinates always reflect system coordinates.
(c) Copyright 2003-2007 DOMOLOGIC GmbH
Field Summary | |
---|---|
protected java.util.Vector |
children
The children of the container. |
protected int |
hasFocus
Points on the current focus owner in the vector of childrens |
static int |
TRANSFER_BACKWARD
|
static int |
TRANSFER_FORWARD
Focus transfer directions |
Fields inherited from class jcontrol.ui.vole.Component |
---|
eventQueue, focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
---|---|
Container()
Create a new Container . |
|
Container(int x,
int y,
int width,
int height)
Create a new Container with the
specified dimensions. |
Method Summary | |
---|---|
void |
add(Component component)
Adds a child component to this container. |
Component |
getFocus()
Returns the child component that has the focus, null if there is none. |
static boolean |
isCovered(Component c)
Determines whether the specified Component is covered by another Component which currently has the input focus. |
boolean |
onKeyEvent(KeyEvent e)
Tells the focussed child component that a key was pressed. |
void |
paint()
Paints all child components. |
void |
remove()
Removes this container and all child components. |
void |
remove(Component component)
Removes a child component from the container. |
void |
removeAll()
Remove all child components from the container. |
void |
removeFocus()
Removes the focus from this container structure. |
void |
requestFocus()
Sets the focus to this container. |
void |
setFocus(Component c)
Set the focus to the given component. |
void |
setFont(Resource font)
Set the font for this component. |
void |
setGraphics(Graphics g)
Sets the Display context for all child components. |
void |
setRadioButton(RadioButton radio)
Set the state of the radio buttons contained in this Container . |
void |
setVisible(boolean onoff)
Sets this container and all child comonents visible or invisible. |
boolean |
transferFocus(Container source)
Transfers the focus to the next component. |
boolean |
transferFocus(Container source,
int direction)
Transfers the focus to the next component in given direction. |
Methods inherited from class jcontrol.ui.vole.Component |
---|
getBounds, getParent, isVisible, onActionEvent, setBounds, setParent, transferFocus, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Field Detail |
---|
protected java.util.Vector children
protected int hasFocus
public static final int TRANSFER_FORWARD
public static final int TRANSFER_BACKWARD
Constructor Detail |
---|
public Container()
Container
.
public Container(int x, int y, int width, int height)
Container
with the
specified dimensions.
x
- The x-coordinate of the container.y
- The y-coordinate of the container.width
- The width of the container.height
- The height of the container.Method Detail |
---|
public void add(Component component)
public void setFont(Resource font)
setFont
in class Component
font
- The new font.public boolean onKeyEvent(KeyEvent e)
onKeyEvent
in class Component
e
- the KeyEvent to pass on
public void setGraphics(Graphics g)
setGraphics
in class Component
g
- The display contextpublic void remove()
remove
in class Component
public void remove(Component component)
public void removeAll()
public void setVisible(boolean onoff)
setVisible
in class Component
onoff
- true-visible, false-invisiblepublic void paint()
paint
in class Component
public void removeFocus()
removeFocus
in class Component
public void requestFocus()
requestFocus
in class Component
public void setFocus(Component c)
c
- The component to set the focus to.public boolean transferFocus(Container source, int direction)
source
- The caller of this method.direction
- TRANSFER_FORWARD or TRANSFER_BACK.
public boolean transferFocus(Container source)
source
- The caller of this method.Component.transferFocus()
public Component getFocus()
public static boolean isCovered(Component c)
c
- The component to test.public void setRadioButton(RadioButton radio)
Container
.
Only one radio button may be "on" simultaneously.
radio
- The radio button to switch "on".
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |