dirk_krause.jtools
Class LogContentsForCommand

java.lang.Object
  extended by dirk_krause.jtools.LogContents
      extended by dirk_krause.jtools.LogContentsForCommand

public class LogContentsForCommand
extends LogContents

This class executes one or multiple commands and saves output to show it in a LogWindow.


Field Summary
static java.lang.String[] msgTexts
          Some text fragments needed to build the log text.
 
Fields inherited from class dirk_krause.jtools.LogContents
showAlways, success, textLines, theTexts
 
Constructor Summary
LogContentsForCommand()
          Default constructor.
 
Method Summary
 void addArgv(java.lang.String s)
          Add a string to the command line string collection (command first, arguments follow).
 java.util.Iterator<java.lang.String> getIterator()
          Create an iterator to traverse output line by line.
 void newCommand()
          Prepare to start a new command.
 void run()
          Run the command and save output, build a log text to be shown in a LogWindow.
 void setDirectory(java.lang.String d)
          Set directory in which the command is executed.
 
Methods inherited from class dirk_krause.jtools.LogContents
add, cleanup, getContents, getShowAlways, getSuccess, setShowAlways
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

msgTexts

public static final java.lang.String[] msgTexts
Some text fragments needed to build the log text.

Constructor Detail

LogContentsForCommand

public LogContentsForCommand()
Default constructor.

Method Detail

newCommand

public void newCommand()
Prepare to start a new command. This replaces a new command line string collection by an empty new one.


setDirectory

public void setDirectory(java.lang.String d)
Set directory in which the command is executed.

Parameters:
d - Directory name.

addArgv

public void addArgv(java.lang.String s)
Add a string to the command line string collection (command first, arguments follow).

Parameters:
s - The string to add.

run

public void run()
Run the command and save output, build a log text to be shown in a LogWindow.


getIterator

public java.util.Iterator<java.lang.String> getIterator()
Create an iterator to traverse output line by line.

Returns:
The iterator to use for traversal.