Package com.uppaal.model.core2.lsc
Class ChangeMessageEndCommand
- java.lang.Object
-
- com.uppaal.model.core2.AbstractCommand
-
- com.uppaal.model.core2.AbstractTransaction
-
- com.uppaal.model.core2.lsc.ChangeMessageEndCommand
-
- All Implemented Interfaces:
Command
,CommonConstants
,LscConstants
public class ChangeMessageEndCommand extends AbstractTransaction implements LscConstants
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
changeSource
protected Message
element
protected InstanceLine
newEnd
protected int
newX
protected int
newY
protected InstanceLine
oldEnd
protected int
oldX
protected int
oldY
-
Fields inherited from class com.uppaal.model.core2.AbstractTransaction
commandManager, committed
-
Fields inherited from class com.uppaal.model.core2.AbstractCommand
version
-
Fields inherited from interface com.uppaal.model.core2.CommonConstants
AREA_SELECT_COL, ARROW_ANGLE, ARROW_LENGTH, BIGFONT, BIGFONTNAME, EMPH_COL, FONT, FONTNAME, GLOBAL_DECL_COL, GLOBAL_PROCESSASSIGN_COL, GLOBAL_SYSTEM_COL, GRIDCHANGE, GRIDCOLOR, GRIDMIN, LEVEL, MOUSE_OVER_COL, MOUSE_OVER_REL_COL, PART_COV_COL, PROCESS_FILL_COL, PROCESS_OUTLINE_COL, SELECTED_COL, SNAP_PER_GRID, TEMPLATE_NAME_COL, TEMPLATE_PARAMLIST_COL, TRACE_COV_COL
-
Fields inherited from interface com.uppaal.model.core2.lsc.LscConstants
ANCHOR_PRECHART_RADIUS, ANCHOR_RADIUS, ARROW_BASE, ARROW_HEIGHT, CONDITION_COLD_COL, CONDITION_HOT_COL, CONDITION_SIDES, CONDITION_UPDATE_HEIGHT, CUT_SIDE_DISTANCE, CUT_Y_DISTANCE, FOOT_TOUCH_DISTANCE, INSTANCE_FILL_COL, INSTANCE_FOOT_HEIGHT, INSTANCE_FOOT_WIDTH, INSTANCE_HEIGHT, INSTANCE_LENGTH, INSTANCE_LINE_COL, INSTANCE_MIN_WIDTH, LOC_DISTANCE, MESSAGE_COL, MESSAGE_LABEL_COL, PRECHART_COL, PRECHART_MIN_HEIGHT, PRECHART_SIDE_DISTANCE, PRECHART_TOP_DISTANCE, TOP_DISTANCE, TOUCH_DISTANCE, TOUCH_INSTANCE_DISTANCE, UPDATE_COL
-
-
Constructor Summary
Constructors Constructor Description ChangeMessageEndCommand(CommandManager commandManager, Element element, boolean source)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeEnd(int x)
Change the end of the messageprotected void
doCancel()
Undo the translation.protected void
doExecute()
protected void
doUndo()
Element
getModifiedElement()
void
setFinalEnd(InstanceLine end)
Set the final value-
Methods inherited from class com.uppaal.model.core2.AbstractTransaction
cancel, commit, execute, move, undo
-
Methods inherited from class com.uppaal.model.core2.AbstractCommand
getVersion, merge, setVersion
-
-
-
-
Field Detail
-
oldEnd
protected InstanceLine oldEnd
-
element
protected Message element
-
newEnd
protected InstanceLine newEnd
-
changeSource
protected boolean changeSource
-
oldX
protected int oldX
-
newX
protected int newX
-
oldY
protected int oldY
-
newY
protected int newY
-
-
Constructor Detail
-
ChangeMessageEndCommand
public ChangeMessageEndCommand(CommandManager commandManager, Element element, boolean source)
Constructor- Parameters:
commandManager
- - The command managerelement
- - The change elementsource
- - Is the source
-
-
Method Detail
-
changeEnd
public void changeEnd(int x)
Change the end of the message- Parameters:
x
- - The input value for the 'x'
-
setFinalEnd
public void setFinalEnd(InstanceLine end)
Set the final value- Parameters:
end
- - The end value
-
doCancel
protected void doCancel()
Undo the translation. All elements are moved back to their original position. The translation can only be canceled as long as it has not been committed.- Specified by:
doCancel
in classAbstractTransaction
-
doExecute
protected void doExecute()
- Specified by:
doExecute
in classAbstractTransaction
-
doUndo
protected void doUndo()
- Specified by:
doUndo
in classAbstractTransaction
-
getModifiedElement
public Element getModifiedElement()
- Specified by:
getModifiedElement
in interfaceCommand
- Returns:
- the modified element or its closest relative (sibling or parent) if the element is not displayed.
-
-