public class ActionAddShape
extends org.eclipse.jface.action.Action
Action for adding a specific shape to the ShapeTreeView
Constructor and Description |
---|
ActionAddShape(ShapeTreeView view,
java.lang.String shapeType)
Constructor for creating new PrimitiveShapes with a given ShapeType
|
Modifier and Type | Method and Description |
---|---|
INode |
createShape()
Creates a shape corresponding to this Action's ShapeType or OperatorType
|
org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor()
Returns the appropriate image descriptor for the action's icon
|
void |
run()
Runs this action
|
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
public ActionAddShape(ShapeTreeView view, java.lang.String shapeType)
Constructor for creating new PrimitiveShapes with a given ShapeType
view
- The current ShapeTreeViewer
shapeType
- The type of PrimitiveShape to create with the action is triggered
public void run()
Runs this action
Each action implementation must define the steps needed to carry out this action.
run
in interface org.eclipse.jface.action.IAction
run
in class org.eclipse.jface.action.Action
public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
getImageDescriptor
in interface org.eclipse.jface.action.IAction
getImageDescriptor
in class org.eclipse.jface.action.Action
Action.getImageDescriptor()
public INode createShape()
Creates a shape corresponding to this Action's ShapeType or OperatorType
The newly created shape