|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.zaval.util.ValidationObject | +--org.zaval.lw.LwCanvas | +--org.zaval.lw.LwPanel | +--org.zaval.lw.LwCombo
This is combobox component. The component bases on LwList component.
Actually the usage of the combobox is the same of the light weight list component. To work with the list
component use getList
and setList
methods. The sample below
illustrates the component usage:
... LwCombo combo = new LwCombo(); LwList list = combo.getList(); list.add(new LwLabel("Item 1")); list.add(new LwLabel("Item 2")); list.add(new LwLabel("Item 3")); ...
The component uses the special pad window to show the combo list. The window height can be
fixed by setMaxPadHeight
. In this case, if the list cannot be placed inside
the window wholly the scroll bar panel will be used.
The component uses folowing resources:
Fields inherited from class org.zaval.lw.LwPanel |
children |
Fields inherited from class org.zaval.lw.LwCanvas |
bits, height, insets, parent, psHeight, psWidth, skins, width, x, y |
Fields inherited from class org.zaval.util.ValidationObject |
isValidFlag |
Constructor Summary | |
LwCombo()
Constructs a combobox component with no items. |
Method Summary | |
void |
actionPerformed(LwActionEvent e)
Invoked when an action event occured. |
protected java.awt.Dimension |
calcPreferredSize()
Gets the "pure" preferred size for this component. |
boolean |
canHaveFocus()
Specifies if the component can have focus. |
boolean |
catchInput(LwComponent child)
Checks if input events for the specified child component should be caught. |
LwStButton |
getComboButton()
Gets the combo button. |
protected LwLayout |
getDefaultLayout()
Gets the default layout manager that is set with the container during initialization. |
LwList |
getList()
Gets the list component that is used as popup window content of the combobox. |
int |
getMaxPadHeight()
Gets the max pad height. |
void |
insert(int index,
java.lang.Object constr,
LwComponent c)
Inserts the specified lightweight component with the specified constraints as a child of this container at the specified position in the container list. |
void |
keyPressed(LwKeyEvent e)
Invoked when a key has been pressed. |
void |
keyReleased(LwKeyEvent e)
Invoked when a key has been released. |
void |
keyTyped(LwKeyEvent e)
Invoked when a key has been typed. |
void |
mouseClicked(LwMouseEvent e)
Invoked when the mouse button has been clicked on a light weight component. |
void |
mouseEntered(LwMouseEvent e)
Invoked when the mouse enters a light weight component. |
void |
mouseExited(LwMouseEvent e)
Invoked when the mouse exits a light weight component. |
void |
mousePressed(LwMouseEvent e)
Invoked when the mouse button has been pressed on a light weight component. |
void |
mouseReleased(LwMouseEvent e)
Invoked when the mouse button has been released on a light weight component. |
void |
paintOnTop(java.awt.Graphics g)
Paints additional elements (for example, marker) after the container and its child components have been rendered. |
void |
remove(int index)
Removes the component, specified by the index, from this container. |
void |
removeAll()
Removes all child components from this container. |
void |
setList(LwList l)
Sets the specified list component that will be used as popup window content of the combobox. |
void |
setMaxPadHeight(int h)
Sets the max pad height. |
void |
winActivated(LwWinEvent e)
Invoked when the light weight window component has been activated. |
void |
winClosed(LwWinEvent e)
Invoked when the light weight window component has been closed. |
void |
winDeactivated(LwWinEvent e)
Invoked when the light weight window component has been deactivated. |
void |
winOpened(LwWinEvent e)
Invoked when the light weight window component has been opened. |
Methods inherited from class org.zaval.lw.LwPanel |
add, add, count, get, getLayoutOffset, getLwComponentAt, getLwLayout, indexOf, insert, invalidate, recalc, remove, setBackground, setLwLayout, setOpaque, toFront, updateCashedPs |
Methods inherited from class org.zaval.lw.LwCanvas |
getBackground, getBounds, getHeight, getInsets, getLocation, getLwParent, getOrigin, getPreferredSize, getSize, getViewMan, getVisiblePart, getWidth, getX, getY, hasFocus, isEnabled, isOpaque, isVisible, paint, repaint, repaint, requestFocus, setEnabled, setInsets, setLocation, setLwParent, setPSSize, setSize, setViewMan, setVisible, toString, update, validate, viewManChanged, vrp |
Methods inherited from class org.zaval.util.ValidationObject |
isValid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.zaval.lw.LwContainer |
add, add, getLwLayout, indexOf, setLwLayout |
Methods inherited from interface org.zaval.lw.LwComponent |
getLwComponentAt, getLwParent, getViewMan, getVisiblePart, setBackground, setEnabled, setLwParent, setViewMan, setVisible |
Methods inherited from interface org.zaval.lw.Drawable |
getBackground, getOrigin, isEnabled, isOpaque, paint, repaint, repaint, setOpaque, update |
Methods inherited from interface org.zaval.util.Validationable |
invalidate, isValid, validate |
Methods inherited from interface org.zaval.lw.Layoutable |
getBounds, getHeight, getInsets, getLocation, getPreferredSize, getSize, getWidth, getX, getY, isVisible, setLocation, setSize |
Methods inherited from interface org.zaval.lw.LayoutContainer |
count, get, getLayoutOffset |
Constructor Detail |
public LwCombo()
Method Detail |
public boolean canHaveFocus()
LwComponent
canHaveFocus
in interface LwComponent
canHaveFocus
in class LwCanvas
org.zaval.lw.LwComponent
true
if the component can have the focus.public LwStButton getComboButton()
public void insert(int index, java.lang.Object constr, LwComponent c)
LwContainer
componentAdded
method its layout manager to inform the layout manager
that the new child has been added with the given constraints.insert
in interface LwContainer
insert
in class LwPanel
org.zaval.lw.LwContainer
i
- the position in the container list at which to insert
the component.s
- the object expressing layout contraints for this.c
- the lightweight component to be added.public void remove(int index)
LwContainer
componentRemoved
method of the manager.remove
in interface LwContainer
remove
in class LwPanel
org.zaval.lw.LwContainer
index
- the index of the component to be removed.public void removeAll()
LwContainer
componentRemoved
method of the manager for every child component
that has been removed.removeAll
in interface LwContainer
removeAll
in class LwPanel
public int getMaxPadHeight()
public void setMaxPadHeight(int h)
h
- the max pad height.public LwList getList()
public void setList(LwList l)
l
- the specified list component.public void keyPressed(LwKeyEvent e)
LwKeyListener
keyPressed
in interface LwKeyListener
org.zaval.lw.event.LwKeyListener
e
- the specified key event.public void keyTyped(LwKeyEvent e)
LwKeyListener
keyTyped
in interface LwKeyListener
org.zaval.lw.event.LwKeyListener
e
- the specified key event.public void keyReleased(LwKeyEvent e)
LwKeyListener
keyReleased
in interface LwKeyListener
org.zaval.lw.event.LwKeyListener
e
- the specified key event.public void actionPerformed(LwActionEvent e)
LwActionListener
actionPerformed
in interface LwActionListener
org.zaval.lw.event.LwActionListener
e
- the specified action event.public void winOpened(LwWinEvent e)
LwWinListener
winOpened
in interface LwWinListener
org.zaval.lw.event.LwWinListener
e
- the specified window event.public void winClosed(LwWinEvent e)
LwWinListener
winClosed
in interface LwWinListener
org.zaval.lw.event.LwWinListener
e
- the specified window event.public void winActivated(LwWinEvent e)
LwWinListener
winActivated
in interface LwWinListener
org.zaval.lw.event.LwWinListener
e
- the specified window event.public void winDeactivated(LwWinEvent e)
LwWinListener
winDeactivated
in interface LwWinListener
org.zaval.lw.event.LwWinListener
e
- the specified window event.public void mouseClicked(LwMouseEvent e)
LwMouseListener
mouseClicked
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void mouseEntered(LwMouseEvent e)
LwMouseListener
mouseEntered
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void mouseExited(LwMouseEvent e)
LwMouseListener
mouseExited
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void mouseReleased(LwMouseEvent e)
LwMouseListener
mouseReleased
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void mousePressed(LwMouseEvent e)
LwMouseListener
mousePressed
in interface LwMouseListener
org.zaval.lw.event.LwMouseListener
e
- the specified mouse event.public void paintOnTop(java.awt.Graphics g)
LwContainer
paintOnTop
in interface LwContainer
paintOnTop
in class LwPanel
org.zaval.lw.LwContainer
g
-
the graphics context.public boolean catchInput(LwComponent child)
LwComposite
catchInput
in interface LwComposite
org.zaval.lw.LwComposite
child
- the specified child component.true
if input events for the child component should be caught by this
component; false
otherwise.protected LwLayout getDefaultLayout()
LwPanel
getDefaultLayout
in class LwPanel
org.zaval.lw.LwPanel
protected java.awt.Dimension calcPreferredSize()
LwPanel
calcPreferredSize
in class LwPanel
org.zaval.lw.LwPanel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |