com.mtp.pounder
Class RecordingItem

java.lang.Object
  |
  +--com.mtp.pounder.RecordingItem
Direct Known Subclasses:
ComponentItem, DummyRecordingItem, WindowAssertItem, WindowGainedFocusItem, WindowMovedItem, WindowSizeChangeItem, WindowStateChangedItem

public abstract class RecordingItem
extends Object

This represents a single action in a recording. It can be played back at a later time.

Author:
Matthew Pekar

Field Summary
protected static NumberFormat decimalNumberFormat
          Little utility class for printing decimals in an easy-on-the-eye way.
protected  long delay
           
 
Constructor Summary
RecordingItem(Element e, PounderPrefs prefs, ComponentIdentifierFactory f)
           
RecordingItem(long delay)
           
 
Method Summary
protected  void addXMLAttributes(Element e, Document doc)
           
protected abstract  Element buildXMLElement(Document doc)
           
 boolean equals(Object o)
          Should be called by all subclasses.
protected  String getAttribs()
           
 long getDelay()
           
static RecordingItem instantiate(Element xml, PounderPrefs prefs, ComponentIdentifierFactory f)
          Attempt to instantiate the given item given an XML Element.
abstract  void playback(WindowWatcher ww, PounderPrefs prefs)
          Playback on this Component.
 void setDelay(long d)
           
 Element toXML(Document doc)
          Subclasses should override buildXMLNode() and addXMLAttributes().
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

decimalNumberFormat

protected static NumberFormat decimalNumberFormat
Little utility class for printing decimals in an easy-on-the-eye way.


delay

protected long delay
Constructor Detail

RecordingItem

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

RecordingItem

public RecordingItem(long delay)
Method Detail

instantiate

public static RecordingItem instantiate(Element xml,
                                        PounderPrefs prefs,
                                        ComponentIdentifierFactory f)
                                 throws ClassNotFoundException,
                                        NoSuchMethodException,
                                        IllegalAccessException,
                                        InstantiationException
Attempt to instantiate the given item given an XML Element.

ClassNotFoundException
NoSuchMethodException
IllegalAccessException
InstantiationException

getDelay

public long getDelay()

setDelay

public void setDelay(long d)

toXML

public final Element toXML(Document doc)
Subclasses should override buildXMLNode() and addXMLAttributes().


buildXMLElement

protected abstract Element buildXMLElement(Document doc)

addXMLAttributes

protected void addXMLAttributes(Element e,
                                Document doc)

playback

public abstract void playback(WindowWatcher ww,
                              PounderPrefs prefs)
                       throws Exception
Playback on this Component.

Exception

equals

public boolean equals(Object o)
Should be called by all subclasses.

Overrides:
equals in class Object

getAttribs

protected String getAttribs()


Copyright © 2002 Matthew Pekar. All Rights Reserved.