|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.compiere.swing.CDialog
org.compiere.plaf.CompiereColorEditor
public class CompiereColorEditor
Compiere Color Editor
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| 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 org.compiere.swing.CDialog |
|---|
ACTION_DISPOSE, s_dialogAction, s_disposeKeyStroke |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
|---|
DEFAULT_MODALITY_TYPE |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CompiereColorEditor(Dialog owner,
CompiereColor color)
Create CompiereColor Dialog with color |
|
CompiereColorEditor(Frame owner,
CompiereColor color)
Create CompiereColor Dialog with color |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
Action Listener |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Register a listener for the PropertyChange event. |
String |
getAsText()
Gets the property value as text. |
CompiereColor |
getColor()
Get Color |
Component |
getCustomEditor()
A PropertyEditor may choose to make available a full custom Component that edits its property value. |
String |
getJavaInitializationString()
This method is intended for use when generating Java code to set the value of the property. |
String[] |
getTags()
If the property value must be one of a set of known tagged values, then this method should return an array of the tags. |
Object |
getValue()
Gets the property value. |
boolean |
isPaintable()
Determines whether this property editor is paintable. |
boolean |
isSaved()
Was the selection saved |
void |
paintValue(Graphics gfx,
Rectangle box)
Paint a representation of the value into a given area of screen real estate. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for the PropertyChange event. |
void |
setAsText(String text)
Set the property value by parsing a given String. |
void |
setColor(CompiereColor color)
Set Color and update UI |
void |
setValue(Object value)
Set (or change) the object that is to be edited. |
static CompiereColor |
showDialog(Dialog owner,
CompiereColor color)
Get Background CompiereColor |
static CompiereColor |
showDialog(Frame owner,
CompiereColor color)
Get Background CompiereColor |
boolean |
supportsCustomEditor()
Determines whether this property editor supports a custom editor. |
| Methods inherited from class org.compiere.swing.CDialog |
|---|
dialogInit, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, setTitle |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setUndecorated, setVisible, show, toBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CompiereColorEditor(Frame owner,
CompiereColor color)
owner - ownercolor - Start Color
public CompiereColorEditor(Dialog owner,
CompiereColor color)
owner - ownercolor - Start Color| Method Detail |
|---|
public static CompiereColor showDialog(Frame owner,
CompiereColor color)
owner - ownercolor - optional initial color
public static CompiereColor showDialog(Dialog owner,
CompiereColor color)
owner - ownercolor - optional initial color
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListeneractionPerformed in class CDialoge - eventActionListener.actionPerformed(java.awt.event.ActionEvent)public void setColor(CompiereColor color)
color - colorpublic CompiereColor getColor()
public boolean isSaved()
public void setValue(Object value)
setValue in interface PropertyEditorvalue - The new target object to be edited. Note that this
object should not be modified by the PropertyEditor, rather
the PropertyEditor should create a new object to hold any
modified value.public Object getValue()
getValue in interface PropertyEditorpublic boolean isPaintable()
isPaintable in interface PropertyEditor
public void paintValue(Graphics gfx,
Rectangle box)
If the PropertyEditor doesn't honor paint requests (see isPaintable) this method should be a silent noop.
The given Graphics object will have the default font, color, etc of the parent container. The PropertyEditor may change graphics attributes such as font and color and doesn't need to restore the old values.
paintValue in interface PropertyEditorgfx - Graphics object to paint into.box - Rectangle within graphics object into which we should paint.public String getJavaInitializationString()
Example results are "2", "new Color(127,127,34)", "Color.orange", etc.
getJavaInitializationString in interface PropertyEditorpublic String getAsText()
getAsText in interface PropertyEditorReturns null if the value can't be expressed as an editable string.
If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().
public void setAsText(String text)
throws IllegalArgumentException
setAsText in interface PropertyEditortext - The string to be parsed.
IllegalArgumentExceptionpublic String[] getTags()
getTags in interface PropertyEditorpublic Component getCustomEditor()
The higher-level code that calls getCustomEditor may either embed the Component in some larger property sheet, or it may put it in its own individual dialog, or ...
getCustomEditor in interface PropertyEditorpublic boolean supportsCustomEditor()
supportsCustomEditor in interface PropertyEditorpublic void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface PropertyEditoraddPropertyChangeListener in class Windowlistener - An object to be invoked when a PropertyChange
event is fired.public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface PropertyEditorremovePropertyChangeListener in class Componentlistener - The PropertyChange listener to be removed.
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||