com.mtp.pounder
Class ComponentItem

java.lang.Object
  |
  +--com.mtp.pounder.RecordingItem
        |
        +--com.mtp.pounder.ComponentItem
Direct Known Subclasses:
InputMethodItem, KeyItem, MouseClickItem, MouseMotionItem, MouseWheelItem

public abstract class ComponentItem
extends RecordingItem

Item that operates on a single Component.

Author:
Matthew Pekar

Field Summary
protected  ComponentIdentifier component
          Identifier for Component in which the click occured.
protected static Map robots
          Hashmap of GraphicDevice's to Robot's.
protected  int windowID
          ID of Window in which the click occured.
 
Fields inherited from class com.mtp.pounder.RecordingItem
decimalNumberFormat, delay
 
Constructor Summary
ComponentItem(Element e, PounderPrefs prefs, ComponentIdentifierFactory f)
           
ComponentItem(long delay, int windowID, ComponentIdentifier component)
           
 
Method Summary
protected  void addXMLAttributes(Element e, Document doc)
           
 boolean equals(Object o)
          Should be called by all subclasses.
 String getAttribs()
           
 Component getComponent(WindowWatcher ww)
           
 ComponentIdentifier getComponentIdentifier()
           
 Robot getRobot(Component c)
          Return a Robot for the given Component.
 int getWindowID()
           
 void setComponentIdentifier(ComponentIdentifier ci)
           
 void setWindowID(int wid)
           
 
Methods inherited from class com.mtp.pounder.RecordingItem
buildXMLElement, getDelay, instantiate, playback, setDelay, toXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

robots

protected static Map robots
Hashmap of GraphicDevice's to Robot's.


windowID

protected int windowID
ID of Window in which the click occured.


component

protected ComponentIdentifier component
Identifier for Component in which the click occured.

Constructor Detail

ComponentItem

public ComponentItem(Element e,
                     PounderPrefs prefs,
                     ComponentIdentifierFactory f)

ComponentItem

public ComponentItem(long delay,
                     int windowID,
                     ComponentIdentifier component)
Method Detail

addXMLAttributes

protected void addXMLAttributes(Element e,
                                Document doc)
Overrides:
addXMLAttributes in class RecordingItem

equals

public boolean equals(Object o)
Description copied from class: RecordingItem
Should be called by all subclasses.

Overrides:
equals in class RecordingItem

getComponentIdentifier

public ComponentIdentifier getComponentIdentifier()

setComponentIdentifier

public void setComponentIdentifier(ComponentIdentifier ci)

getWindowID

public int getWindowID()

setWindowID

public void setWindowID(int wid)

getRobot

public Robot getRobot(Component c)
               throws IllegalStateException,
                      AWTException
Return a Robot for the given Component. Makes sure it's aimed at the correct screen.

IllegalStateException
AWTException

getComponent

public Component getComponent(WindowWatcher ww)
                       throws NoSuchElementException
NoSuchElementException

getAttribs

public String getAttribs()
Overrides:
getAttribs in class RecordingItem


Copyright © 2002 Matthew Pekar. All Rights Reserved.