|
||||||||||
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.JTreeSelectionFormEditor
public class JTreeSelectionFormEditor
Adapts JTree to act as a single-selection editor (the selected entry in the tree is the editor value).
Constructor Summary | |
---|---|
JTreeSelectionFormEditor(JTree tree)
|
|
JTreeSelectionFormEditor(JTree tree,
Class treeEntryClass,
String description)
|
|
JTreeSelectionFormEditor(JTree tree,
String description)
|
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). |
void |
dispose()
Dispose of the object (unregister listeners, close open resources etc). |
Component |
getEditorComponent()
Get the component, if any, that acts as a UI for this editor. |
String |
getEditorDescription()
Get a short description of the value being edited for this editor (eg 'host name'). |
Object |
getEditorValue()
Get the current value from the form editor. |
Class |
getPreferredValueType()
The preferred type of value for the editor. |
boolean |
isDirectEdit()
True if the editor directly edits the value passed in with setValue (). |
protected void |
selectEntry(Object entry)
|
void |
setEditorDescription(String newValue)
|
void |
setEditorValue(Object value)
Sets the value to be displayed/edited by the form editor. |
void |
valueChanged(TreeSelectionEvent e)
|
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, removeFormEditorListener |
Constructor Detail |
---|
public JTreeSelectionFormEditor(JTree tree)
public JTreeSelectionFormEditor(JTree tree, String description)
public JTreeSelectionFormEditor(JTree tree, Class treeEntryClass, String description)
Method Detail |
---|
public void dispose()
Disposable
dispose
in interface Disposable
public String getEditorDescription()
FormEditor
getEditorDescription
in interface FormEditor
public void setEditorDescription(String newValue)
public Class getPreferredValueType()
FormEditor
FormEditor.setEditorValue(java.lang.Object)
. May
return java.lang.Object to indictate no preferred type.
getPreferredValueType
in interface FormEditor
public boolean isDirectEdit()
FormEditor
isDirectEdit
in interface FormEditor
public void setEditorValue(Object value) throws IllegalFormatException
FormEditor
setEditorValue
in interface FormEditor
value
- 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 Object getEditorValue() throws IllegalFormatException
FormEditor
getEditorValue
in interface FormEditor
IllegalFormatException
public Component getEditorComponent()
FormEditor
getEditorComponent
in interface FormEditor
public void commitEdits()
FormEditor
commitEdits
in interface FormEditor
protected void selectEntry(Object entry)
public void valueChanged(TreeSelectionEvent e)
valueChanged
in interface TreeSelectionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |