|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gef.commands.Command
pl.edu.agh.cast.backward.command.ModifyAttributesCommand
public class ModifyAttributesCommand
Sets new values in AttributeValueContainer
.
Command used in pl.edu.agh.cast.ui.backward.dialogs.AttributeEditorDialog
.
Constructor Summary | |
---|---|
ModifyAttributesCommand(AttributeValueContainer element,
Collection<AttributeValue> newAttributeValues)
Creates new instance of attribute modification command. |
Method Summary | |
---|---|
boolean |
canExecute()
Command can be executed only if: attributes were added or removed attribute values were changed attribute's showAsLabel flag changed Otherwise, command cannot be executed. |
void |
execute()
|
protected void |
fillAttributeHolder(Collection<AttributeValue> newAttributeValues)
Changes attributes and it's values in attributesHolder to attributes attached in input newAttributesValues Collection. |
void |
undo()
|
Methods inherited from class org.eclipse.gef.commands.Command |
---|
canUndo, chain, dispose, getDebugLabel, getLabel, redo, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModifyAttributesCommand(AttributeValueContainer element, Collection<AttributeValue> newAttributeValues)
element
- element whose attributes are to be modifiednewAttributeValues
- collection of new AttributeValue
sMethod Detail |
---|
public boolean canExecute()
canExecute
in class org.eclipse.gef.commands.Command
Command.canExecute()
public void execute()
execute
in class org.eclipse.gef.commands.Command
Command.execute()
public void undo()
undo
in class org.eclipse.gef.commands.Command
Command.undo()
protected void fillAttributeHolder(Collection<AttributeValue> newAttributeValues)
newAttributeValues
- New attributes collection to set in attributesHolder.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |