|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.AbstractButton javax.swing.JMenuItem javax.swing.JMenu com.jidesoft.swing.JideMenu com.jidesoft.swing.JideSplitButton com.jidesoft.combobox.JideColorSplitButton
public class JideColorSplitButton
JideColorSplitButton
is a special split button which can be used to choose a color. This is a perfect
example using split button which can make choosing color much easier.
AbstractButton.addItemListener(java.awt.event.ItemListener)
to register your own ItemListener. ItemStateChange
event will be fired whenever user clicks on the color button on the color chooser panel.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jidesoft.swing.JideMenu |
---|
JideMenu.MenuCreator, JideMenu.PopupMenuCustomizer, JideMenu.PopupMenuOriginCalculator |
Nested classes/interfaces inherited from class javax.swing.JMenu |
---|
JMenu.AccessibleJMenu, JMenu.WinListener |
Nested classes/interfaces inherited from class javax.swing.JMenuItem |
---|
JMenuItem.AccessibleJMenuItem |
Nested classes/interfaces inherited from class javax.swing.AbstractButton |
---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
ColorChooserPanel |
_colorChooserPanel
|
ItemListener |
_itemListener
|
Fields inherited from class com.jidesoft.swing.JideSplitButton |
---|
ACTION_PROPERTY_SPLIT_BUTTON_ENABLED, PROPERTY_ALWAYS_DROPDOWN |
Fields inherited from class com.jidesoft.swing.JideMenu |
---|
DELAY |
Fields inherited from class javax.swing.JMenu |
---|
popupListener |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface com.jidesoft.swing.ButtonStyle |
---|
BUTTON_STYLE_PROPERTY, CLIENT_PROPERTY_SEGMENT_POSITION, FLAT_STYLE, HYPERLINK_STYLE, SEGMENT_POSITION_FIRST, SEGMENT_POSITION_LAST, SEGMENT_POSITION_MIDDLE, SEGMENT_POSITION_ONLY, TOOLBAR_STYLE, TOOLBOX_STYLE |
Fields inherited from interface com.jidesoft.swing.Alignable |
---|
PROPERTY_ORIENTATION |
Fields inherited from interface javax.swing.SwingConstants |
---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JideColorSplitButton()
Creates a split button. |
|
JideColorSplitButton(Icon icon)
Creates a split button. |
|
JideColorSplitButton(Icon icon,
Rectangle rect)
Creates a split button using the specified icon and a rectangle which will be painted as the last selected color. |
Method Summary | |
---|---|
protected ColorChooserPanel |
createColorChooserPanel()
By default, a ColorChooserPanel of PALETTE_COLOR_40 will be used. |
Icon |
getColorIcon()
Gets the icon used by on the button part of the split button. |
Color |
getLastSelectedColor()
Gets the last selected color. |
Color |
getSelectedColor()
Gets the selected color. |
void |
setColorIcon(Icon icon)
Sets the icon used by the button part of split button. |
void |
setLastSelectedColor(Color color)
Sets the last selected color. |
void |
setSelectedColor(Color selectedColor)
Sets the selected color. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.swing.MenuElement |
---|
processKeyEvent, processMouseEvent |
Field Detail |
---|
public ColorChooserPanel _colorChooserPanel
public ItemListener _itemListener
Constructor Detail |
---|
public JideColorSplitButton()
public JideColorSplitButton(Icon icon)
icon
- public JideColorSplitButton(Icon icon, Rectangle rect)
icon
- rect
- Method Detail |
---|
protected ColorChooserPanel createColorChooserPanel()
ColorChooserPanel
.
public Icon getColorIcon()
JideColorSplitButton(javax.swing.Icon)
.
public void setColorIcon(Icon icon)
icon
- public void setLastSelectedColor(Color color)
color
- public Color getLastSelectedColor()
public Color getSelectedColor()
public void setSelectedColor(Color selectedColor)
getLastSelectedColor()
.
selectedColor
-
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |