net.java.dev.colorchooser
public abstract class ColorChooserUI extends ComponentUI
To completely override all behavior, override installListeners()
and uninstallListeners()
and do not have them call super.
Modifier | Constructor and Description |
---|---|
protected |
ColorChooserUI()
Creates a new instance of ColorChooserUI
|
Modifier and Type | Method and Description |
---|---|
protected void |
fireColorChanged(ColorChooser chooser)
Cause the passed color chooser to fire an action event to its listeners
notifying them that the color has changed.
|
Dimension |
getMaximumSize(JComponent c) |
Dimension |
getMinimumSize(JComponent c) |
Dimension |
getPreferredSize(JComponent c) |
protected void |
init(ColorChooser c)
Optional initialization method called from
installUI() |
protected void |
installListeners(ColorChooser c)
Begin listening for mouse events on the passed component
|
void |
installUI(JComponent jc) |
protected void |
keyboardInvoke(ColorChooser colorChooser)
Called when the color chooser is invoked from the keyboard (user pressed
space or enter).
|
protected int |
paletteIndexFromKeyCode(KeyEvent ke)
Map a key event to an integer used to index into the array of available
palettes, used to change which palette is displayed on the fly.
|
protected int |
paletteIndexFromModifiers(InputEvent me)
Map the modifiers on an input event
to an integer used to index into the array of available
palettes, used to change which palette is displayed on the fly.
|
protected void |
uninit(ColorChooser c)
Optional initialization method called from
uninstallUI() |
protected void |
uninstallListeners(ColorChooser c)
Stop listening for mouse events on the passed component
|
void |
uninstallUI(JComponent jc) |
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, paint, update
protected ColorChooserUI()
public final void installUI(JComponent jc)
installUI
in class ComponentUI
public final void uninstallUI(JComponent jc)
uninstallUI
in class ComponentUI
protected void init(ColorChooser c)
installUI()
protected void uninit(ColorChooser c)
uninstallUI()
protected void installListeners(ColorChooser c)
protected void uninstallListeners(ColorChooser c)
protected int paletteIndexFromKeyCode(KeyEvent ke)
If you override this method, also override paletteIndexFromModifiers
.
The palette actually used is as follows:
protected int paletteIndexFromModifiers(InputEvent me)
getModifiersEx()
method.
If you override this method, also override
paletteIndexFromKeyCode
.
The palette actually used is as follows:
protected void keyboardInvoke(ColorChooser colorChooser)
protected void fireColorChanged(ColorChooser chooser)
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class ComponentUI
public Dimension getMinimumSize(JComponent c)
getMinimumSize
in class ComponentUI
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class ComponentUI