public abstract class AbstractOperation<E extends org.eclipse.gef.EditPart> extends Object implements Operation
Operation
.Modifier and Type | Class and Description |
---|---|
protected class |
AbstractOperation.Context
Context.
|
Constructor and Description |
---|
AbstractOperation(String actionText,
Class<E> editPartType)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
String |
getActionText()
Obtains the text to use for the
IAction . |
boolean |
isApplicable(org.eclipse.gef.EditPart[] editParts)
Indicates if this
Operation is applicable for the input
EditPart instances. |
protected static <T extends org.eclipse.gef.EditPart> |
isAssignable(Class<T> editPartType,
org.eclipse.gef.EditPart[] editParts)
Returns whether all the
EditPart instances are assignable to the
EditPart type. |
protected abstract void |
perform(AbstractOperation.Context context)
Performs the
Operation on the particular
AbstractOfficeFloorEditPart . |
void |
perform(OperationContext context)
Performs this
Operation . |
public AbstractOperation(String actionText, Class<E> editPartType)
actionText
- Action
text.editPartType
- AbstractOfficeFloorEditPart
type being handled.protected static <T extends org.eclipse.gef.EditPart> boolean isAssignable(Class<T> editPartType, org.eclipse.gef.EditPart[] editParts)
EditPart
instances are assignable to the
EditPart
type.T
- EditPart
type.editPartType
- EditPart
type.editParts
- EditPart
instances.true
if all assignable.public String getActionText()
Operation
IAction
.getActionText
in interface Operation
IAction
.public boolean isApplicable(org.eclipse.gef.EditPart[] editParts)
Operation
Operation
is applicable for the input
EditPart
instances.isApplicable
in interface Operation
editParts
- EditPart
instances.true
if this Operation
is applicable for the
input EditPart
instances.public void perform(OperationContext context)
Operation
Operation
.perform
in interface Operation
context
- OperationContext
.protected abstract void perform(AbstractOperation.Context context)
Operation
on the particular
AbstractOfficeFloorEditPart
.context
- AbstractOperation.Context
.Copyright © 2005–2016. All rights reserved.