|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
dsto.dfc.swing.undo.AbstractMonitoredEdit
dsto.dfc.swing.undo.PropertyEdit
dsto.dfc.swing.undo.PropertyEditBean
dsto.dfc.swing.panels.ActivePanelEdit
public class ActivePanelEdit
Edit for changing the active panel of the PanelManager. Checks for invalid panels.
Field Summary | |
---|---|
protected String |
newActivePanelName
|
protected String |
oldActivePanelName
|
static boolean |
PANELS_UNLOCKED
|
Fields inherited from class dsto.dfc.swing.undo.PropertyEdit |
---|
newValue, oldValue, propertyName, source |
Fields inherited from class dsto.dfc.swing.undo.AbstractMonitoredEdit |
---|
alive, ICON, parameterNames, parameterValues |
Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
---|
RedoName, UndoName |
Fields inherited from interface dsto.dfc.swing.icons.Iconic |
---|
NULL_ICON |
Constructor Summary | |
---|---|
ActivePanelEdit()
For bean serialisation only |
|
ActivePanelEdit(PanelManager panelManager,
int oldActivePanelIndex,
int newActivePanelIndex)
|
Method Summary | |
---|---|
boolean |
canRedo()
|
boolean |
canUndo()
|
String |
getDescription()
Returns a description of this type of UndoableEdit . |
Icon |
getIcon()
The small (16x16) icon for the object. |
String |
getNameForPanelType()
|
String |
getNewActivePanelName()
|
String |
getOldActivePanelName()
|
String |
getPresentationName()
Returns a presentation name of the form: |
Object |
getSource()
Overridden to prevent PanelManager.Panel serialisation attempt. |
String |
nameForPanelAt(Object index)
|
boolean |
panelsUnlocked()
|
void |
redo()
Sets the PropertyEdit.source 's propertyName value to newValue. |
void |
restoreContext(HashMap context)
|
void |
setNewActivePanelName(String name)
|
void |
setOldActivePanelName(String name)
|
void |
setSource(Object newSource)
Overridden to prevent PanelManager.Panel serialisation attempt. |
void |
undo()
Sets the PropertyEdit.source 's propertyName value to oldValue. |
protected void |
writeSource(ObjectOutputStream out)
Override this method if your PropertyEdit.source is not serialisable. |
Methods inherited from class dsto.dfc.swing.undo.PropertyEditBean |
---|
getNewValue, getOldValue, setNewValue, setOldValue |
Methods inherited from class dsto.dfc.swing.undo.PropertyEdit |
---|
getPropertyName, getRedoPresentationName, getUndoPresentationName, setPropertyName, setPropertyValue, writeValue |
Methods inherited from class dsto.dfc.swing.undo.AbstractMonitoredEdit |
---|
clone, die, getLargeIcon, getName, getParameterNames, getParameterValues, setParameterNames, setParameterValues |
Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
---|
addEdit, isSignificant, replaceEdit, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.swing.undo.UndoableEdit |
---|
addEdit, isSignificant, replaceEdit |
Field Detail |
---|
public static boolean PANELS_UNLOCKED
protected String oldActivePanelName
protected String newActivePanelName
Constructor Detail |
---|
public ActivePanelEdit()
public ActivePanelEdit(PanelManager panelManager, int oldActivePanelIndex, int newActivePanelIndex)
Method Detail |
---|
public Object getSource()
getSource
in class PropertyEditBean
public void setSource(Object newSource)
setSource
in class PropertyEditBean
public String getOldActivePanelName()
public void setOldActivePanelName(String name)
public String getNewActivePanelName()
public void setNewActivePanelName(String name)
public String getDescription()
PropertyEdit
UndoableEdit
.
getDescription
in interface MonitoredEdit
getDescription
in class PropertyEditBean
public String nameForPanelAt(Object index)
public String getNameForPanelType()
public String getPresentationName()
PropertyEdit
"If thePropertyEdit.source
" change "PropertyEdit.propertyName
[PropertyEdit.oldValue
} ->PropertyEdit.newValue
]@quot;
Object.toString()
methods of the PropertyEdit.source
,
PropertyEdit.oldValue
, or PropertyEdit.newValue
are memory references, then their
class name is displayed instead for readability purposes.
getPresentationName
in interface UndoableEdit
getPresentationName
in class PropertyEdit
public boolean panelsUnlocked()
public void undo()
PropertyEdit
PropertyEdit.source
's propertyName value to oldValue.
undo
in interface UndoableEdit
undo
in class PropertyEdit
public void redo()
PropertyEdit
PropertyEdit.source
's propertyName value to newValue.
redo
in interface UndoableEdit
redo
in class PropertyEdit
public boolean canUndo()
canUndo
in interface UndoableEdit
canUndo
in class AbstractMonitoredEdit
public boolean canRedo()
canRedo
in interface UndoableEdit
canRedo
in class AbstractMonitoredEdit
public Icon getIcon()
Iconic
getIcon
in interface Iconic
getIcon
in class AbstractMonitoredEdit
public void restoreContext(HashMap context)
restoreContext
in interface Restorable
restoreContext
in class AbstractMonitoredEdit
protected void writeSource(ObjectOutputStream out) throws IOException
PropertyEdit
PropertyEdit.source
is not serialisable. Make sure
that only one Object
is written to the out stream,
however.
writeSource
in class PropertyEdit
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |