Package com.inductiveautomation.rm.swing
Class RJColorPanel
java.lang.Object
com.inductiveautomation.snap.ui.UIOwner<SwingEvent,JComponent>
com.inductiveautomation.snap.swing.SwingOwner
com.inductiveautomation.rm.swing.RJColorPanel
- Direct Known Subclasses:
AttributesPanel.APColorPanel
This class provides Swing UI for selecting a color.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An inner class to act as an image color picker. -
Field Summary
Fields inherited from class com.inductiveautomation.snap.ui.UIOwner
DragDrop, DragEnter, DragEvents, DragExit, DragOver, KeyEvents, KeyFinished, KeyPressed, KeyReleased, KeyTyped, MouseClicked, MouseDragged, MouseEntered, MouseEvents, MouseExited, MouseFinished, MouseMoved, MousePressed, MouseReleased
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRecentColor
(Color aColor) Add to the list of Recent Colors shown on the Color PanelgetColor()
Returns the current color of the color panel.Returns the currently selected color well.int
Returns the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker).static RJColorPanel
Returns the shared instance of the color panel.static Class
Returns the class for the shared instance of color panel.protected void
initUI()
Initialize UI panel.static void
installGradientUI
(JSlider aSlider) Install Gradient UI in slider.void
resetUI()
Resets UI controls.void
respondUI
(SwingEvent anEvent) Responds to changes to the UI controls.void
Sets the current color of the color panel.void
setColorWell
(RJColorWell aColorWell) Sets the currently selected color well.void
setSelectedPicker
(int aPicker) Sets the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker).static void
setSharedClass
(Class aClass) Sets the class for the shared instanceof color panel.Methods inherited from class com.inductiveautomation.snap.swing.SwingOwner
addKeyActionEvent, createTimer, createUI, createUI, createWindow, getNode, getNode, getNodeHelper, getTimer, getTimer, getUI, getWindow, isEventThread, isWindowVisible, requestFocus, requestFocusImpl, runLater, sendEvent, setWindowVisible
Methods inherited from class com.inductiveautomation.snap.ui.UIOwner
addNodeBinding, disableEvents, enableEvents, getBindingModelValue, getBindingNodeValue, getConversionMap, getConversionMapKey, getConversionMaps, getConversionMapValue, getFirstFocus, getModelValue, getNode, getNodeAction, getNodeBoolValue, getNodeFloatValue, getNodeIntValue, getNodeItemDisplayKey, getNodeItems, getNodeSelectedIndex, getNodeSelectedItem, getNodeStringValue, getNodeText, getNodeValue, getUI, getUIHpr, initUI, isNodeEnabled, isNodeValueAdjusting, isSendEventDisabled, isUISet, processResetUI, processRespondUI, resetLater, resetNodeBindings, runLaterDelayed, runLaterOnce, sendEvent, sendNodeAction, setBindingModelValue, setBindingNodeValue, setFirstFocus, setModelValue, setNodeAction, setNodeEnabled, setNodeItemDisplayKey, setNodeItems, setNodeItems, setNodeSelectedIndex, setNodeSelectedItem, setNodeText, setNodeValue, setSendEventDisabled
-
Constructor Details
-
RJColorPanel
public RJColorPanel()Creates a new color panel.
-
-
Method Details
-
getColor
Returns the current color of the color panel. -
setColor
Sets the current color of the color panel. -
addRecentColor
Add to the list of Recent Colors shown on the Color Panel -
getColorWell
Returns the currently selected color well. -
setColorWell
Sets the currently selected color well. -
getSelectedPicker
public int getSelectedPicker()Returns the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker). -
setSelectedPicker
public void setSelectedPicker(int aPicker) Sets the selected picker (0=Image, 1=RGB Sliders, 2=Gray Sliders, 3=SwatchPicker). -
initUI
protected void initUI()Initialize UI panel.- Overrides:
initUI
in classUIOwner<SwingEvent,
JComponent>
-
resetUI
public void resetUI()Resets UI controls.- Overrides:
resetUI
in classUIOwner<SwingEvent,
JComponent>
-
respondUI
Responds to changes to the UI controls.- Overrides:
respondUI
in classUIOwner<SwingEvent,
JComponent>
-
installGradientUI
Install Gradient UI in slider.