Class JColorChooser
java.lang.Object
vaadinx.awt.Component
vaadinx.awt.Container
vaadinx.swing.JComponent
vaadinx.swing.JColorChooser
- All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Emulator for
JColorChooser. R_leaf_peer_lockdown-locked peer is SJColorChooser.- See Also:
-
Field Summary
FieldsFields inherited from class JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, FILL_CHROME, FILL_DEFAULT, LEFT_ALIGNMENT, listenerList, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic JDialogcreateDialog(Component parent, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) JDK-shapedcreateDialog: returns a non-blocking JDialog the caller wires and shows itself.getColor()booleannulluntil one is set: the JDK's L&F installs aDefaultPreviewPanel, ajavax.swingcomponent this type cannot hold.getUI()protected StringvoidsetChooserPanels(AbstractColorChooserPanel[] panels) Stores a copy and fireschooserPanels; the panels are never rendered, since the native color input is the chooser UI.voidsetColor(int c) voidsetColor(int r, int g, int b) voidvoidsetDragEnabled(boolean b) Stored, and drives nothing: the native color input has no drag-out.voidsetPreviewPanel(JComponent preview) Stores the panel and firespreviewPanel; the panel itself is never rendered (the native colour input has no preview slot).voidsetSelectionModel(ColorSelectionModel newModel) voidsetUI(ColorChooserUI ui) static ColorshowDialog(Component parent, String title, Color initialColor) static ColorshowDialog(Component parent, String title, Color initialColor, boolean colorTransparencySelectionEnabled) voidupdateUI()Methods inherited from class JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, addSlotChild, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, fireHierarchyEvent, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, peerContentElement, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeSlotChild, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, applyBackgroundToPeer, applyVisibleToPeer, awtListeners, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, defaultFillCssClass, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, fireComponentEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isThemeDefault, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, suppressMouseBridge, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, withPeer, withPeerOnLiveUI
-
Field Details
-
SELECTION_MODEL_PROPERTY
- See Also:
-
PREVIEW_PANEL_PROPERTY
- See Also:
-
CHOOSER_PANELS_PROPERTY
- See Also:
-
-
Constructor Details
-
JColorChooser
public JColorChooser() -
JColorChooser
-
JColorChooser
- Throws:
NullPointerException- ifmodelis null, as the JDK's L&F install does
-
-
Method Details
-
getColor
-
setColor
-
setColor
public void setColor(int r, int g, int b) -
setColor
public void setColor(int c) -
getSelectionModel
-
setSelectionModel
- Throws:
NullPointerException- ifnewModelis null — after storing it and before the event, as the JDK's L&F listener does when it moves its model listener
-
getDragEnabled
public boolean getDragEnabled() -
setDragEnabled
public void setDragEnabled(boolean b) Stored, and drives nothing: the native color input has no drag-out. The JDK'sHeadlessExceptionis not thrown, since a browser is not headless. -
getPreviewPanel
nulluntil one is set: the JDK's L&F installs aDefaultPreviewPanel, ajavax.swingcomponent this type cannot hold. -
setPreviewPanel
Stores the panel and firespreviewPanel; the panel itself is never rendered (the native colour input has no preview slot).Typed
vaadinx.swing.JComponentper R_no_vaadin_in_api limb 1 — with the JDK's type a migratedJPanelcould not be passed at all. R_decline_effect_only owes the state and the event, and declines only the effect. -
addChooserPanel
-
removeChooserPanel
- Throws:
IllegalArgumentException- ifpanelis not one of this chooser's
-
setChooserPanels
Stores a copy and fireschooserPanels; the panels are never rendered, since the native color input is the chooser UI. The panels'installChooserPanelhook is not called: it takes ajavax.swing.JColorChooser, which this is not.- Throws:
NullPointerException- ifpanelsor one of its elements is null — an element after storing the array and before the event, as the JDK's L&F listener does
-
getChooserPanels
-
showDialog
-
showDialog
-
createDialog
public static JDialog createDialog(Component parent, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) JDK-shapedcreateDialog: returns a non-blocking JDialog the caller wires and shows itself. The two ActionListeners fire on OK / Cancel respectively (JDK semantics); both dispose the dialog. -
paramString
- Overrides:
paramStringin classJComponent
-
updateUI
public void updateUI()- Overrides:
updateUIin classJComponent
-
getUIClassID
- Overrides:
getUIClassIDin classJComponent
-
getUI
- Overrides:
getUIin classJComponent
-
setUI
-
getAccessibleContext
- Specified by:
getAccessibleContextin interfaceAccessible- Overrides:
getAccessibleContextin classComponent
-