org.eclipse.tptp.test.auto.gui.internal.commands
Class ToggleStructuredCommand
java.lang.Object
org.eclipse.tptp.test.auto.gui.internal.macro.AbstractMacroInstruction
org.eclipse.tptp.test.auto.gui.internal.commands.AbstractMacroCommand
org.eclipse.tptp.test.auto.gui.internal.commands.AbstractStructuredCommand
org.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
|
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 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 |
itemState
protected boolean itemState
ToggleStructuredCommand
public ToggleStructuredCommand(MacroCommandShell parent,
WidgetIdentifier wid)
- Parameters:
wid -
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