org.apache.batik.apps.svgbrowser

Class AbstractCompoundCommand

public abstract class AbstractCompoundCommand extends AbstractUndoableCommand

Abstract compound command. Supports the execute / undo / redo of more than one command
Field Summary
protected ArrayListatomCommands
The atom UndoableCommand command list.
Constructor Summary
AbstractCompoundCommand()
Constructor.
Method Summary
voidaddCommand(UndoableCommand command)
Adds the given command to the atomCommand list.
voidexecute()
intgetCommandNumber()
Returns the command number that this compound command contains.
voidredo()
booleanshouldExecute()
voidundo()

Field Detail

atomCommands

protected ArrayList atomCommands
The atom UndoableCommand command list.

Constructor Detail

AbstractCompoundCommand

public AbstractCompoundCommand()
Constructor.

Method Detail

addCommand

public void addCommand(UndoableCommand command)
Adds the given command to the atomCommand list.

Parameters: command The given command

execute

public void execute()

getCommandNumber

public int getCommandNumber()
Returns the command number that this compound command contains.

Returns: The atom command number

redo

public void redo()

shouldExecute

public boolean shouldExecute()

undo

public void undo()
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.