qx.ui.form
Class ComboBox<T>

java.lang.Object
  extended by qx.core.Object
      extended by qx.core.Target
          extended by qx.ui.core.Widget
              extended by qx.ui.core.Parent
                  extended by qx.ui.layout.BoxLayout
                      extended by qx.ui.layout.HorizontalBoxLayout
                          extended by qx.ui.form.ComboBox<T>

public class ComboBox<T>
extends HorizontalBoxLayout

A combo-box for qooxdoo.

The major additional feature compared to typical select fields is that it allows it to be editable. Also images are supported inside the popup list.

Features:


Field Summary
 
Fields inherited from class qx.ui.core.Widget
AUTO
 
Constructor Summary
ComboBox()
           
 
Method Summary
 void _applyEditable(java.lang.Object value, java.lang.Object old)
           
 void _applySelected(java.lang.Object value, java.lang.Object old)
           
 void _applyValue(java.lang.Object value, java.lang.Object old)
           
 void _closePopup()
          Hides the popup and disables the event capturing.
 void _onbeforedisappear(Event e)
          Listener method for the “disappear” event of the combo box.
 void _onclick(MouseEvent e)
          Listener method of the “click” event of the combo box.
 void _oninput(DataEvent e)
          Listener method for the “input” event of the text field widget
 void _onkeydown(KeyEvent e)
          Listener method for “keyDown” event of the combo box.
 void _onkeyinput(KeyEvent e)
          Listener method for the “keyInput” event of combo box.
 void _onkeypress(KeyEvent e)
          Listener method for the “keyPress” event of the combo box.
 void _onlocalechange(ChangeEvent e)
          Listener method for the “changeLocale” event of the locale manager
 void _onmousedown(MouseEvent e)
          Listener method of the “mousedown” event of the combo box.
 void _onmouseover(MouseEvent e)
          Listener method for the “mouseOver” event of the combo box.
 void _onmouseup(MouseEvent e)
          Listener method for the mouseUp event of the combo box.
 void _onmousewheel(MouseEvent e)
          Listener method for the “mouseWheel” event of the combo box.
 void _onpopupappear(Event e)
          Listener method for the “appear” event of the popup widget
 void _openPopup()
          Sets the position and width of the popup.
 void _testClosePopup()
          Closes the popup widget if it is seeable.
 void _togglePopup()
          Toggle opening/closing of the popup widget.
 void _visualizeBlur()
          Invokes the blur method directly at the DOM elements and removes the “focused” state.
 void _visualizeFocus()
          Invokes the focus method directly at the DOM elements and adds the “focused” state.
 void addString(java.lang.String text, T value)
           
 void addValue(T value)
           
 java.util.List<Widget> children()
           
 void children(java.util.List<? extends Widget> result)
           
static
<E extends java.lang.Enum>
ComboBox<E>
createE(E[] values)
           
static
<T> ComboBox<T>
createList(java.util.List<T> values)
           
static
<T> ComboBox<T>
createT(T[] values)
           
 Atom getButton()
          Accessor method for the button widget
 boolean getEditable()
          Returns the (computed) value of the property editable.
 TextField getField()
          Accessor method for the text field widget
 List getList()
          Accessor method for the list widget
 SelectionManager getManager()
          Accessor method for the selection manager
 java.lang.Integer getPagingInterval()
          Returns the (computed) value of the property pagingInterval.
 Popup getPopup()
          Accessor method for the popup widget
 ListItem getSelected()
          Returns the (computed) value of the property selected.
 T getSelectedValue()
          TODO: difference to getValue/setValue
 java.lang.String getValue()
          Returns the (computed) value of the property value.
 void initEditable(boolean arg)
          Calls the apply method and dispatches the change event of the property editable with the default value defined by the class developer.
 void initPagingInterval(java.lang.Integer arg)
          Calls the apply method and dispatches the change event of the property pagingInterval with the default value defined by the class developer.
 void initSelected(ListItem arg)
          Calls the apply method and dispatches the change event of the property selected with the default value defined by the class developer.
 void initValue(java.lang.String arg)
          Calls the apply method and dispatches the change event of the property value with the default value defined by the class developer.
 boolean isEditable()
          Check whether the (computed) value of the boolean property editable equals true.
 ListItem<T> lookup(T value)
           
 void resetEditable()
          Resets the user value of the property editable.
 void resetPagingInterval()
          Resets the user value of the property pagingInterval.
 void resetSelected()
          Resets the user value of the property selected.
 void resetValue()
          Resets the user value of the property value.
 void setEditable(boolean arg)
          Sets the user value of the property editable.
 void setPagingInterval(java.lang.Integer arg)
          Sets the user value of the property pagingInterval.
 void setSelected(ListItem arg)
          Sets the user value of the property selected.
 void setSelectedValue(T value)
           
 void setValue(java.lang.String arg)
          Sets the user value of the property value.
 boolean toggleEditable()
          Toggles the (computed) value of the boolean property editable.
 
Methods inherited from class qx.ui.layout.BoxLayout
_applyHorizontalChildrenAlign, _applyOrientation, _applyReverseChildrenOrder, _applySpacing, _applyStretchChildrenOrthogonalAxis, _applyUseAdvancedFlexAllocation, _applyVerticalChildrenAlign, _computeAccumulatedChildrenOuterHeight, _computeAccumulatedChildrenOuterWidth, _createLayoutImpl, _doLayout, _doLayoutOrder, _invalidateLayoutMode, _recomputeChildrenStretchingX, _recomputeChildrenStretchingY, _updateLayoutMode, getHorizontalChildrenAlign, getLayoutMode, getOrientation, getReverseChildrenOrder, getSpacing, getStretchChildrenOrthogonalAxis, getUseAdvancedFlexAllocation, getVerticalChildrenAlign, initHorizontalChildrenAlign, initOrientation, initReverseChildrenOrder, initSpacing, initStretchChildrenOrthogonalAxis, initUseAdvancedFlexAllocation, initVerticalChildrenAlign, isHorizontal, isReverseChildrenOrder, isStretchChildrenOrthogonalAxis, isUseAdvancedFlexAllocation, isVertical, resetHorizontalChildrenAlign, resetOrientation, resetReverseChildrenOrder, resetSpacing, resetStretchChildrenOrthogonalAxis, resetUseAdvancedFlexAllocation, resetVerticalChildrenAlign, setHorizontalChildrenAlign, setOrientation, setReverseChildrenOrder, setSpacing, setStretchChildrenOrthogonalAxis, setUseAdvancedFlexAllocation, setVerticalChildrenAlign, toggleReverseChildrenOrder, toggleStretchChildrenOrthogonalAxis, toggleUseAdvancedFlexAllocation
 
Methods inherited from class qx.ui.core.Parent
_addChildrenToLayoutQueue, _addChildrenToStateQueue, _addChildToChildrenQueue, _afterAppear, _afterDisappear, _afterInsertDom, _afterRemoveDom, _applyActiveChild, _applyFocusedChild, _applyFocusHandler, _beforeAppear, _beforeDisappear, _beforeInsertDom, _beforeRemoveDom, _changeInnerHeight, _changeInnerWidth, _computePreferredInnerHeight, _computePreferredInnerWidth, _computeVisibleChildren, _flushChildrenQueue, _handleDisplayableCustom, _layoutChild, _layoutPost, _onfocuskeyevent, _recursiveAppearanceThemeUpdate, _removeChildFromChildrenQueue, activateFocusRoot, add, addAfter, addAt, addAtBegin, addAtEnd, addBefore, contains, forEachChild, forEachVisibleChild, getActiveChild, getChildren, getChildrenLength, getFirstActiveChild, getFirstChild, getFirstVisibleChild, getFocusedChild, getFocusHandler, getFocusRoot, getInnerHeightForChild, getInnerWidthForChild, getLastActiveChild, getLastChild, getLastVisibleChild, getLayoutImpl, getVisibleChildrenLength, hasChildren, hasVisibleChildren, indexOf, initActiveChild, initFocusedChild, initFocusHandler, isEmpty, isFocusRoot, isVisibleEmpty, recursiveAddToStateQueue, remapChildrenHandlingTo, remove, removeAll, removeAt, resetActiveChild, resetFocusedChild, resetFocusHandler, setActiveChild, setFocusedChild, setFocusHandler
 
Methods inherited from class qx.ui.core.Widget
_applyAppearance, _applyBackgroundColor, _applyBackgroundImage, _applyBackgroundRepeat, _applyBorder, _applyBottom, _applyCapture, _applyClip, _applyCommand, _applyCursor, _applyDisplay, _applyElement, _applyElementData, _applyEnabled, _applyFocused, _applyFont, _applyHeight, _applyHideFocus, _applyHtmlAttributes, _applyHtmlProperties, _applyLeft, _applyMarginBottom, _applyMarginLeft, _applyMarginRight, _applyMarginTop, _applyMaxHeight, _applyMaxWidth, _applyMinHeight, _applyMinWidth, _applyOpacity, _applyOverflow, _applyPaddingBottom, _applyPaddingLeft, _applyPaddingRight, _applyPaddingTop, _applyParent, _applyRight, _applySelectable, _applyStateStyleFocus, _applyStyleProperties, _applyTabIndex, _applyTextColor, _applyTop, _applyVisibility, _applyWidth, _applyZIndex, _checkParent, _compileClipString, _computeBoxHeight, _computeBoxHeightFallback, _computeBoxWidth, _computeBoxWidthFallback, _computeDisplayable, _computeFrameHeight, _computeFrameWidth, _computeHasAutoX, _computeHasAutoY, _computeHasFlexX, _computeHasFlexY, _computeHasPercentX, _computeHasPercentY, _computeInnerHeight, _computeInnerWidth, _computeOuterHeight, _computeOuterWidth, _computePreferredBoxHeight, _computePreferredBoxWidth, _computeValuePercentX, _computeValuePercentXLimit, _computeValuePercentY, _computeValuePercentYLimit, _computeValuePixel, _computeValuePixelLimit, _createElementImpl, _evalUnitsPixelPercent, _evalUnitsPixelPercentAuto, _evalUnitsPixelPercentAutoFlex, _flushJobQueue, _generateHtmlId, _getTargetNode, _handleDisplayable, _invalidateFrameDimensions, _invalidatePreferredInnerDimensions, _queueBorder, _recomputeFlexX, _recomputeFlexY, _recomputePercentX, _recomputePercentY, _recomputeRangeX, _recomputeRangeY, _recomputeStretchingX, _recomputeStretchingY, _renderAppearance, _renderOverflow, _resetAppearanceThemeWrapper, _styleBackgroundColor, _styleBackgroundImage, _styleFromMap, _unitDetectionPixelPercent, _unitDetectionPixelPercentAuto, _unitDetectionPixelPercentAutoFlex, _unstyleFromArray, _visualPropertyCheck, addState, addToDocument, addToJobQueue, addToLayoutChanges, addToQueue, addToQueueRuntime, addToStateQueue, auto, blur, connect, contains, disconnect, execute, focus, getAllowStretchX, getAllowStretchY, getAnonymous, getAppearance, getBackgroundColor, getBackgroundImage, getBackgroundRepeat, getBorder, getBottom, getBottomValue, getCapture, getClientHeight, getClientWidth, getClipHeight, getClipLeft, getClipTop, getClipWidth, getCommand, getContextMenu, getCursor, getDisplay, getDropDataTypes, getElement, getEnabled, getEnableElementFocus, getFocused, getFont, getHeight, getHeightValue, getHideFocus, getHorizontalAlign, getHtmlAttribute, getHtmlProperty, getLeft, getLeftValue, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getMaxHeight, getMaxHeightValue, getMaxWidth, getMaxWidthValue, getMinHeight, getMinHeightValue, getMinWidth, getMinWidthValue, getNeededHeight, getNeededWidth, getNextActiveSibling, getNextSibling, getNextVisibleSibling, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOpacity, getOverflow, getOverflowX, getOverflowY, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getPreviousActiveSibling, getPreviousSibling, getPreviousVisibleSibling, getRight, getRightValue, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getSelectable, getStyleProperty, getSupportsDropMethod, getTabIndex, getTextColor, getToolTip, getTop, getTopLevelWidget, getTopValue, getVerticalAlign, getVisibility, getVisibleChildren, getWidth, getWidthValue, getZIndex, hasState, hide, indexOf, initAllowStretchX, initAllowStretchY, initAnonymous, initAppearance, initBackgroundColor, initBackgroundImage, initBackgroundRepeat, initBorder, initBottom, initCapture, initClipHeight, initClipLeft, initClipTop, initClipWidth, initCommand, initContextMenu, initCursor, initDisplay, initDropDataTypes, initElement, initEnabled, initEnableElementFocus, initFocused, initFont, initHeight, initHideFocus, initHorizontalAlign, initLeft, initMarginBottom, initMarginLeft, initMarginRight, initMarginTop, initMaxHeight, initMaxWidth, initMinHeight, initMinWidth, initOpacity, initOverflow, initPaddingBottom, initPaddingLeft, initPaddingRight, initPaddingTop, initParent, initRight, initSelectable, initSupportsDropMethod, initTabIndex, initTextColor, initToolTip, initTop, initVerticalAlign, initVisibility, initWidth, initZIndex, isAllowStretchX, isAllowStretchY, isAnonymous, isAppearRelevant, isCapture, isCreated, isDisplay, isDisplayable, isEnabled, isEnableElementFocus, isFirstChild, isFirstVisibleChild, isFocusable, isFocused, isHideFocus, isLastChild, isLastVisibleChild, isMaterialized, isSeeable, isSelectable, isVisibility, moveSelfAfter, moveSelfBefore, moveSelfToBegin, moveSelfToEnd, pack, removeHtmlAttribute, removeHtmlProperty, removeState, removeStyleProperty, renderPadding, resetAlign, resetAllowStretchX, resetAllowStretchY, resetAnonymous, resetAppearance, resetBackgroundColor, resetBackgroundImage, resetBackgroundRepeat, resetBorder, resetBottom, resetCapture, resetClip, resetClipDimension, resetClipHeight, resetClipLeft, resetClipLocation, resetClipTop, resetClipWidth, resetCommand, resetContextMenu, resetCursor, resetDimension, resetDisplay, resetDropDataTypes, resetEdge, resetElement, resetEnabled, resetEnableElementFocus, resetFocused, resetFont, resetHeight, resetHeights, resetHideFocus, resetHorizontalAlign, resetLeft, resetLocation, resetMargin, resetMarginBottom, resetMarginLeft, resetMarginRight, resetMarginTop, resetMaxHeight, resetMaxWidth, resetMinHeight, resetMinWidth, resetOpacity, resetOverflow, resetPadding, resetPaddingBottom, resetPaddingLeft, resetPaddingRight, resetPaddingTop, resetParent, resetRight, resetSelectable, resetSpace, resetSupportsDropMethod, resetTabIndex, resetTextColor, resetToolTip, resetTop, resetVerticalAlign, resetVisibility, resetWidth, resetWidths, resetZIndex, scrollIntoView, scrollIntoViewX, scrollIntoViewY, setAlign, setAllowStretchX, setAllowStretchY, setAnonymous, setAppearance, setBackgroundColor, setBackgroundImage, setBackgroundRepeat, setBorder, setBottom, setCapture, setClip, setClipDimension, setClipHeight, setClipLeft, setClipLocation, setClipTop, setClipWidth, setCommand, setContextMenu, setCursor, setDimension, setDisplay, setDropDataTypes, setEdge, setElement, setEnabled, setEnableElementFocus, setFocused, setFont, setHeight, setHeights, setHideFocus, setHorizontalAlign, setHtmlAttribute, setHtmlProperty, setLeft, setLocation, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOpacity, setOverflow, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setParent, setRight, setScrollLeft, setScrollTop, setSelectable, setSpace, setStyleProperty, setSupportsDropMethod, setTabIndex, setTextColor, setToolTip, setTop, setVerticalAlign, setVisibility, setWidth, setWidths, setZIndex, show, supportsDrop, toggleAllowStretchX, toggleAllowStretchY, toggleAnonymous, toggleCapture, toggleDisplay, toggleEnabled, toggleEnableElementFocus, toggleFocused, toggleHideFocus, toggleSelectable, toggleVisibility
 
Methods inherited from class qx.core.Target
_dispatchEvent, addChangeSelectionListener, addChangeValueListener, addEventListener, addExecuteListener, addJavaEventListener, createDispatchChangeEvent, createDispatchDataEvent, createDispatchEvent, dispatchEvent, hasEventListeners, removeEventListener
 
Methods inherited from class qx.core.Object
_disposeFields, _disposeObjectDeep, _disposeObjects, base, dispose, get, getDisposed, isDisposed, reset, self, set, toHashCode, toString_
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComboBox

public ComboBox()
Method Detail

_applyEditable

public void _applyEditable(java.lang.Object value,
                           java.lang.Object old)

_applySelected

public void _applySelected(java.lang.Object value,
                           java.lang.Object old)

_applyValue

public void _applyValue(java.lang.Object value,
                        java.lang.Object old)

_closePopup

public void _closePopup()

Hides the popup and disables the event capturing.


_onbeforedisappear

public void _onbeforedisappear(Event e)

Listener method for the “disappear” event of the combo box. Only tests if the popup widget is closed.


_onclick

public void _onclick(MouseEvent e)

Listener method of the “click” event of the combo box.

Opens the popup or delegates the event to the list widget if the user clicked on the list. Hides the popup and release the event capturing if the user is clicking outside the combo box.


_oninput

public void _oninput(DataEvent e)

Listener method for the “input” event of the text field widget


_onkeydown

public void _onkeydown(KeyEvent e)

Listener method for “keyDown” event of the combo box.

Handles hitting “Enter”, “Escape” and “Alt+Down”.


_onkeyinput

public void _onkeyinput(KeyEvent e)

Listener method for the “keyInput” event of combo box.


_onkeypress

public void _onkeypress(KeyEvent e)

Listener method for the “keyPress” event of the combo box.

Handles especially hitting “PageUp” and “PageDown”. If the user hits other keys a match is searched and (if found) selected.


_onlocalechange

public void _onlocalechange(ChangeEvent e)

Listener method for the “changeLocale” event of the locale manager


_onmousedown

public void _onmousedown(MouseEvent e)

Listener method of the “mousedown” event of the combo box.


_onmouseover

public void _onmouseover(MouseEvent e)

Listener method for the “mouseOver” event of the combo box.

Delegates the control the selection manager if target is a listitem widget.


_onmouseup

public void _onmouseup(MouseEvent e)

Listener method for the mouseUp event of the combo box.


_onmousewheel

public void _onmousewheel(MouseEvent e)

Listener method for the “mouseWheel” event of the combo box.

Only works if the popup is not seeable.


_onpopupappear

public void _onpopupappear(Event e)

Listener method for the “appear” event of the popup widget


_openPopup

public void _openPopup()

Sets the position and width of the popup. Additionally dispatches an event if the popup is opened the first time. Enables the event capturing.


_testClosePopup

public void _testClosePopup()

Closes the popup widget if it is seeable. Used e.g. as listener method for the “windowblur” event.


_togglePopup

public void _togglePopup()

Toggle opening/closing of the popup widget.


_visualizeBlur

public void _visualizeBlur()

Invokes the blur method directly at the DOM elements and removes the “focused” state.

Overrides:
_visualizeBlur in class Widget

_visualizeFocus

public void _visualizeFocus()

Invokes the focus method directly at the DOM elements and adds the “focused” state.

Overrides:
_visualizeFocus in class Widget

getButton

public Atom getButton()

Accessor method for the button widget


getEditable

public boolean getEditable()

Returns the (computed) value of the property editable.

For further details take a look at the property definition: editable.


getField

public TextField getField()

Accessor method for the text field widget


getList

public List getList()

Accessor method for the list widget


getManager

public SelectionManager getManager()

Accessor method for the selection manager


getPagingInterval

public java.lang.Integer getPagingInterval()

Returns the (computed) value of the property pagingInterval.

For further details take a look at the property definition: pagingInterval.


getPopup

public Popup getPopup()

Accessor method for the popup widget


getSelected

public ListItem getSelected()

Returns the (computed) value of the property selected.

For further details take a look at the property definition: selected.


getValue

public java.lang.String getValue()

Returns the (computed) value of the property value.

For further details take a look at the property definition: value.


initEditable

public void initEditable(boolean arg)

Calls the apply method and dispatches the change event of the property editable with the default value defined by the class developer. This function can only be called from the constructor of a class.

For further details take a look at the property definition: editable.


initPagingInterval

public void initPagingInterval(java.lang.Integer arg)

Calls the apply method and dispatches the change event of the property pagingInterval with the default value defined by the class developer. This function can only be called from the constructor of a class.

For further details take a look at the property definition: pagingInterval.


initSelected

public void initSelected(ListItem arg)

Calls the apply method and dispatches the change event of the property selected with the default value defined by the class developer. This function can only be called from the constructor of a class.

For further details take a look at the property definition: selected.


initValue

public void initValue(java.lang.String arg)

Calls the apply method and dispatches the change event of the property value with the default value defined by the class developer. This function can only be called from the constructor of a class.

For further details take a look at the property definition: value.


isEditable

public boolean isEditable()

Check whether the (computed) value of the boolean property editable equals true.

For further details take a look at the property definition: editable.


resetEditable

public void resetEditable()

Resets the user value of the property editable.

The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.

For further details take a look at the property definition: editable.


resetPagingInterval

public void resetPagingInterval()

Resets the user value of the property pagingInterval.

The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.

For further details take a look at the property definition: pagingInterval.


resetSelected

public void resetSelected()

Resets the user value of the property selected.

The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.

For further details take a look at the property definition: selected.


resetValue

public void resetValue()

Resets the user value of the property value.

The computed value falls back to the next available value e.g. appearance, init or inheritance value depeneding on the property configuration and value availability.

For further details take a look at the property definition: value.


setEditable

public void setEditable(boolean arg)

Sets the user value of the property editable.

For further details take a look at the property definition: editable.


setPagingInterval

public void setPagingInterval(java.lang.Integer arg)

Sets the user value of the property pagingInterval.

For further details take a look at the property definition: pagingInterval.


setSelected

public void setSelected(ListItem arg)

Sets the user value of the property selected.

For further details take a look at the property definition: selected.


setValue

public void setValue(java.lang.String arg)

Sets the user value of the property value.

For further details take a look at the property definition: value.


toggleEditable

public boolean toggleEditable()

Toggles the (computed) value of the boolean property editable.

For further details take a look at the property definition: editable.


createE

public static <E extends java.lang.Enum> ComboBox<E> createE(E[] values)

createT

public static <T> ComboBox<T> createT(T[] values)

createList

public static <T> ComboBox<T> createList(java.util.List<T> values)

children

public java.util.List<Widget> children()

children

public void children(java.util.List<? extends Widget> result)

getSelectedValue

public T getSelectedValue()
TODO: difference to getValue/setValue


setSelectedValue

public void setSelectedValue(T value)

lookup

public ListItem<T> lookup(T value)

addValue

public void addValue(T value)

addString

public void addString(java.lang.String text,
                      T value)


Copyright © 2008 1&1. All Rights Reserved.