Overview

A button which allows the user to select a single color. The button has a platform specific look. Ex: on Mac OS X it will mimic an NSColorWell. When the user clicks the button it will open a color chooser set to the current background color of the button. The new selected color will be stored in the background property and can be retrieved using the getBackground() method. As the user is choosing colors within the color chooser the background property will be updated. By listening to this property developers can make other parts of their programs update.

Author(s):

General Methods

accesstypenameparameters

[show]methods inherited from org.jdesktop.swingx.JXColorSelectionButton

main, paintComponent,

[show]methods inherited from javax.swing.JButton

configurePropertiesFromAction, paramString, removeNotify, updateUI,

[show]methods inherited from java.awt.Component

action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate,

[show]methods inherited from java.lang.Object

clone, equals, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait,

Fields

staticaccesstypename

Constructors

accessnameparameters
publicJXColorSelectionButton ()
publicJXColorSelectionButton (Color col, )

public JXColorSelectionButton ()

Creates a new instance of JXColorSelectionButton

Parameters

    public JXColorSelectionButton (Color col, )

    Creates a new instance of JXColorSelectionButton set to the specified color.

    Parameters
    • col The default color

    Properties

    nametypedescriptionget/setaccessinheritedbound
    chooserJColorChooser-----public----

    [show]properties inherited from org.jdesktop.swingx.JXColorSelectionButton

    chooser ,

    [show]properties inherited from java.lang.Object

    class ,

    chooser

    public JColorChooser getChooser ()

    Get the JColorChooser that is used by this JXColorSelectionButton. This chooser instance is shared between all invocations of the chooser, but is unique to this instance of JXColorSelectionButton.

    Parameters

      public void setChooser (JColorChooser chooser, )

      Set the JColorChooser that is used by this JXColorSelectionButton. chooser instance is shared between all invocations of the chooser, but is unique to this instance of JXColorSelectionButton.

      Parameters
      • chooser The new JColorChooser to use.

      Static and Factory Methods

      publicvoidmain(String args, )

      staticpublic void main (String args, )

      Sample usage of JXColorSelectionButton

      parameters
      • args not used