dirk_krause.jtools
Class LogContents

java.lang.Object
  extended by dirk_krause.jtools.LogContents
Direct Known Subclasses:
LogContentsForCommand

public class LogContents
extends java.lang.Object

This class can be used to transfer log output from external commands in a background thread to a log viewer window in the main thread.


Field Summary
protected  boolean showAlways
          Show contents always or on error only.
protected  boolean success
          Flag to indicate whether or not a program was run successfully.
protected  java.util.ArrayList<java.lang.String> textLines
          Collection of all input lines already found.
protected  java.lang.String[] theTexts
          Texts to be used while building the log text.
 
Constructor Summary
LogContents()
          Default constructor.
 
Method Summary
 void add(java.lang.String s)
          Add a line of text.
 void cleanup()
          Cleanup procedure.
 java.lang.String getContents()
          Retrieve the contents (a text to show in the LogWindow class).
 boolean getShowAlways()
           
 boolean getSuccess()
          Check whether or not all commands have been executed successfully.
 void setShowAlways(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theTexts

protected java.lang.String[] theTexts
Texts to be used while building the log text.


textLines

protected java.util.ArrayList<java.lang.String> textLines
Collection of all input lines already found.


success

protected boolean success
Flag to indicate whether or not a program was run successfully.


showAlways

protected boolean showAlways
Show contents always or on error only.

Constructor Detail

LogContents

public LogContents()
Default constructor.

Method Detail

getContents

public java.lang.String getContents()
Retrieve the contents (a text to show in the LogWindow class).

Returns:
The text to show.

add

public void add(java.lang.String s)
Add a line of text.

Parameters:
s - The text line to add.

getSuccess

public boolean getSuccess()
Check whether or not all commands have been executed successfully.

Returns:
The test result.

getShowAlways

public boolean getShowAlways()

setShowAlways

public void setShowAlways(boolean b)

cleanup

public void cleanup()
Cleanup procedure.