Package javascript.swing.colorchooser
Class JSColorHSLPanel
- java.lang.Object
-
- javascript.swing.JSComponent
-
- javascript.swing.JSPanel
-
- javascript.swing.colorchooser.JSAbstractColorFormatPanel
-
- javascript.swing.colorchooser.JSColorHSLPanel
-
public class JSColorHSLPanel extends JSAbstractColorFormatPanel
The panel to show colors in HSL 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 JSColorHSLPanel()
Creates the object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
drawRect()
Draws the rectprotected void
drawRectSelector()
Draws the rect selectorprotected void
drawSquare()
Draws the squareprotected void
drawSquareSelector()
Draws the square selectorColor
getSelectedColor()
Returns the selected colorprotected void
rectEvent(def.dom.MouseEvent event, java.lang.String type)
Manages a mouse event on the rectvoid
setSelectedColor(Color color)
Sets the selected colorprotected void
squareEvent(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:JSAbstractColorFormatPanel
Returns the selected color- Specified by:
getSelectedColor
in classJSAbstractColorFormatPanel
- Returns:
- The selected color
-
setSelectedColor
public void setSelectedColor(Color color)
Description copied from class:JSAbstractColorFormatPanel
Sets the selected color- Specified by:
setSelectedColor
in classJSAbstractColorFormatPanel
- Parameters:
color
- The selected color
-
drawSquare
protected void drawSquare()
Description copied from class:JSAbstractColorFormatPanel
Draws the square- Specified by:
drawSquare
in classJSAbstractColorFormatPanel
-
drawSquareSelector
protected void drawSquareSelector()
Description copied from class:JSAbstractColorFormatPanel
Draws the square selector- Specified by:
drawSquareSelector
in classJSAbstractColorFormatPanel
-
drawRect
protected void drawRect()
Description copied from class:JSAbstractColorFormatPanel
Draws the rect- Specified by:
drawRect
in classJSAbstractColorFormatPanel
-
drawRectSelector
protected void drawRectSelector()
Description copied from class:JSAbstractColorFormatPanel
Draws the rect selector- Specified by:
drawRectSelector
in classJSAbstractColorFormatPanel
-
squareEvent
protected void squareEvent(def.dom.MouseEvent event, java.lang.String type)
Description copied from class:JSAbstractColorFormatPanel
Manages a mouse event on the square- Specified by:
squareEvent
in 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:JSAbstractColorFormatPanel
Manages a mouse event on the rect- Specified by:
rectEvent
in classJSAbstractColorFormatPanel
- Parameters:
event
- The mouse eventtype
- The event type
-
-