public abstract class SetEndPointCommand extends AbstractTransaction
Modifier and Type | Field and Description |
---|---|
protected Edge |
edge
The edge on which we set the end point.
|
protected AbstractLocation |
location
The original endpoint (or the new endpoint in case the command
is undone.
|
protected Nail |
nail
Any nails created as a side effect of changing the endpoint.
|
committed, document
version
Constructor and Description |
---|
SetEndPointCommand(Document document,
Edge edge) |
Modifier and Type | Method and Description |
---|---|
Nail |
convertToNail(int x,
int y)
Inserts a new nail next to the endpoint and the given position.
|
protected void |
doCancel() |
protected void |
doExecute() |
protected void |
doUndo() |
abstract AbstractLocation |
getLocation()
Returns the current end point.
|
Element |
getModifiedElement() |
protected abstract void |
insertNail(Nail nail)
Inserts a nail next to the end point.
|
void |
moveNailTo(int x,
int y)
Move nail created with convertToNail() to a new position.
|
void |
setEndPoint(AbstractLocation location)
Set the endpoint to the given location.
|
protected abstract void |
setLocation(AbstractLocation location)
Sets the current end point on the edge.
|
protected void |
swap() |
cancel, commit, execute, move, undo
getVersion, setVersion
protected Edge edge
protected AbstractLocation location
protected Nail nail
public abstract AbstractLocation getLocation()
protected abstract void setLocation(AbstractLocation location)
protected abstract void insertNail(Nail nail)
public Nail convertToNail(int x, int y)
public void moveNailTo(int x, int y)
public void setEndPoint(AbstractLocation location)
protected void doCancel()
doCancel
in class AbstractTransaction
protected void doExecute()
doExecute
in class AbstractTransaction
protected void doUndo()
doUndo
in class AbstractTransaction
protected void swap()
public Element getModifiedElement()
Copyright © 2012 Uppsala University and Aalborg University. All Rights Reserved.