org.eclipse.tptp.test.auto.gui.internal.commands
Class StructuredSelectionCommand
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.StructuredSelectionCommand
- All Implemented Interfaces:
- IMacroCommand, IMacroInstruction, IPlayable, IWritable
- public class StructuredSelectionCommand
- extends AbstractStructuredCommand
|
Method Summary |
boolean |
equals(java.lang.Object obj)
Overwrite this method in order to indicate that two item selection commands that have
different items are not the same |
protected java.lang.Object[] |
getItemsForEvent(org.eclipse.swt.widgets.Event event)
Returns the items that are embedded in the event passed in |
java.lang.String |
getType()
Returns the type of this command |
boolean |
mergeEvent(org.eclipse.swt.widgets.Event e)
If this command occurs consecutively, then this method
gives this command a chance to merge mutliple commands
together to reduce the overhead. |
protected void |
playStructuredCommand(org.eclipse.swt.widgets.Widget widget,
java.lang.Object[] matches)
Used to play the structured command collectively for all the discovered matches. |
protected void |
playStructuredCommandForFoundMatch(org.eclipse.swt.widgets.Widget widget,
java.lang.Object match)
Some events require to be played as matches are discovered. |
| 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 |
DEFAULT_SELECT
public static final java.lang.String DEFAULT_SELECT
- See Also:
- Constant Field Values
ITEM_SELECT
public static final java.lang.String ITEM_SELECT
- See Also:
- Constant Field Values
StructuredSelectionCommand
public StructuredSelectionCommand(MacroCommandShell parent,
WidgetIdentifier wid,
java.lang.String type)
mergeEvent
public boolean mergeEvent(org.eclipse.swt.widgets.Event e)
- Description copied from interface:
IMacroCommand
- If this command occurs consecutively, then this method
gives this command a chance to merge mutliple commands
together to reduce the overhead.
- Specified by:
mergeEvent in interface IMacroCommand- Overrides:
mergeEvent in class AbstractStructuredCommand
- See Also:
AbstractMacroCommand.mergeEvent(org.eclipse.swt.widgets.Event)
getType
public java.lang.String getType()
- Description copied from interface:
IMacroCommand
- Returns the type of this command
- Returns:
- The type
getItemsForEvent
protected java.lang.Object[] getItemsForEvent(org.eclipse.swt.widgets.Event event)
- Description copied from class:
AbstractStructuredCommand
- Returns the items that are embedded in the event passed in
- Overrides:
getItemsForEvent in class AbstractStructuredCommand
- Parameters:
event - The event
- Returns:
- The items of the event
playStructuredCommand
protected void playStructuredCommand(org.eclipse.swt.widgets.Widget widget,
java.lang.Object[] matches)
- Description copied from class:
AbstractStructuredCommand
- Used to play the structured command collectively for all the discovered matches.
- Specified by:
playStructuredCommand in class AbstractStructuredCommand
- Parameters:
widget - The widgetmatches - The matches discovered
equals
public boolean equals(java.lang.Object obj)
- Overwrite this method in order to indicate that two item selection commands that have
different items are not the same
- Overrides:
equals in class AbstractStructuredCommand
playStructuredCommandForFoundMatch
protected void playStructuredCommandForFoundMatch(org.eclipse.swt.widgets.Widget widget,
java.lang.Object match)
- Description copied from class:
AbstractStructuredCommand
- Some events require to be played as matches are discovered. (e.g. an expansion command
requires to be played for each discovered item in order for successive children to be found)
It's recommended that either playStructuredCommandForFoundMatch or playStructuredCommand be implemented
by clients, eventhough both methods will be invoked.
- Specified by:
playStructuredCommandForFoundMatch in class AbstractStructuredCommand
- Parameters:
widget - The widget