|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdsto.dfc.swing.forms.BasicFormEditorEventSource
dsto.dfc.swing.forms.AbstractFormEditor
dsto.dfc.swing.forms.JLabelFormEditor
public class JLabelFormEditor
A read-only editor binding for JLabel's. Supports display of Icon, String and Iconic values.
| Field Summary | |
|---|---|
protected int |
iconicMode
|
protected JLabel |
label
|
static int |
SHOW_LARGE_ICON
Show Iconic largeIcon property as label icon. |
static int |
SHOW_SMALL_ICON
Show Iconic icon property as label icon. |
static int |
SHOW_TEXT
Show Iconic name property as label text. |
protected Object |
value
|
| Fields inherited from class dsto.dfc.swing.forms.AbstractFormEditor |
|---|
converter, description |
| Constructor Summary | |
|---|---|
JLabelFormEditor(JLabel label)
|
|
JLabelFormEditor(JLabel label,
int iconicMode,
ValueConverter converter)
Create a new JLabelFormEditor instance. |
|
JLabelFormEditor(JLabel label,
ValueConverter converter)
|
|
| Method Summary | |
|---|---|
void |
commitEdits()
Commit any changes not already committed into the value of this editor (eg a text editor will attempt to perform any uncommitted text conversions at this point). |
Component |
getEditorComponent()
Get the component, if any, that acts as a UI for this editor. |
Object |
getEditorValue()
Get the current value from the form editor. |
boolean |
isDirectEdit()
True if the editor directly edits the value passed in with setValue (). |
void |
setEditorValue(Object newValue)
Sets the value to be displayed/edited by the form editor. |
| Methods inherited from class dsto.dfc.swing.forms.AbstractFormEditor |
|---|
getEditorDescription, getPreferredValueType, setEditorDescription |
| Methods inherited from class dsto.dfc.swing.forms.BasicFormEditorEventSource |
|---|
addFormEditorListener, clone, fireEditComitted, fireEditCommitRequested, fireEditCommitted, removeFormEditorListener, setFormEditorEventSource |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface dsto.dfc.swing.forms.FormEditor |
|---|
addFormEditorListener, getEditorDescription, getPreferredValueType, removeFormEditorListener |
| Field Detail |
|---|
public static final int SHOW_TEXT
public static final int SHOW_SMALL_ICON
public static final int SHOW_LARGE_ICON
protected JLabel label
protected Object value
protected int iconicMode
| Constructor Detail |
|---|
public JLabelFormEditor(JLabel label)
public JLabelFormEditor(JLabel label,
ValueConverter converter)
public JLabelFormEditor(JLabel label,
int iconicMode,
ValueConverter converter)
label - The label to bind.iconicMode - Used to resolve display of Iconic values. See
docs for SHOW_TEXT, SHOW_SMALL_ICON and SHOW_LARGE_ICON for
details.converter - A value converter for conversion between the
value and String.SHOW_TEXT,
SHOW_LARGE_ICON,
SHOW_SMALL_ICON| Method Detail |
|---|
public boolean isDirectEdit()
FormEditor
isDirectEdit in interface FormEditorisDirectEdit in class AbstractFormEditor
public void setEditorValue(Object newValue)
throws IllegalFormatException
FormEditor
setEditorValue in interface FormEditorsetEditorValue in class AbstractFormEditornewValue - The value to display.
IllegalFormatException - if the value was not in the
correct format for display by this editor. The source specified
by the exception should be this FormEditor instance or a child.public void commitEdits()
FormEditor
commitEdits in interface FormEditorcommitEdits in class AbstractFormEditorpublic Object getEditorValue()
FormEditor
getEditorValue in interface FormEditorgetEditorValue in class AbstractFormEditorpublic Component getEditorComponent()
FormEditor
getEditorComponent in interface FormEditorgetEditorComponent in class AbstractFormEditor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||