|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
totalcross.lang.Objecttotalcross.ui.gfx.GfxSurface
totalcross.ui.Control
totalcross.ui.Container
totalcross.ui.Window
totalcross.ui.ComboBoxDropDown
public class ComboBoxDropDown
ComboBoxDropDown is a simple implementation of a PopUp Listbox. Used by the ComboBox class.
| Field Summary | |
|---|---|
boolean |
dontHideParent
Set to true if want to make the control popup below or above always, and not only if WinCE |
boolean |
fullHeight
Set to true to make this pop have the screen height |
boolean |
fullWidth
Set to true to make this popup have the screen width |
ListBox |
lb
The assigned ListBox. |
| Fields inherited from class totalcross.ui.Container |
|---|
alwaysEraseBackground, BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_SIMPLE, children, controlFound, finishedStart, ignoreOnAddAgain, ignoreOnRemove, insets, lastH, lastScreenWidth, lastW, nextTransitionEffect, started, tabOrder, tail, TRANSITION_CLOSE, TRANSITION_NONE, TRANSITION_OPEN, transitionEffect |
| Fields inherited from class totalcross.ui.Control |
|---|
AFTER, appId, appObj, asContainer, asWindow, backColor, BEFORE, BOTTOM, BOTTOM_OF, CENTER, CENTER_OF, clearValueInt, clearValueStr, enabled, enableUpdateScreen, FILL, FIT, fm, fmH, focusHandler, focusLess, focusOnPenDown, focusTraversable, font, foreColor, height, isHighlighting, KEEP, LEFT, onEventFirst, parent, PREFERRED, RANGE, repositionAllowed, RIGHT, RIGHT_OF, SAME, setFont, setH, setRel, setW, setX, setY, TOP, transparentBackground, uiCE, uiFlat, uiPalm, uiVista, visible, width, WILL_RESIZE, x, y |
| Constructor Summary | |
|---|---|
ComboBoxDropDown()
Creates a ComboBoxDropDown with coordinates that will be set later via the setRect method. |
|
ComboBoxDropDown(ListBox lb)
Creates a ComboBoxDropDown with the given ListBox. |
|
| Method Summary | |
|---|---|
int |
getPreferredHeight()
Returns the size of the title if any plus the size of the border. |
int |
getPreferredWidth()
Returns the size of the title if any plus the size of the border. |
protected boolean |
onClickedOutside(PenEvent event)
Close the popup list with a click outside its bounds |
void |
onEvent(Event event)
Called to process key, pen, control and other posted events. |
protected void |
onFontChanged()
Sets the font of the controls inside this window |
protected void |
onPopup()
Placeholder called imediatly before the popup began. |
protected void |
postUnpop()
Placeholder called after the unpop is done and after the repaint of the other window. |
void |
setRect(int x,
int y,
int width,
int height,
Control relative,
boolean screenChanged)
Sets the absolute rect of the parent's control. |
| Methods inherited from class totalcross.ui.Window |
|---|
_doPaint, _postEvent, destroyZStack, drawHighlight, getBorderStyle, getClientRect, getClientRect, getFocus, getHighlighted, getTitleFont, getTopMost, handleFocusChangeKeys, isFlickEnabled, isFlicking, isTopMost, isVisible, loadBehind, makeUnmovable, onUnpop, paintTitle, popup, popupMenuBar, popupNonBlocking, postPopup, postPressedEvent, pumpEvents, releaseFlickTimer, removeFocus, repaintActiveWindows, resize, resizeHeight, resizeWidth, screenResized, setBorderStyle, setDeviceTitle, setFlickEnabled, setFocus, setGrabPenEvents, setHighlighted, setMenuBar, setSIP, setTitle, setTitleFont, swap, swapFocus, unpop, validate |
| Methods inherited from class totalcross.ui.Container |
|---|
add, add, add, add, add, broadcastEvent, clear, findChild, findNearestChild, findNextFocusControl, getChildren, getFocusableControls, getInsets, incLastX, incLastY, initUI, onAddAgain, onColorsChanged, onPaint, onRemove, paintChildren, remove, removeAll, setEnabled, setHighlighting, setInsets, swapToTopmostWindow |
| Methods inherited from class totalcross.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public ListBox lb
public boolean dontHideParent
public boolean fullHeight
public boolean fullWidth
| Constructor Detail |
|---|
public ComboBoxDropDown()
public ComboBoxDropDown(ListBox lb)
| Method Detail |
|---|
protected void onFontChanged()
onFontChanged in class Control
public void setRect(int x,
int y,
int width,
int height,
Control relative,
boolean screenChanged)
setRect in class Controlx - One of the relative positioning constants: LEFT, RIGHT, SAME, BEFORE, AFTER, CENTER, with a small adjustment. You can also use an absolute value, but this is strongly discouraged.y - One of the relative positioning constants: TOP, BOTTOM, SAME, BEFORE, AFTER, CENTER, with a small adjustment. You can also use an absolute value, but this is strongly discouraged.width - One of the relative positioning constants: PREFERRED, FILL, FIT, SAME. You can also use an absolute value, but this is strongly discouraged.height - One of the relative positioning constants: PREFERRED, FILL, FIT, SAME. You can also use an absolute value, but this is strongly discouraged.relative - To whom the position should be relative to; or null to be relative to the last control.screenChanged - Indicates that a screen change (resize, collapse) occured and the reposition method is calling this method. Set by the system. If you call this method directly, always pass false to it.Control.LEFT,
Control.TOP,
Control.RIGHT,
Control.BOTTOM,
Control.BEFORE,
Control.AFTER,
Control.CENTER,
Control.SAME,
Control.FILL,
Control.PREFERRED,
Control.FIT,
Control.CENTER_OF,
Control.RIGHT_OF,
Control.BOTTOM_OF,
Container.add(Control, int, int),
Container.add(Control, int, int, Control)protected boolean onClickedOutside(PenEvent event)
onClickedOutside in class Windowpublic void onEvent(Event event)
Control
onEvent in class Controlevent - the event to processEvent,
KeyEvent,
PenEventpublic int getPreferredWidth()
Window
getPreferredWidth in class Windowpublic int getPreferredHeight()
Window
getPreferredHeight in class Windowprotected void onPopup()
Window
onPopup in class Windowprotected void postUnpop()
Window
postUnpop in class Window
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||