Package muntjac :: Package ui :: Module slider :: Class Slider
[hide private]
[frames] | no frames]

Class Slider

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 --+
                                                         |
                                                        Slider

A component for selecting a numerical value within a range.


Authors:
Vaadin Ltd., Richard Lincoln
Instance Methods [hide private]
 
__init__(self, *args)
Slider constructor.
source code
 
getMax(self)
Gets the biggest possible value in Sliders range.
source code
 
setMax(self, maximum)
Set the maximum value of the Slider.
source code
 
getMin(self)
Gets the minimum value in Sliders range.
source code
 
setMin(self, minimum)
Set the minimum value of the Slider.
source code
 
getOrientation(self)
Get the current orientation of the Slider (horizontal or vertical).
source code
 
setOrientation(self, orientation)
Set the orientation of the Slider.
source code
 
getResolution(self)
Get the current resolution of the Slider.
source code
 
setResolution(self, resolution)
Set a new resolution for the Slider.
source code
 
setValue(self, value, repaintIsNotNeeded=False)
Set the value of this Slider.
source code
 
getSize(self)
Get the current Slider size.
source code
 
setSize(self, size)
Set the size for this Slider.
source code
 
getHandleSize(self)
Get the handle size of this Slider.
source code
 
setHandleSize(self, handleSize)
Set the handle size of this Slider.
source code
 
paintContent(self, target)
Paints any needed component-specific things to the given UIDL stream.
source code
 
changeVariables(self, source, variables)
Invoked when the value of a variable has changed.
source code
 
getType(self) source code

Inherited from abstract_field.AbstractField: __str__, addCallback, addListener, addShortcutListener, addValidator, attach, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getActionManager, getErrorMessage, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, getValue, isEmpty, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isRequired, isValid, isValidationVisible, isWriteThrough, readOnlyStatusChange, readValueFromProperty, removeCallback, removeListener, 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, getListeners, 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)
  ORIENTATION_HORIZONTAL = 0
  ORIENTATION_VERTICAL = 1
  STYLE_SCROLLBAR = 'scrollbar'
Style constant representing a scrollbar styled slider.

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]
  _min
Minimum value of slider
  _max
Maximum value of slider
  _resolution
Resolution, how many digits are considered relevant after the
  _orientation
Slider orientation (horizontal/vertical), defaults .
  _size
Slider size in pixels.
  _handleSize
Handle (draggable control element) size in percents relative to
  _arrows
Show arrows that can be pressed to slide the handle in some
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 

Slider constructor.

Parameters:
  • args - tuple of the form
    • ()
    • (caption)
      1. The caption for this Slider (e.g. "Volume").
    • (min, max, resolution)
    • (min, max)
    • (caption, min, max)
Overrides: object.__init__

getMax(self)

source code 

Gets the biggest possible value in Sliders range.

Returns:
the biggest value slider can have

setMax(self, maximum)

source code 

Set the maximum value of the Slider. If the current value of the Slider is out of new bounds, the value is set to new minimum.

Parameters:
  • maximum - new maximum value of the Slider

getMin(self)

source code 

Gets the minimum value in Sliders range.

Returns:
the smallest value slider can have

setMin(self, minimum)

source code 

Set the minimum value of the Slider. If the current value of the Slider is out of new bounds, the value is set to new minimum.

Parameters:
  • minimum - New minimum value of the Slider.

getOrientation(self)

source code 

Get the current orientation of the Slider (horizontal or vertical).

Returns:
orientation

getResolution(self)

source code 

Get the current resolution of the Slider.

Returns:
resolution

setValue(self, value, repaintIsNotNeeded=False)

source code 

Set the value of this Slider.

Parameters:
  • value - New value of Slider. Must be within Sliders range (min - max), otherwise throws an exception.
  • repaintIsNotNeeded - If true, client-side is not requested to repaint itself.
Raises:
Overrides: abstract_field.AbstractField.setValue

getSize(self)

source code 

Get the current Slider size.

Returns:
size in pixels or -1 for auto sizing.

Deprecated: use standard getWidth/getHeight instead

setSize(self, size)

source code 

Set the size for this Slider.

Parameters:
  • size - in pixels, or -1 auto sizing.

Deprecated: use standard setWidth/setHeight instead

getHandleSize(self)

source code 

Get the handle size of this Slider.

Returns:
handle size in percentages.

Deprecated: The size is dictated by the current theme.

setHandleSize(self, handleSize)

source code 

Set the handle size of this Slider.

Parameters:
  • handleSize - in percentages relative to slider base size.

Deprecated: The size is dictated by the current theme.

paintContent(self, target)

source code 

Paints any needed component-specific things to the given UIDL stream. The more general paint method handles all general attributes common to all components, and it calls this method to paint any component-specific attributes to the UIDL stream.

Parameters:
  • target - the target UIDL stream where the component should paint itself to
Raises:
Overrides: abstract_component.AbstractComponent.paintContent
(inherited documentation)

changeVariables(self, source, variables)

source code 

Invoked when the value of a variable has changed. Slider listeners are notified if the slider value 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

getType(self)

source code 
Overrides: abstract_field.AbstractField.getType

Class Variable Details [hide private]

STYLE_SCROLLBAR

Style constant representing a scrollbar styled slider. Use this with

Value:
'scrollbar'

Instance Variable Details [hide private]

_size

Slider size in pixels. In horizontal mode, if set to -1, allow