|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JButton
net.sf.jaxodraw.gui.panel.button.JaxoColorButton
public class JaxoColorButton
Button displaying a color selection - typically used in such a way that clicking it opens a color chooser to change the color.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JButton |
---|
JButton.AccessibleJButton |
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 |
---|
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 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 | |
---|---|
JaxoColorButton()
with Color.black. |
|
JaxoColorButton(Color c)
with the given color. |
Method Summary | |
---|---|
protected void |
fireActionPerformed(ActionEvent e)
Apply an action event. |
JaxoColorChooser |
getChooser()
Chooser to be shown to change the current color automatically on ActionEvents. |
int |
getChooserMode()
Returns the current chooser mode. |
String |
getChooserTitle()
The title of the dialog. |
Color |
getColor()
Current color property. |
boolean |
isOptional()
Current optional property. |
void |
setChooser(JaxoColorChooser value)
Sets the chooser. |
void |
setChooserMode(int value)
Sets the current chooser mode. |
void |
setChooserTitle(String value)
Sets the current chooser title. |
void |
setColor(Color value)
Sets the button color. |
void |
setOptional(boolean value)
Sets the optional property. |
void |
showChooser()
Show the (existing) chooser programmatically, as if the button were clicked. |
Methods inherited from class javax.swing.JButton |
---|
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public JaxoColorButton()
public JaxoColorButton(Color c)
c
- The color of the button.Method Detail |
---|
public final boolean isOptional()
public void setOptional(boolean value)
value
- The value to set.public final Color getColor()
public void setColor(Color value)
value
- The color to set.public final int getChooserMode()
JaxoColorChooser.getMode()
public void setChooserMode(int value)
value
- The mode to set.public final String getChooserTitle()
JaxoColorChooser.getDialogTitle()
public void setChooserTitle(String value)
value
- The title.public final JaxoColorChooser getChooser()
public void setChooser(JaxoColorChooser value)
value
- The chooser to set.public void showChooser()
protected void fireActionPerformed(ActionEvent e)
fireActionPerformed
in class AbstractButton
e
- the action event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |