templates.diagram.actions
Class DiagramActions.CreateEntityAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by templates.diagram.actions.AbstractDiagramAction
          extended by templates.diagram.actions.DiagramActions.CreateEntityAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Enclosing class:
DiagramActions

public static class DiagramActions.CreateEntityAction
extends AbstractDiagramAction

Action which creates an Entity in a TemplateDiagram.

Author:
Lenko Grigorov
See Also:
Serialized Form

Field Summary
protected  Entity[] buffer
          A buffer which will store the new Entity so it can be passed back.
protected  TemplateDiagram diagram
          The TemplateDiagram context to be used by the action.
protected  java.awt.Point location
          The location for the new Entity.
 
Fields inherited from class templates.diagram.actions.AbstractDiagramAction
parentEdit, usePluralDescription
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
DiagramActions.CreateEntityAction(javax.swing.undo.CompoundEdit parent, TemplateDiagram diagram, java.awt.Point location)
          Construct an action for the given parameters.
DiagramActions.CreateEntityAction(javax.swing.undo.CompoundEdit parent, TemplateDiagram diagram, java.awt.Point location, Entity[] buffer)
          Construct an action for the given parameters.
DiagramActions.CreateEntityAction(TemplateDiagram diagram, java.awt.Point location)
          Construct an action for the given parameters.
DiagramActions.CreateEntityAction(TemplateDiagram diagram, java.awt.Point location, Entity[] buffer)
          Construct an action for the given parameters.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 
Methods inherited from class templates.diagram.actions.AbstractDiagramAction
addBoundsAdjust, execute, postEdit, postEdit, postEditAdjustCanvas, postEditAdjustCanvas, setLastOfMultiple
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

diagram

protected TemplateDiagram diagram
The TemplateDiagram context to be used by the action.


location

protected java.awt.Point location
The location for the new Entity.


buffer

protected Entity[] buffer
A buffer which will store the new Entity so it can be passed back.

Constructor Detail

DiagramActions.CreateEntityAction

public DiagramActions.CreateEntityAction(TemplateDiagram diagram,
                                         java.awt.Point location)
Construct an action for the given parameters.

Parameters:
diagram - the TemplateDiagram to be used by the action
location - the location for the new Entity

DiagramActions.CreateEntityAction

public DiagramActions.CreateEntityAction(TemplateDiagram diagram,
                                         java.awt.Point location,
                                         Entity[] buffer)
Construct an action for the given parameters.

Parameters:
diagram - the TemplateDiagram to be used by the action
location - the location for the new Entity
buffer - the buffer which will store the new Entity so the caller can get access to it

DiagramActions.CreateEntityAction

public DiagramActions.CreateEntityAction(javax.swing.undo.CompoundEdit parent,
                                         TemplateDiagram diagram,
                                         java.awt.Point location)
Construct an action for the given parameters.

Parameters:
parent - the UndoableEdit to which this action should add its own undo information
diagram - the TemplateDiagram to be used by the action
location - the location for the new Entity

DiagramActions.CreateEntityAction

public DiagramActions.CreateEntityAction(javax.swing.undo.CompoundEdit parent,
                                         TemplateDiagram diagram,
                                         java.awt.Point location,
                                         Entity[] buffer)
Construct an action for the given parameters.

Parameters:
parent - the UndoableEdit to which this action should add its own undo information
diagram - the TemplateDiagram to be used by the action
location - the location for the new Entity
buffer - the buffer which will store the new Entity so the caller can get access to it
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)