|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaxodraw.gui.panel.JaxoColorChooser
public class JaxoColorChooser
Color chooser dialog, a wrapper around JColorChooser. Besides allowing to choose an arbitrary color, there are also modes where the colors presented are those available in the colrdvi LaTex package, plus a set of gray scales.
Constructor Summary | |
---|---|
JaxoColorChooser(Component parentc)
Constructor. |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener l)
ChangeEvents will be fired everytime the selected color is changed when the color chooser is on the screen. |
protected void |
createComponents()
Sets up all components of this color chooser. |
void |
dispose()
Dispose existing cached components. |
protected void |
fireStateChanged()
Notifies all listeners of a state change. |
Color |
getColor()
The currently selected color (or null) - updated while the chooser is shown. |
String |
getDialogTitle()
Dialog title - if null (default), a default title will be chosen. |
int |
getMode()
The colors that can be chosen. |
boolean |
hasChanged()
Determines if the color was changed the last time it was shown. |
boolean |
isAdjusting()
Determines if the color change is temporary. |
boolean |
isCancelled()
Determines if the chooser was cancelled the last time it was shown. |
boolean |
isOptional()
Current optional property. |
boolean |
isPermanent()
Whether the chooser stays alive after showing for further requests. |
void |
removeChangeListener(ChangeListener l)
Removes a change listener. |
void |
setColor(Color value)
Set color to be displayed. |
void |
setDialogTitle(String value)
Sets the dialog title. |
void |
setMode(int value)
Sets the current mode. |
void |
setOptional(boolean value)
Sets the optional property. |
void |
setOptionalColor(Color value)
Sets the optional and color properties. |
void |
setPermanent(boolean value)
Whether the chooser stays alive after showing for further requests. |
void |
show()
See the variant that takes a Location argument, which here is taken to be JaxoUtils.RelativeTo('parent'). |
void |
show(Location l)
Brings up a color chooser menu to select the color of the specified JaxoObject. |
void |
updateLanguage()
Updates the component with the current language as set in the preferences ( JaxoPrefs.PREF_LANGUAGE ). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JaxoColorChooser(Component parentc)
parentc
- Component to take as context for the dialog.Method Detail |
---|
public void dispose()
isPermanent()
public void addChangeListener(ChangeListener l)
l
- The listener to add.public void removeChangeListener(ChangeListener l)
l
- The listener to remove.protected void fireStateChanged()
public void setColor(Color value)
value
- color to set.public Color getColor()
public final boolean isOptional()
public void setOptional(boolean value)
value
- The value to set.public void setOptionalColor(Color value)
value
- The color to set.public final boolean isAdjusting()
public boolean isCancelled()
public boolean hasChanged()
public final int getMode()
JaxoColor.JAXO_COLORS_MODE
.
public void setMode(int value)
value
- The mode to set.public void updateLanguage()
JaxoPrefs.PREF_LANGUAGE
).
updateLanguage
in interface JaxoLocalized
public final boolean isPermanent()
dispose()
public void setPermanent(boolean value)
value
- True if the chooser is permanent.public final String getDialogTitle()
public void setDialogTitle(String value)
value
- The dialog title to set.protected void createComponents()
public void show()
public void show(Location l)
l
- The location of the dialog.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |