Class CommandUnjoin
- java.lang.Object
-
- org.openstreetmap.josm.plugins.streetside.history.commands.StreetsideCommand
-
- org.openstreetmap.josm.plugins.streetside.history.commands.StreetsideExecutableCommand
-
- org.openstreetmap.josm.plugins.streetside.history.commands.CommandUnjoin
-
public class CommandUnjoin extends StreetsideExecutableCommand
Command joined when joining two images into the same sequence.
-
-
Field Summary
Fields Modifier and Type Field Description private StreetsideAbstractImageaprivate StreetsideAbstractImageb-
Fields inherited from class org.openstreetmap.josm.plugins.streetside.history.commands.StreetsideCommand
images
-
-
Constructor Summary
Constructors Constructor Description CommandUnjoin(java.util.List<StreetsideAbstractImage> images)Main constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Executes the command.voidredo()Redoes the action.voidsum(StreetsideCommand command)If two equal commands are applied consecutively to the same set of images, they are summed in order to reduce them to just one command.java.lang.StringtoString()voidundo()Undoes the action.
-
-
-
Field Detail
-
a
private final StreetsideAbstractImage a
-
b
private final StreetsideAbstractImage b
-
-
Constructor Detail
-
CommandUnjoin
public CommandUnjoin(java.util.List<StreetsideAbstractImage> images)
Main constructor.- Parameters:
images- The two images that are going to be unjoined. Must be of exactly size 2.- Throws:
java.lang.IllegalArgumentException- if the List size is different from 2.
-
-
Method Detail
-
execute
public void execute()
Description copied from class:StreetsideExecutableCommandExecutes the command. It is run when the command is added to the history record.- Specified by:
executein classStreetsideExecutableCommand
-
undo
public void undo()
Description copied from class:StreetsideCommandUndoes the action.- Specified by:
undoin classStreetsideCommand
-
redo
public void redo()
Description copied from class:StreetsideCommandRedoes the action.- Specified by:
redoin classStreetsideCommand
-
sum
public void sum(StreetsideCommand command)
Description copied from class:StreetsideCommandIf two equal commands are applied consecutively to the same set of images, they are summed in order to reduce them to just one command.- Specified by:
sumin classStreetsideCommand- Parameters:
command- The command to be summed to last command.
-
toString
public java.lang.String toString()
- Specified by:
toStringin classStreetsideCommand
-
-