|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.swing.commands.AbstractCommand dsto.dfc.swing.commands.AbstractMutableCommand dsto.dfc.swing.commands.AbstractSelectionBasedCommand dsto.dfc.swing.tree.CmdAddEntry
public class CmdAddEntry
Add a new entry as a child of the currently selected entry.
Field Summary |
---|
Fields inherited from class dsto.dfc.swing.commands.AbstractSelectionBasedCommand |
---|
source |
Fields inherited from class dsto.dfc.swing.commands.AbstractMutableCommand |
---|
listeners |
Fields inherited from class dsto.dfc.swing.commands.AbstractCommand |
---|
displayName, icon |
Fields inherited from interface dsto.dfc.swing.icons.Iconic |
---|
NULL_ICON |
Constructor Summary | |
---|---|
protected |
CmdAddEntry()
|
|
CmdAddEntry(DfcTree tree)
|
|
CmdAddEntry(DfcTree tree,
Cloneable entryTemplate)
|
Method Summary | |
---|---|
protected Object |
createNewEntry(Object selectedEntry,
int selectedIndex)
Create a new entry to be added to the tree. |
protected boolean |
entryAdded(TreePath newEntryPath)
Called after a new entry has been added to the model. |
void |
execute()
Execute the command. |
KeyStroke |
getAccelerator()
Get a keyboard accelerator for the command. |
String |
getDescription()
A short description of the command, suitable for a tooltip or use in a status panel. |
String |
getGroupInView(String viewName)
Get the preferred group that this command should appear in for a given view. |
Icon |
getIcon()
The small (16x16) icon for the object. |
char |
getMnemonic()
Get a character shortcut for the command (eg for use on a menu). |
String |
getName()
The formal identifying name for this command (eg edit.Copy, file.Open). |
boolean |
isEditAfterAdd()
|
boolean |
isInteractive()
True if this command will interact with the user when execute() is called. |
void |
selectionChanged(SelectionEvent e)
SelectionListener interface implementation: does nothing. |
void |
setEditAfterAdd(boolean newValue)
Set whether cell editor is invoked on a new entry. |
protected boolean |
updateEnabled()
Return true if the command should be enabled in the current tree context. |
Methods inherited from class dsto.dfc.swing.commands.AbstractSelectionBasedCommand |
---|
dispose |
Methods inherited from class dsto.dfc.swing.commands.AbstractMutableCommand |
---|
addPropertyChangeListener, clone, isEnabled, removePropertyChangeListener, setEnabled, setIcon |
Methods inherited from class dsto.dfc.swing.commands.AbstractCommand |
---|
actionPerformed, canReplace, getDefaultDisplayName, getDisplayName, getLargeIcon, getLogString, setDisplayName |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CmdAddEntry(DfcTree tree)
public CmdAddEntry(DfcTree tree, Cloneable entryTemplate)
protected CmdAddEntry()
Method Detail |
---|
public void setEditAfterAdd(boolean newValue)
public boolean isEditAfterAdd()
public void execute()
Command
execute
in interface Command
execute
in class AbstractCommand
public String getName()
Command
getName
in interface Command
getName
in interface Iconic
getName
in class AbstractCommand
public Icon getIcon()
Iconic
getIcon
in interface Iconic
getIcon
in class AbstractCommand
public String getDescription()
Command
getDescription
in interface Command
getDescription
in class AbstractCommand
public boolean isInteractive()
Command
isInteractive
in interface Command
isInteractive
in class AbstractCommand
public String getGroupInView(String viewName)
Command
If the command changes its group in any view it should generate a groupInView property change event with the old value set to the old group and the new value set to the new group.
getGroupInView
in interface Command
getGroupInView
in class AbstractCommand
viewName
- The name of the view.
public char getMnemonic()
Command
getMnemonic
in interface Command
getMnemonic
in class AbstractCommand
public KeyStroke getAccelerator()
Command
getAccelerator
in interface Command
getAccelerator
in class AbstractCommand
public void selectionChanged(SelectionEvent e)
AbstractSelectionBasedCommand
selectionChanged
in interface SelectionListener
selectionChanged
in class AbstractSelectionBasedCommand
protected Object createNewEntry(Object selectedEntry, int selectedIndex) throws CloneNotSupportedException
selectedEntry
- The currently selected model entry.selectedIndex
- The index of the selected entry.
CloneNotSupportedException
- if a new value could not be
created.protected boolean entryAdded(TreePath newEntryPath)
newEntryPath
- The path to the new entry.
protected boolean updateEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |