waba.ui
Class PopList
java.lang.Object
|
+--waba.ui.Control
|
+--waba.ui.Container
|
+--waba.ui.Window
|
+--waba.ui.PopList
- public class PopList
- extends Window
PopList 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 |
ListBox |
lb
now this member is public to make this class simple |
Fields inherited from class waba.ui.Window |
beepIfOut,
borderStyle,
canDrag,
eraseBackgroundNow,
flicker,
HIDE_STATE,
highResPrepared,
imgCovered,
lastSwappedContainer,
mainSwapContainer,
menubar,
needsPaint,
NO_BORDER,
RECT_BORDER,
ROUND_BORDER,
TAB_BORDER,
TAB_ONLY_BORDER,
title,
titleFont,
topMost,
VK_BOTTOM,
VK_HIDE,
VK_TOP,
zStack |
Fields inherited from class waba.ui.Container |
BORDER_LOWERED,
BORDER_NONE,
BORDER_RAISED,
BORDER_SIMPLE,
children,
lastH,
lastW,
lastX,
lastY,
parentWindow,
tail |
Fields inherited from class waba.ui.Control |
AFTER,
appId,
asContainer,
asWindow,
backColor,
backDis,
BEFORE,
BOTTOM,
CENTER,
enabled,
FILL,
FIT,
fm,
fmH,
focusLess,
font,
foreColor,
foreDis,
height,
LEFT,
parent,
PREFERRED,
RANGE,
RIGHT,
SAME,
TOP,
visible,
width,
x,
x2,
y,
y2 |
Constructor Summary |
PopList()
Creates a PopList with coordinates that will be set later via the setRect method. |
PopList(ListBox lb)
Creates a PopList 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(int x,
int y)
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 too |
protected void |
onPopup()
Placeholder called imediatly before the popup began. the default implementation does nothing. |
void |
setRect(int x,
int y,
int width,
int height)
Sets the rect for this poplist. |
void |
setRect(int x,
int y,
int width,
int height,
Control relative)
Sets the rect for this poplist. |
void |
setRect(Rect r)
Sets the rect for this poplist. |
Methods inherited from class waba.ui.Window |
_doPaint,
_doPaint,
_postEvent,
damageRect,
destroyZStack,
dontSaveBehind,
getClientRect,
getFocus,
getOffScreen,
getTopMost,
isTopMost,
isVisible,
loadBehind,
makeUnmovable,
onUnpop,
paintTitle,
popupBlockingModal,
popupMenuBar,
popupModal,
postPopup,
postUnpop,
pumpEvents,
saveBehind,
setBorderStyle,
setDoubleBuffer,
setFocus,
setMenuBar,
setStatePosition,
setTitle,
setTitleFont,
swap,
unpop,
validate |
Methods inherited from class waba.ui.Container |
add,
add,
add,
broadcastEvent,
findChild,
getChildren,
onColorsChanged,
onPaint,
onStart,
paintChildren,
remove,
setEnabled |
Methods inherited from class waba.ui.Control |
addTimer,
contains,
createGraphics,
getAbsoluteRect,
getBackColor,
getFont,
getFontMetrics,
getForeColor,
getNext,
getParent,
getParentWindow,
getPos,
getRect,
getSize,
isDisplayed,
isEnabled,
onBoundsChanged,
onWindowPaintFinished,
postEvent,
removeTimer,
repaint,
repaintNow,
requestFocus,
setBackColor,
setBackForeColors,
setFocusLess,
setFont,
setForeColor,
setVisible |
lb
public ListBox lb
- now this member is public to make this class simple
dontHideParent
public boolean dontHideParent
- set to true if want to make the control popup below or above always, and not only if WinCE
fullHeight
public boolean fullHeight
- set to true to make this pop have the screen height
PopList
public PopList()
- Creates a PopList with coordinates that will be set later via the setRect method.
PopList
public PopList(ListBox lb)
- Creates a PopList with the given ListBox. You can extend the ListBox to
draw the items by yourself and use this constructor so the PopList will
use your class and not the default ListBox one. Note that this constructor forces
the ListBox.simpleBorder to true.
onFontChanged
protected void onFontChanged()
- Sets the font of the controls inside this window too
- Overrides:
- onFontChanged in class Control
setRect
public void setRect(Rect r)
- Sets the rect for this poplist. Note: the params must be the
same of the parent control. eg: height = height of the closed ComboBox.
Its used to popup the window so that the parent's area is not hidden.
- Overrides:
- setRect in class Control
setRect
public void setRect(int x,
int y,
int width,
int height)
- Sets the rect for this poplist. Note: the params must be the
same of the parent control. eg: height = height of the closed ComboBox.
Its used to popup the window so that the parent's area is not hidden.
- Overrides:
- setRect in class Control
setRect
public void setRect(int x,
int y,
int width,
int height,
Control relative)
- Sets the rect for this poplist. Note: the params must be the
same of the parent control. eg: height = height of the closed ComboBox.
Its used to popup the window so that the parent's area is not hidden.
- Overrides:
- setRect in class Control
onClickedOutside
protected boolean onClickedOutside(int x,
int y)
- Close the popup list with a click outside its bounds
- Overrides:
- onClickedOutside in class Window
onEvent
public void onEvent(Event event)
- Description copied from class: Control
- Called to process key, pen, control and other posted events.
- Overrides:
- onEvent in class Control
- Tags copied from class: Control
- Parameters:
event
- the event to process- See Also:
Event
,
KeyEvent
,
PenEvent
getPreferredWidth
public int getPreferredWidth()
- Description copied from class: Window
- Returns the size of the title if any plus the size of the border.
Note that the value returned here does not handle the controls inside the
window.
- Overrides:
- getPreferredWidth in class Window
getPreferredHeight
public int getPreferredHeight()
- Description copied from class: Window
- Returns the size of the title if any plus the size of the border.
Note that the value returned here does not handle the controls inside the
window.
- Overrides:
- getPreferredHeight in class Window
onPopup
protected void onPopup()
- Description copied from class: Window
- Placeholder called imediatly before the popup began. the default implementation does nothing.
- Overrides:
- onPopup in class Window