org.safs.tools.drivers
Class STAFProcessContainer.Processor

java.lang.Object
  extended by org.safs.tools.drivers.STAFProcessContainer.Processor
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
STAFProcessContainer

public class STAFProcessContainer.Processor
extends java.lang.Object
implements java.lang.Runnable

Process a component. Will process properties and children based on settings. Will instantiate additional Processors for child components if we are processing children.


Constructor Summary
STAFProcessContainer.Processor(java.lang.Object[] toplevel)
          Constructor provided a predefined top level windows array.
STAFProcessContainer.Processor(java.lang.Object container, int level)
          Constructor with default use of System.out as OutputStream
 
Method Summary
 PCTree getPCTree()
          Accessor for hierarchy information
 boolean isHierarchyDialogClosed()
           
protected  void makeIndent()
          Increase our output indention based on the depth (level) of the hierarchy being processed.
protected  java.lang.String makeName(java.lang.String text, java.lang.String compType)
          Make a name based on the 'text', or if no text, then the 'compType'; Make sure to remove all non-alphanumeric characters first When a name is already in our 'map' then we append an index after the name to make it unique, starting from 2.
 void processParent()
          The primary entry point for processing the initial object.
 void run()
          The Thread.start entry point.
 void setHierarchyDialogClosed(boolean hierarchyDialogClosed)
           
 void setParentText(java.lang.String text)
          Accessor for parentText
 void setPCTree(PCTree atree)
          Accessor for hierarchy information
protected  void showTree(PCTree pctree)
          Show the Hierarchy Tree of AUT.
Note: This method will block the main thread of STAFProcessContainer$Processor
User can click a node on that tree and highlight the component of AUT.
User can triple-click a node or use F2 to modify a node's name.
protected  void write(java.lang.String data)
          write a line of (indented) text to our preset OutputStream.
protected  void writeMap(java.lang.String data)
          write a line of text to our preset AppMap OutputStream.
protected  void writeProperties(java.lang.Object container)
          Get and output the full list of available properties for the container.
protected  void writeTree(PCTree tree)
          Write the raw tree data to System.out and the writeMap function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

STAFProcessContainer.Processor

public STAFProcessContainer.Processor(java.lang.Object container,
                                      int level)
Constructor with default use of System.out as OutputStream

Parameters:
container - STAFProcessContainerResult
level - of object hierarchy

STAFProcessContainer.Processor

public STAFProcessContainer.Processor(java.lang.Object[] toplevel)
Constructor provided a predefined top level windows array.

Parameters:
toplevel - STAFProcessContainerResult[]
Method Detail

isHierarchyDialogClosed

public boolean isHierarchyDialogClosed()

setHierarchyDialogClosed

public void setHierarchyDialogClosed(boolean hierarchyDialogClosed)

run

public void run()
The Thread.start entry point. Always assumes we are processing an Object[] of topwins

Specified by:
run in interface java.lang.Runnable

makeIndent

protected void makeIndent()
Increase our output indention based on the depth (level) of the hierarchy being processed.


setPCTree

public void setPCTree(PCTree atree)
Accessor for hierarchy information


getPCTree

public PCTree getPCTree()
Accessor for hierarchy information


setParentText

public void setParentText(java.lang.String text)
Accessor for parentText


processParent

public void processParent()
The primary entry point for processing the initial object.


makeName

protected java.lang.String makeName(java.lang.String text,
                                    java.lang.String compType)
Make a name based on the 'text', or if no text, then the 'compType'; Make sure to remove all non-alphanumeric characters first When a name is already in our 'map' then we append an index after the name to make it unique, starting from 2.

Parameters:
text - String
compType - String
Returns:
String the name generated

write

protected void write(java.lang.String data)
write a line of (indented) text to our preset OutputStream. This routine adds any required indentation. The newline char is automatically sent after the data is sent.


writeMap

protected void writeMap(java.lang.String data)
write a line of text to our preset AppMap OutputStream. The newline char is automatically sent after the data is sent.


writeProperties

protected void writeProperties(java.lang.Object container)
                        throws java.lang.InterruptedException
Get and output the full list of available properties for the container.

Throws:
java.lang.InterruptedException

writeTree

protected void writeTree(PCTree tree)
Write the raw tree data to System.out and the writeMap function.

Parameters:
tree - stored PCTree hierarchy of our processing.
See Also:
writeMap(String)

showTree

protected void showTree(PCTree pctree)
Show the Hierarchy Tree of AUT.
Note: This method will block the main thread of STAFProcessContainer$Processor
User can click a node on that tree and highlight the component of AUT.
User can triple-click a node or use F2 to modify a node's name.

Parameters:
pctree -
See Also: