org.eclipse.gmf.runtime.lite.commands
Class CreateNotationalNodeCommand
java.lang.Object
org.eclipse.emf.common.command.AbstractCommand
org.eclipse.gmf.runtime.lite.commands.CreateNotationalElementCommand
org.eclipse.gmf.runtime.lite.commands.CreateNotationalNodeCommand
- All Implemented Interfaces:
- org.eclipse.emf.common.command.Command
public class CreateNotationalNodeCommand
- extends CreateNotationalElementCommand
Command to create a notational node within a given parent.
- Author:
- bblajer
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand |
org.eclipse.emf.common.command.AbstractCommand.NonDirtying |
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand |
description, isExecutable, isPrepared, label |
Constructor Summary |
CreateNotationalNodeCommand(org.eclipse.gmf.runtime.notation.View parent,
org.eclipse.emf.ecore.EObject domainElement,
org.eclipse.draw2d.geometry.Rectangle constraint,
IViewDecorator decorator)
|
CreateNotationalNodeCommand(org.eclipse.gmf.runtime.notation.View parent,
org.eclipse.emf.ecore.EObject domainElement,
org.eclipse.draw2d.geometry.Rectangle constraint,
IViewDecorator decorator,
boolean expose)
Creates a command that, upon execution, will create a notational node as a child of the given parent view
to represent the given domain element. |
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
canExecute, chain, dispose, getAffectedObjects, getDescription, getLabel, getResult, setDescription, setLabel, toString |
myExposeCommand
public final org.eclipse.emf.common.command.Command myExposeCommand
CreateNotationalNodeCommand
public CreateNotationalNodeCommand(org.eclipse.gmf.runtime.notation.View parent,
org.eclipse.emf.ecore.EObject domainElement,
org.eclipse.draw2d.geometry.Rectangle constraint,
IViewDecorator decorator)
CreateNotationalNodeCommand
public CreateNotationalNodeCommand(org.eclipse.gmf.runtime.notation.View parent,
org.eclipse.emf.ecore.EObject domainElement,
org.eclipse.draw2d.geometry.Rectangle constraint,
IViewDecorator decorator,
boolean expose)
- Creates a command that, upon execution, will create a notational node as a child of the given parent view
to represent the given domain element.
The created node will be assigned the
Bounds
layout constraint with bounds taken from the given constraint
parameter. The node will be decorated with the given IViewDecorator
.
The node will be optionally made visible by expanding the parent's DrawerStyle
, if one is present.
- Parameters:
parent
- domainElement
- constraint
- decorator
- expose
-
prepare
protected boolean prepare()
- Overrides:
prepare
in class org.eclipse.emf.common.command.AbstractCommand
canUndo
public boolean canUndo()
- Specified by:
canUndo
in interface org.eclipse.emf.common.command.Command
- Overrides:
canUndo
in class org.eclipse.emf.common.command.AbstractCommand
execute
public void execute()
undo
public void undo()
- Specified by:
undo
in interface org.eclipse.emf.common.command.Command
- Overrides:
undo
in class org.eclipse.emf.common.command.AbstractCommand
redo
public void redo()
Copyright © 2012. All Rights Reserved.