TPTP 4.4.0 Testing Tools Project
Internal API Specification

org.eclipse.tptp.test.auto.gui.internal.commands
Class ToggleStructuredCommand

java.lang.Object
  extended byorg.eclipse.tptp.test.auto.gui.internal.macro.AbstractMacroInstruction
      extended byorg.eclipse.tptp.test.auto.gui.internal.commands.AbstractMacroCommand
          extended byorg.eclipse.tptp.test.auto.gui.internal.commands.AbstractStructuredCommand
              extended byorg.eclipse.tptp.test.auto.gui.internal.commands.ToggleStructuredCommand
All Implemented Interfaces:
IMacroCommand, IMacroInstruction, IPlayable, IWritable
Direct Known Subclasses:
CheckCommand, ExpansionCommand

public abstract class ToggleStructuredCommand
extends AbstractStructuredCommand


Field Summary
protected  boolean itemState
           
 
Fields inherited from class org.eclipse.tptp.test.auto.gui.internal.commands.AbstractStructuredCommand
items
 
Fields inherited from class org.eclipse.tptp.test.auto.gui.internal.commands.AbstractMacroCommand
DESCRIPTIVE_FIELD_BOUND
 
Constructor Summary
ToggleStructuredCommand(MacroCommandShell parent, WidgetIdentifier wid)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Overwirte this method to indicate that if there are two toggle commands with different values, then they are not the same.
abstract  boolean getItemState(org.eclipse.swt.widgets.Widget item)
          Returns the state of the item (e.g. whether it is check/unchecked, expanded/ collapsed, and etc...)
 boolean getValue()
           
 void load(org.w3c.dom.Node node, java.util.Hashtable lineTable)
          Invoked to load the macro instruction based on its corresponding XML node.
 boolean mergeEvent(org.eclipse.swt.widgets.Event e)
          There are more incomming events, merge them appropriately
protected  void writeAdditionalAttributes(java.lang.StringBuffer sb)
          Sub-classes can optionally overwrite this method to write additional attributes to command.
 
Methods inherited from class org.eclipse.tptp.test.auto.gui.internal.commands.AbstractStructuredCommand
findMatches, findObjectId, getCorrespondingObject, getItemAttributes, getItems, getItemsForEvent, playback, playStructuredCommand, playStructuredCommandForFoundMatch, processEvent, write
 
Methods inherited from class org.eclipse.tptp.test.auto.gui.internal.commands.AbstractMacroCommand
findDescriptiveField, findDescriptiveField, getDescriptiveField, getObjectClassName, getParent, getText, getTimeDifference, isRepeatRedundant, setDescriptiveField, setParent, setTimeDifference, toString, write, writeFinish, writeStart
 
Methods inherited from class org.eclipse.tptp.test.auto.gui.internal.macro.AbstractMacroInstruction
bindSourceLocation, getStartLine, getStopLine, getWidgetId, setCorrespondingObject, setWidgetId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.tptp.test.auto.gui.internal.commands.IMacroCommand
getType
 
Methods inherited from interface org.eclipse.tptp.test.auto.gui.internal.core.IMacroInstruction
getStartLine, getStopLine, getWidgetId, setCorrespondingObject, setWidgetId
 

Field Detail

itemState

protected boolean itemState
Constructor Detail

ToggleStructuredCommand

public ToggleStructuredCommand(MacroCommandShell parent,
                               WidgetIdentifier wid)
Parameters:
wid -
Method Detail

mergeEvent

public boolean mergeEvent(org.eclipse.swt.widgets.Event e)
There are more incomming events, merge them appropriately

Specified by:
mergeEvent in interface IMacroCommand
Overrides:
mergeEvent in class AbstractStructuredCommand
Parameters:
e - The event to be merged with this command
See Also:
AbstractMacroCommand.mergeEvent(org.eclipse.swt.widgets.Event)

load

public void load(org.w3c.dom.Node node,
                 java.util.Hashtable lineTable)
          throws org.eclipse.core.runtime.CoreException
Description copied from interface: IMacroInstruction
Invoked to load the macro instruction based on its corresponding XML node.

Specified by:
load in interface IMacroInstruction
Overrides:
load in class AbstractStructuredCommand
Throws:
org.eclipse.core.runtime.CoreException
See Also:
AbstractMacroCommand.load(org.w3c.dom.Node, java.util.Hashtable)

writeAdditionalAttributes

protected void writeAdditionalAttributes(java.lang.StringBuffer sb)
Description copied from class: AbstractStructuredCommand
Sub-classes can optionally overwrite this method to write additional attributes to command.

Overrides:
writeAdditionalAttributes in class AbstractStructuredCommand
Parameters:
sb - The string buffer that the attributes should be written to.

getValue

public boolean getValue()

equals

public boolean equals(java.lang.Object obj)
Overwirte this method to indicate that if there are two toggle commands with different values, then they are not the same.

Overrides:
equals in class AbstractStructuredCommand
Parameters:
obj - The object that this object will be comapred against

getItemState

public abstract boolean getItemState(org.eclipse.swt.widgets.Widget item)
Returns the state of the item (e.g. whether it is check/unchecked, expanded/ collapsed, and etc...)

Parameters:
item - The item for which its state is being queried
Returns:
The state of the item

TPTP 4.4.0 Testing Tools Project
Internal API Specification