JColorChooser, subclass
this class.Warning
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans package.
Please see java..
| Modifier and Type | Field and Description |
|---|---|
| private JColorChooser | |
| private final PropertyChangeListener | |
| public static final String | TRANSPARENCY_ENABLED_PROPERTY
Identifies that the transparency of the color (alpha value) can be selected |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | |
| protected Color | |
| public ColorSelectionModel | Returns: theColorSelectionModel model this panel
is editingReturns the model that the chooser panel is editing. |
| public int | Returns: Character index to render mnemonic for; -1 to provide no visual identifier for this panel.Provides a hint to the look and feel as to the index of the character in
|
| public abstract String | Returns: the name of the display panelReturns a string containing the display name of the panel. |
| pack-priv int | |
| public abstract Icon | |
| public int | Returns: KeyEvent.VK constant identifying the mnemonic; <= 0 for no mnemonicProvides a hint to the look and feel as to the
|
| public abstract Icon | |
| public void | installChooserPanel(JColorChooser
the chooser to which the panel is to be added enclosingChooser)Invoked when the panel is added to the chooser. |
| public boolean | Returns: true if the transparency of a color can be selectedGets whether color chooser panel allows to select the transparency (alpha value) of a color. |
| public void | |
| public void | setColorTransparencySelectionEnabled(boolean
true if the transparency of a color can be selected b)Sets whether color chooser panel allows to select the transparency (alpha value) of a color. |
| pack-priv void | |
| public void | uninstallChooserPanel(JColorChooser
the chooser from which the panel is to be removed enclosingChooser)Invoked when the panel is removed from the chooser. |
| public abstract void |
| chooser | back to summary |
|---|---|
| private JColorChooser chooser | |
| enabledListener | back to summary |
|---|---|
| private final PropertyChangeListener enabledListener | |
| TRANSPARENCY_ENABLED_PROPERTY | back to summary |
|---|---|
| public static final String TRANSPARENCY_ENABLED_PROPERTY Identifies that the transparency of the color (alpha value) can be selected | |
| AbstractColorChooserPanel | back to summary |
|---|---|
| protected AbstractColorChooserPanel() Constructor for subclasses to call. | |
| buildChooser | back to summary |
|---|---|
| protected abstract void buildChooser() Builds a new chooser panel. | |
| getColorFromModel | back to summary |
|---|---|
| protected Color getColorFromModel() Returns the color that is currently selected.
| |
| getColorSelectionModel | back to summary |
|---|---|
| public ColorSelectionModel getColorSelectionModel() Returns the model that the chooser panel is editing.
| |
| getDisplayedMnemonicIndex | back to summary |
|---|---|
| public int getDisplayedMnemonicIndex() Provides a hint to the look and feel as to the index of the character in
The return value here is a hint, it is ultimately up to the look
and feel to honor the return value in some meaningful way. For example,
a look and feel may wish to render each
This implementation returns -1, indicating the
| |
| getDisplayName | back to summary |
|---|---|
| public abstract String getDisplayName() Returns a string containing the display name of the panel.
| |
| getInt | back to summary |
|---|---|
| pack-priv int getInt(Object key, int defaultValue) Returns an integer from the defaults table. If
| |
| getLargeDisplayIcon | back to summary |
|---|---|
| public abstract Icon getLargeDisplayIcon() Returns the large display icon for the panel.
| |
| getMnemonic | back to summary |
|---|---|
| public int getMnemonic() Provides a hint to the look and feel as to the
The return value here is a hint, it is ultimately up to the look and feel to honor the return value in some meaningful way.
This implementation returns 0, indicating the
| |
| getSmallDisplayIcon | back to summary |
|---|---|
| public abstract Icon getSmallDisplayIcon() Returns the small display icon for the panel.
| |
| installChooserPanel | back to summary |
|---|---|
| public void installChooserPanel(JColorChooser enclosingChooser) Invoked when the panel is added to the chooser.
If you override this, be sure to call
| |
| isColorTransparencySelectionEnabled | back to summary |
|---|---|
| public boolean isColorTransparencySelectionEnabled() Gets whether color chooser panel allows to select the transparency (alpha value) of a color.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g) Overrides javax. Draws the panel.
| |
| setColorTransparencySelectionEnabled | back to summary |
|---|---|
| public void setColorTransparencySelectionEnabled(boolean b) Sets whether color chooser panel allows to select the transparency
(alpha value) of a color.
This method fires a property-changed event, using the string value of
The value is a hint and may not be applicable to all types of chooser panel. The default value is
| |
| setSelectedColor | back to summary |
|---|---|
| pack-priv void setSelectedColor(Color color) | |
| uninstallChooserPanel | back to summary |
|---|---|
| public void uninstallChooserPanel(JColorChooser enclosingChooser) Invoked when the panel is removed from the chooser.
If override this, be sure to call
| |
| updateChooser | back to summary |
|---|---|
| public abstract void updateChooser() Invoked automatically when the model's state changes.
It is also called by | |