pl.edu.agh.cast.schema.editor.command.bendpoints
Class AbstractBendpointCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by pl.edu.agh.cast.schema.editor.command.bendpoints.AbstractBendpointCommand
Direct Known Subclasses:
CreateBendpointCommand, DeleteBendpointCommand, MoveBendpointCommand

public abstract class AbstractBendpointCommand
extends org.eclipse.gef.commands.Command

Abstract command to manage bend points. Contains generic info about relative bendpoints.

Author:
AGH CAST Team

Field Summary
protected  SchemaConnectionBendpoint bendpoint
          Bend point this object is referring to
protected  IVisualSchemaConnection connection
          Connection this object is referring to
protected  SchemaPolylineConnection connectionFigure
          Reference to connection figure
protected  org.eclipse.draw2d.geometry.Dimension d1
          First dimensions describing location of bend point relating to connection
protected  org.eclipse.draw2d.geometry.Dimension d2
          Second dimensions describing location of bend point relating to connection
protected  int index
          Index of bend point in constraint list
protected  org.eclipse.draw2d.geometry.Point location
          Location of mouse cursor while dropping the handle
 
Constructor Summary
AbstractBendpointCommand()
           
 
Method Summary
 void setConnection(IVisualSchemaConnection connection)
           
 void setConnectionFigure(SchemaPolylineConnection connectionFigure)
          Sets connection figure.
 void setIndex(int index)
           
 void setLocation(org.eclipse.draw2d.geometry.Point location)
           
 void setRelativeDimensions(org.eclipse.draw2d.geometry.Dimension dim1, org.eclipse.draw2d.geometry.Dimension dim2)
          Sets dimensions describing location of bend point relating to connection.
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, canUndo, chain, dispose, execute, getDebugLabel, getLabel, redo, setDebugLabel, setLabel, undo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

protected IVisualSchemaConnection connection
Connection this object is referring to


connectionFigure

protected SchemaPolylineConnection connectionFigure
Reference to connection figure


location

protected org.eclipse.draw2d.geometry.Point location
Location of mouse cursor while dropping the handle


index

protected int index
Index of bend point in constraint list


bendpoint

protected SchemaConnectionBendpoint bendpoint
Bend point this object is referring to


d1

protected org.eclipse.draw2d.geometry.Dimension d1
First dimensions describing location of bend point relating to connection


d2

protected org.eclipse.draw2d.geometry.Dimension d2
Second dimensions describing location of bend point relating to connection

Constructor Detail

AbstractBendpointCommand

public AbstractBendpointCommand()
Method Detail

setIndex

public void setIndex(int index)

setLocation

public void setLocation(org.eclipse.draw2d.geometry.Point location)

setConnection

public void setConnection(IVisualSchemaConnection connection)

setRelativeDimensions

public void setRelativeDimensions(org.eclipse.draw2d.geometry.Dimension dim1,
                                  org.eclipse.draw2d.geometry.Dimension dim2)
Sets dimensions describing location of bend point relating to connection.

Parameters:
dim1 - distance between connection start and bendpoint
dim2 - distance between connection end and bendpoint

setConnectionFigure

public void setConnectionFigure(SchemaPolylineConnection connectionFigure)
Sets connection figure.

Parameters:
connectionFigure - the connectionFigure to set


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.