Package javascript.swing.colorchooser
Class JSColorCMYKPanel
- java.lang.Object
-
- javascript.swing.JSComponent
-
- javascript.swing.JSPanel
-
- javascript.swing.colorchooser.JSAbstractColorFormatPanel
-
- javascript.swing.colorchooser.JSColorCMYKPanel
-
public class JSColorCMYKPanel extends JSAbstractColorFormatPanel
The panel to show colors in RGB format- Author:
- gianpiero.diblasi
-
-
Field Summary
-
Fields inherited from class javascript.swing.colorchooser.JSAbstractColorFormatPanel
ctxRect, ctxSquare, RECT_HEIGHT, RECT_WIDTH, SQUARE_SIZE
-
-
Constructor Summary
Constructors Constructor Description JSColorCMYKPanel()Creates the object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddrawRect()Draws the rectprotected voiddrawRectSelector()Draws the rect selectorprotected voiddrawSquare()Draws the squareprotected voiddrawSquareSelector()Draws the square selectorColorgetSelectedColor()Returns the selected colorprotected voidrectEvent(def.dom.MouseEvent event, java.lang.String type)Manages a mouse event on the rectvoidsetSelectedColor(Color color)Sets the selected colorprotected voidsquareEvent(def.dom.MouseEvent event, java.lang.String type)Manages a mouse event on the square-
Methods inherited from class javascript.swing.colorchooser.JSAbstractColorFormatPanel
addChangeListener, addRadio, addSlider, addSpinner, canDoItRect, canDoItSquare, drawAll, drawCircle, drawLine, getValueIsAdjusting, onchange
-
Methods inherited from class javascript.swing.JSComponent
addChildEventListenerByQuery, addEventListener, appendChild, appendChildInTree, appendInBody, appendNodeChild, appendNodeChildInTree, clearChildContentByQuery, clearContent, cssAddClass, cssClassList, cssRemoveClass, cssToggleClass, getAttribute, getChildAttributeByIndex, getChildAttributeByQuery, getChildCount, getChildPropertyByQuery, getChilStyleByIndex, getChilStyleByQuery, getID, getProperty, getStyle, insertBefore, insertBeforeInTree, insertNodeBefore, insertNodeBeforeInTree, invoke, invokeInTree, prependChild, prependChildInTree, prependNodeChild, prependNodeChildInTree, removeAttribute, removeChildAttributeByQuery, removeFromBody, setAttribute, setBackground, setChildAttributeByIndex, setChildAttributeByQuery, setChildPropertyByQuery, setContent, setEnabled, setID, setProperty
-
-
-
-
Method Detail
-
getSelectedColor
public Color getSelectedColor()
Description copied from class:JSAbstractColorFormatPanelReturns the selected color- Specified by:
getSelectedColorin classJSAbstractColorFormatPanel- Returns:
- The selected color
-
setSelectedColor
public void setSelectedColor(Color color)
Description copied from class:JSAbstractColorFormatPanelSets the selected color- Specified by:
setSelectedColorin classJSAbstractColorFormatPanel- Parameters:
color- The selected color
-
drawSquare
protected void drawSquare()
Description copied from class:JSAbstractColorFormatPanelDraws the square- Specified by:
drawSquarein classJSAbstractColorFormatPanel
-
drawSquareSelector
protected void drawSquareSelector()
Description copied from class:JSAbstractColorFormatPanelDraws the square selector- Specified by:
drawSquareSelectorin classJSAbstractColorFormatPanel
-
drawRect
protected void drawRect()
Description copied from class:JSAbstractColorFormatPanelDraws the rect- Specified by:
drawRectin classJSAbstractColorFormatPanel
-
drawRectSelector
protected void drawRectSelector()
Description copied from class:JSAbstractColorFormatPanelDraws the rect selector- Specified by:
drawRectSelectorin classJSAbstractColorFormatPanel
-
squareEvent
protected void squareEvent(def.dom.MouseEvent event, java.lang.String type)Description copied from class:JSAbstractColorFormatPanelManages a mouse event on the square- Specified by:
squareEventin classJSAbstractColorFormatPanel- Parameters:
event- The mouse eventtype- The event type
-
rectEvent
protected void rectEvent(def.dom.MouseEvent event, java.lang.String type)Description copied from class:JSAbstractColorFormatPanelManages a mouse event on the rect- Specified by:
rectEventin classJSAbstractColorFormatPanel- Parameters:
event- The mouse eventtype- The event type
-
-