Method Summary |
|
public ComponentReference | addComponent(Component comp) Add a new component reference for the given component. |
public void | addComponentReference(ComponentReference ref) Add a component reference directly, replacing any existing one with
the same ID. |
ComponentReference | addComponentReference(Element el) Add a new component reference to the script. |
public Element | addContent(Element el) Save component references in addition to everything else. |
public void | addStep(int index, Step step) |
public void | addStep(Step step) |
public void | changeFile(File file) Change the file system basis for the current script. |
public void | clear() Set up a blank script, discarding any current state. |
public static int | countLines(Sequence seq, int index) Return the number of XML lines in the given sequence that precede the
given index. |
protected static Map | createDefaultMap(String filename) |
public Map | getAttributes() Provide XML attributes for this Step. |
public ComponentReference | getComponentReference(Component comp) Return the reference for the given component, or null if none yet
exists. |
public ComponentReference | getComponentReference(String name) Convert the given reference ID into a component reference. |
public Collection | getComponentReferences() Returns a sorted collection of ComponentReferences. |
public String | getContext(Step step) Return a meaningful description of where the Step came from. |
public ClassLoader | getContextClassLoader() Defer to the
UIContext to obtain a
ClassLoader , or use the current
Thread 's
context class loader. |
public String | getDefaultDescription() Return a default description for this Script . |
public File | getDirectory() All relative files should be accessed relative to this directory,
which is the directory where the script resides. |
public File | getFile() Return the file where this script is saved. |
public static File | getFile(Step step) Return the file which defines the given step. |
public String | getFilename() Return the (possibly relative) path to this script. |
protected String | getFullXMLString() |
public Hierarchy | getHierarchy() Return the currently effective
Hierarchy of components. |
public static int | getLine(Step step) Return the approximate line number of the given step. |
public String | getName() |
public Object | getProperty(String name) |
public File | getRelativeTo() By default, all pathnames are relative to the current working
directory. |
public UIContext | getUIContext() |
public String | getUsage() |
public String | getVMArgs() |
public String | getXMLTag() |
public boolean | hasLaunch() Return whether this Script is launchable. |
public boolean | hasTerminate() |
public boolean | isAWTMode() |
public boolean | isDirty() Has this script changed since the last save. |
public boolean | isForked() |
public static boolean | isScript(File file) Return whether the given file looks like a valid AWT script. |
public boolean | isSlowPlayback() |
public void | load(Reader reader) Loads the XML test script. |
public void | load() Read the script from the currently set file. |
protected void | parseAttributes(Map map) Parse XML attributes for the Script. |
protected void | parseChild(Element el) |
public static File | resolveRelativeReferences(File file) It turns out that getAbsolutePath doesn't remove any relative path
entries such as .. |
protected void | runStep(StepRunner runner) |
public void | save(Writer writer) Write the current state of the script to file. |
public void | save() Write the script to file. |
public void | setAWTMode(boolean awt) |
public void | setFile(File file) Set the file system basis for this script object. |
public void | setForked(boolean fork) |
public void | setHierarchy(Hierarchy h) |
public void | setProperty(String name, Object value) |
public void | setRelativeTo(File dir) Indicate that when invoking toXML, a path relative to the given one
should be shown. |
public void | setSlowPlayback(boolean slow) |
public void | setStep(int index, Step step) Replaces the step at the given index. |
public void | setVMArgs(String args) |
public String | toEditableString() Only thing directly editable on a script is its file path. |