Package muntjac :: Package ui :: Module combo_box :: Class ComboBox
[hide private]
[frames] | no frames]

Class ComboBox

source code

                            object --+                            
                                     |                            
                   util.IEventListener --+                        
                                         |                        
             terminal.paintable.IPaintable --+                    
                                             |                    
                                object --+   |                    
                                         |   |                    
    terminal.variable_owner.IVariableOwner --+                    
                                             |                    
                                object --+   |                    
                                         |   |                    
               terminal.sizeable.ISizeable --+                    
                                             |                    
                          component.IComponent --+                
                                                 |                
                                    object --+   |                
                                             |   |                
  event.method_event_source.IMethodEventSource --+                
                                                 |                
              abstract_component.AbstractComponent --+            
                                                     |            
                                object --+           |            
                                         |           |            
                   data.buffered.IBuffered --+       |            
                                             |       |            
                                object --+   |       |            
                                         |   |       |            
             data.validatable.IValidatable --+       |            
                                             |       |            
            data.buffered.IBufferedValidatable --+   |            
                                                 |   |            
                                    object --+   |   |            
                                             |   |   |            
            data.property.IValueChangeNotifier --+   |            
                                                 |   |            
                                    object --+   |   |            
                                             |   |   |            
            data.property.IValueChangeListener --+   |            
                                                 |   |            
                                object --+       |   |            
                                         |       |   |            
                     data.property.IViewer --+   |   |            
                                             |   |   |            
                         data.property.IEditor --+   |            
                                                 |   |            
                        object --+               |   |            
                                 |               |   |            
               util.IEventListener --+           |   |            
                                     |           |   |            
         terminal.paintable.IPaintable --+       |   |            
                                         |       |   |            
                            object --+   |       |   |            
                                     |   |       |   |            
terminal.variable_owner.IVariableOwner --+       |   |            
                                         |       |   |            
                            object --+   |       |   |            
                                     |   |       |   |            
           terminal.sizeable.ISizeable --+       |   |            
                                         |       |   |            
                      component.IComponent --+   |   |            
                                             |   |   |            
                          component.IFocusable --+   |            
                                                 |   |            
                                      field.IField --+            
                                                     |            
                                        object --+   |            
                                                 |   |            
                    event.action.IShortcutNotifier --+            
                                                     |            
                                        object --+   |            
                                                 |   |            
       data.property.IReadOnlyStatusChangeNotifier --+            
                                                     |            
                                        object --+   |            
                                                 |   |            
       data.property.IReadOnlyStatusChangeListener --+            
                                                     |            
                          abstract_field.AbstractField --+        
                                                         |        
                                            object --+   |        
                                                     |   |        
                             data.container.IContainer --+        
                                                         |        
                                            object --+   |        
                                                     |   |        
                                data.container.IViewer --+        
                                                         |        
                                            object --+   |        
                                                     |   |        
             data.container.IPropertySetChangeListener --+        
                                                         |        
                                            object --+   |        
                                                     |   |        
             data.container.IPropertySetChangeNotifier --+        
                                                         |        
                                            object --+   |        
                                                     |   |        
                 data.container.IItemSetChangeNotifier --+        
                                                         |        
                                            object --+   |        
                                                     |   |        
                 data.container.IItemSetChangeListener --+        
                                                         |        
                            abstract_select.AbstractSelect --+    
                                                             |    
                                                object --+   |    
                                                         |   |    
                                abstract_select.IFiltering --+    
                                                             |    
                                                object --+   |    
                                                         |   |    
                          event.field_events.IBlurNotifier --+    
                                                             |    
                                                object --+   |    
                                                         |   |    
                         event.field_events.IFocusNotifier --+    
                                                             |    
                                                 select.Select --+
                                                                 |
                                                                ComboBox

A filtering dropdown single-select. Suitable for newItemsAllowed, but it's turned of by default to avoid mistakes. Items are filtered based on user input, and loaded dynamically ("lazy-loading") from the server. You can turn on newItemsAllowed and change filtering mode (and also turn it off), but you can not turn on multi-select mode.

Instance Methods [hide private]
 
__init__(self, *args)
Creates an empty Select with caption, that is connected to a data-source or is filled from a collection of option values.
source code
 
setMultiSelect(self, multiSelect)
Sets the multiselect mode.
source code
 
getInputPrompt(self)
Gets the current input prompt.
source code
 
setInputPrompt(self, inputPrompt)
Sets the input prompt - a textual prompt that is displayed when the select would otherwise be empty, to prompt the user for input.
source code
 
paintContent(self, target)
Paints the content of this component.
source code
 
setTextInputAllowed(self, textInputAllowed)
Sets whether it is possible to input text into the field or whether the field area of the component is just used to show what is selected.
source code
 
isTextInputAllowed(self)
Returns true if the user can enter text into the field to either filter the selections or enter a new value if :{isNewItemsAllowed} returns true.
source code

Inherited from select.Select: addCallback, addListener, adjustCurrentPage, buildFilter, changeVariables, containerItemSetChange, getColumns, getFilteredOptions, getFilteringMode, getFirstItemIndexOnCurrentPage, getLastItemIndexOnCurrentPage, getOptionsWithFilter, isMultiSelect, isScrollToSelectedItem, optionRepaint, removeCallback, removeListener, requestRepaint, sanitetizeList, setColumns, setFilteringMode, setScrollToSelectedItem

Inherited from abstract_select.AbstractSelect: __len__, addContainerProperty, addItem, attach, containerPropertySetChange, containsId, detach, fireItemSetChange, firePropertySetChange, getCaptionChangeListener, getContainerDataSource, getContainerProperty, getContainerPropertyIds, getItem, getItemCaption, getItemCaptionMode, getItemCaptionPropertyId, getItemIcon, getItemIconPropertyId, getItemIds, getListeners, getNewItemHandler, getNullSelectionItemId, getType, getValue, getVisibleItemIds, isEmpty, isNewItemsAllowed, isNullSelectionAllowed, isSelected, paintItem, removeAllItems, removeContainerProperty, removeItem, select, setContainerDataSource, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIcon, setItemIconPropertyId, setNewItemHandler, setNewItemsAllowed, setNullSelectionAllowed, setNullSelectionItemId, setValue, size, unselect

Inherited from abstract_field.AbstractField: __str__, addShortcutListener, addValidator, commit, discard, fireReadOnlyStatusChange, fireValueChange, focus, getActionManager, getErrorMessage, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isRequired, isValid, isValidationVisible, isWriteThrough, readOnlyStatusChange, readValueFromProperty, removeShortcutListener, removeValidator, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadOnly, setReadThrough, setRequired, setRequiredError, setTabIndex, setValidationVisible, setWriteThrough, shouldHideErrors, validate, valueChange

Inherited from abstract_component.AbstractComponent: __getstate__, __setstate__, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, fireRequestRepaintEvent, getApplication, getCSSHeight, getCSSWidth, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getHeight, getHeightUnits, getIcon, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, hasListeners, isEnabled, isImmediate, isVisible, paint, parseStringSize, registerCallback, registerListener, removeStyleName, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidthUnits, withdrawCallback, withdrawListener

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from abstract_field.AbstractField: constructField

Class Variables [hide private]
  CLIENT_WIDGET = None
hash(x)

Inherited from abstract_select.AbstractSelect: ITEM_CAPTION_MODE_EXPLICIT, ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID, ITEM_CAPTION_MODE_ICON_ONLY, ITEM_CAPTION_MODE_ID, ITEM_CAPTION_MODE_INDEX, ITEM_CAPTION_MODE_ITEM, ITEM_CAPTION_MODE_PROPERTY

Inherited from abstract_component.AbstractComponent: SIZE_PATTERN

Inherited from terminal.sizeable.ISizeable: SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS, UNIT_SYMBOLS

Inherited from abstract_select.IFiltering: FILTERINGMODE_CONTAINS, FILTERINGMODE_OFF, FILTERINGMODE_STARTSWITH

Instance Variables [hide private]
  _textInputAllowed
If text input is not allowed, the ComboBox behaves like a pretty

Inherited from select.Select: pageLength

Inherited from abstract_select.AbstractSelect: itemIdMapper, items

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 

Creates an empty Select with caption, that is connected to a data-source or is filled from a collection of option values.

Parameters:
  • args - tuple of the form
    • ()
    • (caption)
      1. the caption of the component.
    • (caption, dataSource)
      1. the caption of the component.
      2. the IContainer datasource to be selected from by this select.
    • (caption, options)
      1. the caption of the component.
      2. the Collection containing the options.
Overrides: object.__init__
(inherited documentation)

setMultiSelect(self, multiSelect)

source code 

Sets the multiselect mode. Setting multiselect mode false may loose selection information: if selected items set contains one or more selected items, only one of the selected items is kept as selected.

Parameters:
  • multiSelect - the New value of property multiSelect.
Overrides: abstract_select.AbstractSelect.setMultiSelect
(inherited documentation)

getInputPrompt(self)

source code 

Gets the current input prompt.

Returns:
the current input prompt, or null if not enabled

See Also: setInputPrompt

setInputPrompt(self, inputPrompt)

source code 

Sets the input prompt - a textual prompt that is displayed when the select would otherwise be empty, to prompt the user for input.

Parameters:
  • inputPrompt - the desired input prompt, or null to disable

paintContent(self, target)

source code 

Paints the content of this component.

Parameters:
  • target - the Paint Event.
Raises:
Overrides: abstract_component.AbstractComponent.paintContent
(inherited documentation)

setTextInputAllowed(self, textInputAllowed)

source code 

Sets whether it is possible to input text into the field or whether the field area of the component is just used to show what is selected. By disabling text input, the comboBox will work in the same way as a NativeSelect

@see isTextInputAllowed

Parameters:
  • textInputAllowed - true to allow entering text, false to just show the current selection

isTextInputAllowed(self)

source code 

Returns true if the user can enter text into the field to either filter the selections or enter a new value if :{isNewItemsAllowed} returns true. If text input is disabled, the comboBox will work in the same way as a NativeSelect.