Package muntjac :: Package ui :: Module option_group :: Class OptionGroup
[hide private]
[frames] | no frames]

Class OptionGroup

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 --+   |
                                                         |   |
                          event.field_events.IBlurNotifier --+
                                                             |
                                                object --+   |
                                                         |   |
                         event.field_events.IFocusNotifier --+
                                                             |
                                                            OptionGroup

Configures select to be used as an option group.

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
 
paintContent(self, target)
Paints the content of this component.
source code
 
paintItem(self, target, itemId) source code
 
changeVariables(self, source, variables)
Invoked when the value of a variable has changed.
source code
 
addListener(self, listener, iface=None)
Adds a new IProperty or IItem set change listener for this IContainer.
source code
 
addCallback(self, callback, eventType=None, *args) source code
 
removeListener(self, listener, iface=None)
Removes a previously registered IProperty and IItemset change listener.
source code
 
removeCallback(self, callback, eventType=None) source code
 
setValue(self, newValue, repaintIsNotNeeded=None)
Sets the visible value of the property.
source code
 
setItemEnabled(self, itemId, enabled)
Sets an item disabled or enabled.
source code
 
isItemEnabled(self, itemId)
Returns true if the item is enabled.
source code
 
setHtmlContentAllowed(self, htmlContentAllowed)
Sets whether html is allowed in the item captions.
source code
 
isHtmlContentAllowed(self)
Checks whether captions are interpreted as html or plain text.
source code

Inherited from abstract_select.AbstractSelect: __len__, addContainerProperty, addItem, attach, containerItemSetChange, containerPropertySetChange, containsId, detach, fireItemSetChange, firePropertySetChange, getCaptionChangeListener, getContainerDataSource, getContainerProperty, getContainerPropertyIds, getItem, getItemCaption, getItemCaptionMode, getItemCaptionPropertyId, getItemIcon, getItemIconPropertyId, getItemIds, getListeners, getNewItemHandler, getNullSelectionItemId, getType, getValue, getVisibleItemIds, isEmpty, isMultiSelect, isNewItemsAllowed, isNullSelectionAllowed, isSelected, removeAllItems, removeContainerProperty, removeItem, select, setContainerDataSource, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIcon, setItemIconPropertyId, setMultiSelect, setNewItemHandler, setNewItemsAllowed, setNullSelectionAllowed, setNullSelectionItemId, 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, requestRepaint, 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

Instance Variables [hide private]

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)

paintContent(self, target)

source code 

Paints the content of this component.

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

paintItem(self, target, itemId)

source code 
Overrides: abstract_select.AbstractSelect.paintItem

changeVariables(self, source, variables)

source code 

Invoked when the value of a variable has changed.

Parameters:
  • source - the Source of the variable change. This is the origin of the event. For example in Web Adapter this is the request.
  • variables - the Mapping from variable names to new variable values.
Overrides: terminal.variable_owner.IVariableOwner.changeVariables
(inherited documentation)

addListener(self, listener, iface=None)

source code 

Adds a new IProperty or IItem set change listener for this IContainer.

Parameters:
  • listener - the new IListener to be registered.
Raises:
  • ValueError - unless method has a match in object
Overrides: event.field_events.IFocusNotifier.addListener
(inherited documentation)

addCallback(self, callback, eventType=None, *args)

source code 
Overrides: event.field_events.IFocusNotifier.addCallback

removeListener(self, listener, iface=None)

source code 

Removes a previously registered IProperty and IItemset change listener.

Parameters:
  • listener - the listener to be removed.
Overrides: event.field_events.IFocusNotifier.removeListener
(inherited documentation)

removeCallback(self, callback, eventType=None)

source code 
Overrides: event.field_events.IFocusNotifier.removeCallback

setValue(self, newValue, repaintIsNotNeeded=None)

source code 

Sets the visible value of the property.

The value of the select is the selected item id. If the select is in multiselect-mode, the value is a set of selected item keys. In multiselect mode all collections of id:s can be assigned.

Parameters:
  • newValue - the New selected item or collection of selected items.
  • repaintIsNotNeeded - True if caller is sure that repaint is not needed.
Raises:
Overrides: abstract_field.AbstractField.setValue
(inherited documentation)

setItemEnabled(self, itemId, enabled)

source code 

Sets an item disabled or enabled. In the multiselect mode, a disabled item cannot be selected or deselected by the user. In the single selection mode, a disable item cannot be selected.

However, programmatical selection or deselection of an disable item is possible. By default, items are enabled.

Parameters:
  • itemId - the id of the item to be disabled or enabled
  • enabled - if true the item is enabled, otherwise the item is disabled

isItemEnabled(self, itemId)

source code 

Returns true if the item is enabled.

Parameters:
  • itemId - the id of the item to be checked
Returns:
true if the item is enabled, false otherwise

See Also: setItemEnabled

setHtmlContentAllowed(self, htmlContentAllowed)

source code 

Sets whether html is allowed in the item captions. If set to true, the captions are passed to the browser as html and the developer is responsible for ensuring no harmful html is used. If set to false, the content is passed to the browser as plain text.

Parameters:
  • htmlContentAllowed - true if the captions are used as html, false if used as plain text

isHtmlContentAllowed(self)

source code 

Checks whether captions are interpreted as html or plain text.

Returns:
true if the captions are used as html, false if used as plain text