be.ac.vub.cocompose.eclipse.commands
Class ConnectionCommand

java.lang.Object
  extended byorg.eclipse.gef.commands.Command
      extended bybe.ac.vub.cocompose.eclipse.commands.ConnectionCommand

public class ConnectionCommand
extends Command

Connects two EclipseEclipseRelationElements with an EclipseEclipseRelationship.

Since:
0.2.0
Version:
0.2.0, 02/12/2003
Author:
Dennis Wagelaar

Constructor Summary
ConnectionCommand()
          Creates a ConnectionCommand.
 
Method Summary
 void execute()
           
 Relationship getRelationship()
          Gets the relationship.
 int getSourceIndex()
          Gets the source participant relationship index.
 RelationElement getSourceParticipant()
          Gets the source participant.
 int getTargetIndex()
          Gets the target participant relationship index.
 RelationElement getTargetParticipant()
          Gets the target participant.
protected  void primExecute()
          Execute implementation.
 void redo()
           
 void setRelationship(Relationship relationship)
          Sets the relationship.
 void setSourceIndex(int sourceIndex)
          Sets the source participant relationship index.
 void setSourceParticipant(RelationElement sourceParticipant)
          Sets the source participant.
 void setTargetIndex(int targetIndex)
          Sets the target participant relationship index.
 void setTargetParticipant(RelationElement targetParticipant)
          Sets the target participant.
 void undo()
           
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionCommand

public ConnectionCommand()
Creates a ConnectionCommand.

Method Detail

execute

public void execute()
See Also:
Command.execute()

redo

public void redo()
See Also:
Command.redo()

undo

public void undo()
See Also:
Command.undo()

getSourceParticipant

public RelationElement getSourceParticipant()
Gets the source participant.

Returns:
the source participant.

setSourceParticipant

public void setSourceParticipant(RelationElement sourceParticipant)
Sets the source participant.

Parameters:
sourceParticipant - - the source participant.

getTargetParticipant

public RelationElement getTargetParticipant()
Gets the target participant.

Returns:
the target participant.

setTargetParticipant

public void setTargetParticipant(RelationElement targetParticipant)
Sets the target participant.

Parameters:
targetParticipant - - the target participant.

getRelationship

public Relationship getRelationship()
Gets the relationship.

Returns:
the relationship.

setRelationship

public void setRelationship(Relationship relationship)
Sets the relationship.

Parameters:
relationship - - the relationship.

getSourceIndex

public int getSourceIndex()
Gets the source participant relationship index.

Returns:
the source participant relationship index.

setSourceIndex

public void setSourceIndex(int sourceIndex)
Sets the source participant relationship index.

Parameters:
sourceIndex - - the source participant relationship index.

getTargetIndex

public int getTargetIndex()
Gets the target participant relationship index.

Returns:
the target participant relationship index.

setTargetIndex

public void setTargetIndex(int targetIndex)
Sets the target participant relationship index.

Parameters:
targetIndex - - the target participant relationship index.

primExecute

protected void primExecute()
Execute implementation.

See Also:
Command.execute()