public class ComboBoxEditable extends ComboBox implements PressListener, KeyListener
String[] items = {"Ana","Barbara","Raul","Marcelo","Eduardo","Denise","Michelle","Guilherme","Vera","Dulce","Leonardo","Andre","Gustavo","Anne","Renato","Zelia","Helio"};
ComboBoxEditable cbe = new ComboBoxEditable(items);
cbe.qsort();
add(cbe, LEFT,BOTTOM-100);
Control.TranslucentShape| Modifier and Type | Field and Description |
|---|---|
Edit |
edit
The edit used in this ComboBox.
|
arrowStyle, ARROWSTYLE_DOWNDOT, ARROWSTYLE_PAGEFLIP, caption, captionColor, captionIcon, captionPress, checkColor, defaultClearValueInt, disabledColor, enableSearch, fullHeight, fullWidth, iconGap, paddingBottom, paddingLeft, paddingRight, paddingTop, pop, popupTitle, usePopupMenualwaysEraseBackground, BACKGROUND_CYLINDRIC_SHADED, BACKGROUND_SHADED, BACKGROUND_SHADED_INV, BACKGROUND_SOLID, backgroundStyle, BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_ROUNDED, BORDER_SIMPLE, BORDER_TOP, borderColor, borderRadius, children, controlFound, finishedStart, ignoreOnAddAgain, ignoreOnRemove, insets, lastH, lastScreenWidth, lastW, lastX, lastY, numChildren, started, tabOrder, tail, TRANSITION_TIMEAFTER, alphaValue, appId, appObj, asContainer, asWindow, backColor, BEFORE, BOTTOM, BOTTOM_OF, BRIGHTER_BACKGROUND, callListenersOnAllTargets, CENTER, CENTER_OF, clearValueInt, clearValueStr, DARKER_BACKGROUND, DP, effect, enableUpdateScreen, esce, eventsEnabled, FILL, fillColor, FIT, floating, fm, fmH, focusHandler, focusLess, focusOnPenDown, focusTraversable, font, FONTSIZE, foreColor, height, ignoreInsets, isHighlighting, isTablet, KEEP, keepDisabled, keepEnabled, LEFT, next, nextTabControl, npParts, offscreen, offscreen0, onEventFirst, parent, PARENTSIZE, PARENTSIZEMAX, PARENTSIZEMIN, PREFERRED, prev, RANGE, repositionAllowed, RIGHT, RIGHT_OF, SAME, SCREENSIZE, SCREENSIZEMAX, SCREENSIZEMIN, setFont, setH, setRel, setW, setX, SETX_NOT_SET, setY, tempW, textShadowColor, TOP, translucentShape, transparentBackground, uiAdjustmentsBasedOnFontHeightIsSupported, uiAndroid, UICONST, uiFlat, uiHolo, uiMaterial, uiVista, visible, width, WILL_RESIZE, x, y| Constructor and Description |
|---|
ComboBoxEditable() |
ComboBoxEditable(ComboBoxDropDown userPopList) |
ComboBoxEditable(ListBox userListBox) |
ComboBoxEditable(java.lang.Object[] items) |
| Modifier and Type | Method and Description |
|---|---|
void |
actionkeyPressed(KeyEvent e)
An ACTION_KEY_PRESS event was dispatched.
|
void |
controlPressed(ControlEvent e)
A PRESSED event was dispatched.
|
protected void |
drawSelectedItem(Graphics g) |
void |
getFocusableControls(Vector v)
Get a list of child controls of this container which are focus candidates
|
Control |
handleGeographicalFocusChangeKeys(KeyEvent ke)
Used by the main event loop to give the currently focused control an opportunity to act directly on
the KeyEvent.
|
void |
keyPressed(KeyEvent e)
A KEY_PRESS event was dispatched.
|
protected void |
onBoundsChanged(boolean screenChanged)
Called after a setRect.
|
protected void |
onColorsChanged(boolean colorsChanged)
Called after a setEnabled, setForeColor and setBackColor and when a control has
been added to a Container.
|
void |
onEvent(Event e)
Called to process key, pen, control and other posted events.
|
protected void |
onFontChanged()
Passes the font to the pop list
|
void |
popup()
Pops up the ComboBoxDropDown
|
void |
setAutoAdd(boolean on,
boolean keepSorted)
Set to true to add automatically new names that were typed in the edit.
|
void |
specialkeyPressed(KeyEvent ke)
A SPECIAL_KEY_PRESS event was dispatched.
|
void |
unpop()
Closes the open ListBox.
|
add, add, add, add, addWrapping, clear, enableHorizontalScroll, equals, getArrowColor, getItemAt, getItems, getListBox, getPreferredHeight, getPreferredWidth, getSelectedIndex, getSelectedItem, getValue, indexOf, insert, onPaint, qsort, qsort, remove, remove, remove, removeAll, selectLast, setBackForeItemColors, setCursorColor, setItemAt, setNinePatch, setPop, setSelectedIndex, setSelectedIndex, setSelectedItem, setSelectedItem, setSelectedItemStartingWith, setSelectedItemStartingWith, setValue, sidePaint, sideStart, sideStop, size, updatePopRectadd, add, add, add, broadcastEvent, fillBackground, findChild, findNearestChild, findNextFocusControl, getBorderRadius, getBorderStyle, getChildren, getChildrenCount, getClientRect, getClientRect, getFirstChild, getInsets, incLastX, incLastY, initUI, isPressed, moveFocusToNextControl, moveFocusToNextEditable, onAddAgain, onRemove, onSwapFinished, paintChildren, resize, resizeHeight, resizeWidth, setBorderRadius, setBorderStyle, setEnabled, setFocusTraversable, setHighlighting, setInsets, setPressColor, setPressed, swapToTopmostWindow_onEvent, addEnabledStateListener, addFocusListener, addFontChangeHandler, addGridListener, addHandler, addHighlightListener, addKeyListener, addListContainerListener, addMouseListener, addMultiTouchListener, addPenListener, addPressListener, addPushNotificationListener, addSizeChangeHandler, addTimer, addTimer, addTimerListener, addValueChangeHandler, addWindowListener, bringToFront, changeHighlighted, contains, drawTranslucentBackground, getAbsoluteRect, getBackColor, getDoEffect, getEffectH, getEffectW, getEffectX, getEffectY, getEventListeners, getFont, getForeColor, getGap, getGraphics, getHeight, getNext, getParent, getParentWindow, getPos, getPressedEvent, getPrev, getRect, getSize, getTextShadowColor, getWidth, getX, getX2, getY, getY2, hadParentScrolled, hasFocus, internalSetEnabled, intXYWH, isActionEvent, isChildOf, isDisplayed, isEnabled, isFloating, isInsideOrNear, isObscured, isTopMost, isVisible, isVisibleAndInside, onWindowPaintFinished, post, postEvent, postPressedEvent, releaseScreenShot, removeEnabledStateListener, removeFocusListener, removeGridListener, removeHandler, removeHighlightListener, removeKeyListener, removeListContainerListener, removeMouseListener, removeMultiTouchListener, removePenListener, removePressListener, removePushNotificationListener, removeTimer, removeTimerListener, removeWindowListener, repaint, repaintNow, reposition, reposition, repositionChildren, requestFocus, resetSetPositions, resetStyle, safeRepaintNow, safeUpdateScreen, sendToBack, setBackColor, setBackForeColors, setDoEffect, setFloating, setFocusLess, setFont, setForeColor, setNinePatch, setRect, setRect, setRect, setRect, setSet, setTextShadowColor, setTranslucent, setVisible, showTip, takeInitialScreenShot, takeScreenShot, translateFromOrigin, uiStyleChanged, updateScreen, updateTemporary, willOpenKeyboardpublic Edit edit
public ComboBoxEditable()
public ComboBoxEditable(java.lang.Object[] items)
public ComboBoxEditable(ListBox userListBox)
public ComboBoxEditable(ComboBoxDropDown userPopList)
public void setAutoAdd(boolean on,
boolean keepSorted)
on - Flag indicating if autoAdd must be setkeepSorted - If the list must be sorted after a new item is added by the autoAdd.protected void onFontChanged()
ComboBoxonFontChanged in class ComboBoxprotected void onColorsChanged(boolean colorsChanged)
ControlonColorsChanged in class ComboBoxprotected void onBoundsChanged(boolean screenChanged)
ControlonBoundsChanged in class ComboBoxscreenChanged - If the bounds were changed due to a screen change (rotation, collapse)public void onEvent(Event e)
Controlpublic void popup()
ComboBoxprotected void drawSelectedItem(Graphics g)
drawSelectedItem in class ComboBoxpublic void controlPressed(ControlEvent e)
PressListenercontrolPressed in interface PressListenerControlEventpublic void actionkeyPressed(KeyEvent e)
KeyListeneractionkeyPressed in interface KeyListenerKeyEventpublic void keyPressed(KeyEvent e)
KeyListenerkeyPressed in interface KeyListenerKeyEventpublic void specialkeyPressed(KeyEvent ke)
KeyListenerspecialkeyPressed in interface KeyListenerKeyEventpublic void getFocusableControls(Vector v)
ContainergetFocusableControls in class ComboBoxv - A vector into which to add the focus candidates.public Control handleGeographicalFocusChangeKeys(KeyEvent ke)
ControlhandleGeographicalFocusChangeKeys in class ComboBoxke - The KeyEvent to be processedSettings.geographicalFocus