|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
net.java.dev.colorchooser.ColorChooserUI
public abstract class ColorChooserUI
Parent class of UI delegates for color choosers. This class handles popping up palettes and selection/setting transient color and firing events. Generally, subclasses will simply want to override the painting logic.
To completely override all behavior, override installListeners()
and uninstallListeners()
and do not have them call super.
Constructor Summary | |
---|---|
protected |
ColorChooserUI()
Creates a new instance of ColorChooserUI |
Method Summary | |
---|---|
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)
|
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, paint, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ColorChooserUI()
Method Detail |
---|
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
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |