Class CommandJoin
- 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.CommandJoin
-
public class CommandJoin 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 CommandJoin(StreetsideAbstractImage a, StreetsideAbstractImage b)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
-
CommandJoin
public CommandJoin(StreetsideAbstractImage a, StreetsideAbstractImage b)
Main constructor.- Parameters:
a- the first image, that is joined with the second oneb- the second image, that is joined with the first one- Throws:
java.lang.IllegalArgumentException- if the images are already in the same sequencejava.lang.NullPointerException- ifaorbis null
-
-
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
-
-