org.netbeans.jemmy.operators
Class Operator.MapAction

java.lang.Object
  extended by org.netbeans.jemmy.QueueTool.QueueAction
      extended by org.netbeans.jemmy.operators.Operator.MapAction
All Implemented Interfaces:
Runnable
Enclosing class:
Operator

protected abstract class Operator.MapAction
extends QueueTool.QueueAction

Can be used to simplify nonprimitive type component's methods mapping. Like this:
public Color getBackground() {
return((Color)runMapping(new MapAction("getBackground") {
public Object map() {
return(((Component)getSource()).getBackground());
}
}));
}

See Also:
Operator.runMapping(Operator.MapAction)

Constructor Summary
Operator.MapAction(String description)
          Constructs a MapAction object.
 
Method Summary
 Object launch()
          Method to implement action functionality.
abstract  Object map()
          Executes a map action.
 
Methods inherited from class org.netbeans.jemmy.QueueTool.QueueAction
getDescription, getException, getFinished, getResult, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Operator.MapAction

public Operator.MapAction(String description)
Constructs a MapAction object.

Parameters:
description - an action description.
Method Detail

launch

public final Object launch()
                    throws Exception
Description copied from class: QueueTool.QueueAction
Method to implement action functionality.

Specified by:
launch in class QueueTool.QueueAction
Returns:
an Object - action result
Throws:
Exception

map

public abstract Object map()
                    throws Exception
Executes a map action.

Returns:
an action result.
Throws:
Exception