Package muntjac :: Package addon :: Package colorpicker :: Module color_picker_history :: Class ColorPickerHistory
[hide private]
[frames] | no frames]

Class ColorPickerHistory

source code

                                object --+                        
                                         |                        
                       util.IEventListener --+                    
                                             |                    
                 terminal.paintable.IPaintable --+                
                                                 |                
                                    object --+   |                
                                             |   |                
        terminal.variable_owner.IVariableOwner --+                
                                                 |                
                                    object --+   |                
                                             |   |                
                   terminal.sizeable.ISizeable --+                
                                                 |                
                           ui.component.IComponent --+            
                                                     |            
                                        object --+   |            
                                                 |   |            
      event.method_event_source.IMethodEventSource --+            
                                                     |            
               ui.abstract_component.AbstractComponent --+        
                                                         |        
                                object --+               |        
                                         |               |        
                       util.IEventListener --+           |        
                                             |           |        
                 terminal.paintable.IPaintable --+       |        
                                                 |       |        
                                    object --+   |       |        
                                             |   |       |        
        terminal.variable_owner.IVariableOwner --+       |        
                                                 |       |        
                                    object --+   |       |        
                                             |   |       |        
                   terminal.sizeable.ISizeable --+       |        
                                                 |       |        
                           ui.component.IComponent --+   |        
                                                     |   |        
            ui.component_container.IComponentContainer --+        
                                                         |        
ui.abstract_component_container.AbstractComponentContainer --+    
                                                             |    
                           ui.custom_component.CustomComponent --+
                                                                 |
                                                    object --+   |
                                                             |   |
                                 color_selector.IColorSelector --+
                                                                 |
                                                    object --+   |
                                                             |   |
                             color_picker.IColorChangeListener --+
                                                                 |
                                                                ColorPickerHistory

The Class ColorPickerHistory.


Authors:
John Ahlroos, Richard lincoln
Instance Methods [hide private]
 
__init__(self)
Instantiates a new color picker history.
source code
 
setHeight(self, height, unit=None)
Sets the height of the object.
source code
 
setColor(self, color)
Sets the color.
source code
 
getColor(self)
Gets the color.
source code
 
getHistory(self)
Gets the history.
source code
 
hasColor(self, c)
Checks for color.
source code
 
addListener(self, listener, iface=None)
Adds a color change listener
source code
 
addCallback(self, callback, eventType=None, *args) source code
 
removeListener(self, listener, iface=None)
Removes a color change listener
source code
 
removeCallback(self, callback, eventType=None) source code
 
colorChanged(self, event) source code

Inherited from ui.custom_component.CustomComponent: addComponent, getComponentCount, getComponentIterator, getComponentType, getCompositionRoot, moveComponentsFrom, paintContent, removeAllComponents, removeComponent, replaceComponent, setComponentType, setCompositionRoot

Inherited from ui.abstract_component_container.AbstractComponentContainer: attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, getInvalidSizedChildren, repaintChangedChildTrees, repaintChildTrees, requestRepaintAll, setEnabled, setWidth

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

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

Class Variables [hide private]
  _STYLENAME = 'v-colorpicker-history'
  _rows = 4
  _columns = 15
  _colorHistory = deque()
  _grid = None
hash(x)

Inherited from ui.custom_component.CustomComponent: CLIENT_WIDGET

Inherited from ui.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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Instantiates a new color picker history.

Parameters:
  • compositionRoot - the root of the composition component tree.
Overrides: object.__init__

setHeight(self, height, unit=None)

source code 

Sets the height of the object. Negative number implies unspecified size (terminal is free to set the size).

Parameters:
  • args - tuple of the form
    • (height)
      1. the height of the object in units specified by heightUnits property or the height of the component using string presentation. String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size.
    • (height, unit)
      1. the height of the object.
      2. the unit used for the width. Possible values include UNITS_PIXELS, UNITS_POINTS, UNITS_PICAS, UNITS_EM, UNITS_EX, UNITS_MM, UNITS_CM, UNITS_INCH, UNITS_PERCENTAGE.
Overrides: terminal.sizeable.ISizeable.setHeight
(inherited documentation)

setColor(self, color)

source code 

Sets the color.

Parameters:
  • color - the new color
Overrides: color_selector.IColorSelector.setColor
(inherited documentation)

getColor(self)

source code 

Gets the color.

Returns:
the color
Overrides: color_selector.IColorSelector.getColor
(inherited documentation)

getHistory(self)

source code 

Gets the history.

Returns:
the history

hasColor(self, c)

source code 

Checks for color.

Parameters:
  • c - the c
Returns:
true, if successful

addListener(self, listener, iface=None)

source code 

Adds a color change listener

Parameters:
  • listener - The color change listener
Raises:
  • ValueError - unless method has a match in object
Overrides: event.method_event_source.IMethodEventSource.addListener

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

source code 
Overrides: terminal.paintable.IPaintable.addCallback

removeListener(self, listener, iface=None)

source code 

Removes a color change listener

Parameters:
  • listener - The listener
Overrides: event.method_event_source.IMethodEventSource.removeListener

removeCallback(self, callback, eventType=None)

source code 
Overrides: terminal.paintable.IPaintable.removeCallback

colorChanged(self, event)

source code 
Overrides: color_picker.IColorChangeListener.colorChanged