Package muntjac :: Package addon :: Package colorpicker :: Module color_picker_popup :: Class ColorPickerPopup
[hide private]
[frames] | no frames]

Class ColorPickerPopup

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 --+        
                                                             |        
                                                object --+   |        
                                                         |   |        
                           terminal.scrollable.IScrollable --+        
                                                             |        
                                                object --+   |        
                                                         |   |        
           ui.component_container.IComponentAttachListener --+        
                                                             |        
                                                object --+   |        
                                                         |   |        
           ui.component_container.IComponentDetachListener --+        
                                                             |        
                                            object --+       |        
                                                     |       |        
                               event.action.IContainer --+   |        
                                                         |   |        
                                    event.action.INotifier --+        
                                                             |        
                                    object --+               |        
                                             |               |        
                           util.IEventListener --+           |        
                                                 |           |        
                     terminal.paintable.IPaintable --+       |        
                                                     |       |        
                                        object --+   |       |        
                                                 |   |       |        
            terminal.variable_owner.IVariableOwner --+       |        
                                                     |       |        
                                        object --+   |       |        
                                                 |   |       |        
                       terminal.sizeable.ISizeable --+       |        
                                                     |       |        
                               ui.component.IComponent --+   |        
                                                         |   |        
                                   ui.component.IFocusable --+        
                                                             |        
                                                ui.panel.Panel --+    
                                                                 |    
                                                    object --+   |    
                                                             |   |    
                              terminal.uri_handler.IUriHandler --+    
                                                                 |    
                                                    object --+   |    
                                                             |   |    
                  terminal.parameter_handler.IParameterHandler --+    
                                                                 |    
                                                    object --+   |    
                                                             |   |    
                             event.field_events.IFocusNotifier --+    
                                                                 |    
                                                    object --+   |    
                                                             |   |    
                              event.field_events.IBlurNotifier --+    
                                                                 |    
                                                  ui.window.Window --+
                                                                     |
                                                        object --+   |
                                                                 |   |
                                          ui.button.IClickListener --+
                                                                     |
                                                        object --+   |
                                                                 |   |
                                 color_picker.IColorChangeListener --+
                                                                     |
                                                        object --+   |
                                                                 |   |
                                     color_selector.IColorSelector --+
                                                                     |
                                                                    ColorPickerPopup

The Class ColorPickerPopup.


Authors:
John Ahlroos / ITMill Oy, Richard Lincoln
Instance Methods [hide private]
 
__init__(self, initialColor)
Instantiates a new color picker popup.
source code
 
calculateHeight(self)
Calculates the height of the popup menu
source code
 
createRGBTab(self, color)
Creates the rgb tab.
source code
 
createHSVTab(self, color)
Creates the hsv tab.
source code
 
createSelectTab(self)
Creates the select tab.
source code
 
buttonClick(self, event)
Called when a Button has been clicked.
source code
 
fireColorChanged(self)
Notifies the listeners that the color changed
source code
 
getHistory(self)
Gets the history.
source code
 
setColor(self, color)
Sets the color.
source code
 
getColor(self)
Gets the color.
source code
 
getColorHistory(self)
Gets the color history.
source code
 
colorChanged(self, event) 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
 
tabIsVisible(self, tab)
Is the tab visible
source code
 
tabsNumVisible(self)
How many tabs are visible
source code
 
checkIfTabsNeeded(self)
Checks if tabs are needed and hides them if not
source code
 
setRGBTabVisible(self, visible)
Set RGB tab visibility
source code
 
setHSVTabVisible(self, visible)
Set HSV tab visibility
source code
 
setSwatchesTabVisible(self, visible)
Set Swatches tab visibility
source code
 
setHistoryVisible(self, visible)
Set the History visibility
source code
 
setPreviewVisible(self, visible)
Set the preview visibility
source code
 
attach(self)
Notifies the component that it is connected to an application.
source code

Inherited from ui.window.Window: addComponent, addNotification, addParameterHandler, addURIHandler, addWindow, attachWindow, bringToFront, center, changeVariables, close, executeJavaScript, fireClose, fireResize, focus, getApplication, getBorder, getChildWindows, getName, getParent, getPositionX, getPositionY, getTerminal, getTheme, getURL, getWindow, handleParameters, handleURI, isClosable, isDraggable, isModal, isResizable, isResizeLazy, open, paintContent, removeCloseShortcut, removeParameterHandler, removeURIHandler, removeWindow, scrollIntoView, setApplication, setBorder, setClosable, setCloseShortcut, setDraggable, setFocusedComponent, setModal, setName, setPositionX, setPositionY, setResizable, setResizeLazy, setTerminal, setTheme, showNotification

Inherited from ui.panel.Panel: addAction, addActionHandler, componentAttachedToContainer, componentDetachedFromContainer, createDefaultContent, detach, fireClick, getActionManager, getComponentIterator, getContent, getLayout, getScrollLeft, getScrollOffsetX, getScrollOffsetY, getScrollTop, getTabIndex, isScrollable, removeAction, removeActionHandler, removeAllActionHandlers, removeAllComponents, removeComponent, replaceComponent, requestRepaintAll, setCaption, setContent, setLayout, setScrollLeft, setScrollOffsetX, setScrollOffsetY, setScrollTop, setScrollable, setTabIndex

Inherited from ui.abstract_component_container.AbstractComponentContainer: fireComponentAttachEvent, fireComponentDetachEvent, getInvalidSizedChildren, moveComponentsFrom, repaintChangedChildTrees, repaintChildTrees, setEnabled, setHeight, setWidth

Inherited from ui.abstract_component.AbstractComponent: __getstate__, __setstate__, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, fireRequestRepaintEvent, getCSSHeight, getCSSWidth, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getStyle, getStyleName, getWidth, getWidthUnits, handleError, hasListeners, isEnabled, isImmediate, isReadOnly, isVisible, paint, parseStringSize, registerCallback, registerListener, removeStyleName, requestRepaint, requestRepaintRequests, 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-popup'

Inherited from ui.window.Window: BORDER_DEFAULT, BORDER_MINIMAL, BORDER_NONE, CLIENT_WIDGET

Inherited from ui.panel.Panel: STYLE_LIGHT

Inherited from ui.panel.Panel (private): _CLICK_EVENT

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

Instance Variables [hide private]
  _tabs
The tabs.
  _layout
The layout.
  _ok
The ok button.
  _cancel
The cancel button.
  _resize
The resize button.
  _selectedColor
The selected color.
  _history
The history.
  _historyContainer
The history container.
  _rgbGradient
The rgb gradient.
  _hsvGradient
The hsv gradient.
  _redSlider
The red slider.
  _greenSlider
The green slider.
  _blueSlider
The blue slider.
  _hueSlider
The hue slider.
  _saturationSlider
The saturation slider.
  _valueSlider
The value slider.
  _rgbPreview
The preview on the rgb tab.
  _hsvPreview
The preview on the hsv tab.
  _selPreview
The preview on the swatches tab.
  _colorSelect
The color select.
  _selectors
The selectors.

Inherited from ui.panel.Panel: actionManager

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, initialColor)
(Constructor)

source code 

Instantiates a new color picker popup.

Parameters:
  • caption - the title of the window.
  • content - the contents of the window
Overrides: object.__init__

calculateHeight(self)

source code 

Calculates the height of the popup menu

Returns:
Returns the height in CSS string representation

createRGBTab(self, color)

source code 

Creates the rgb tab.

Returns:
the component

createHSVTab(self, color)

source code 

Creates the hsv tab.

Returns:
the component

createSelectTab(self)

source code 

Creates the select tab.

Returns:
the component

buttonClick(self, event)

source code 

Called when a Button has been clicked. A reference to the button is given by ClickEvent.getButton.

Parameters:
  • event - An event containing information about the click.
Overrides: ui.button.IClickListener.buttonClick
(inherited documentation)

getHistory(self)

source code 

Gets the history.

Returns:
the history

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)

getColorHistory(self)

source code 

Gets the color history.

Returns:
the color history

colorChanged(self, event)

source code 
Overrides: color_picker.IColorChangeListener.colorChanged

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.field_events.IBlurNotifier.addListener

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

source code 
Overrides: event.field_events.IBlurNotifier.addCallback

removeListener(self, listener, iface=None)

source code 

Removes a color change listener

Parameters:
  • listener - The listener
Overrides: event.field_events.IBlurNotifier.removeListener

removeCallback(self, callback, eventType=None)

source code 
Overrides: event.field_events.IBlurNotifier.removeCallback

tabIsVisible(self, tab)

source code 

Is the tab visible

Parameters:
  • tab - The tab to check

tabsNumVisible(self)

source code 

How many tabs are visible

Returns:
The number of tabs visible

setRGBTabVisible(self, visible)

source code 

Set RGB tab visibility

Parameters:
  • visible - The visibility of the RGB tab

setHSVTabVisible(self, visible)

source code 

Set HSV tab visibility

Parameters:
  • visible - The visibility of the HSV tab

setSwatchesTabVisible(self, visible)

source code 

Set Swatches tab visibility

Parameters:
  • visible - The visibility of the Swatches tab

attach(self)

source code 

Notifies the component that it is connected to an application.

Overrides: ui.component.IComponent.attach
(inherited documentation)