UTJML

edu.utep.cs.utjml.canica.output
Class OutputPaneController

java.lang.Object
  extended by edu.utep.cs.utjml.canica.output.OutputPaneController
All Implemented Interfaces:
OutputPaneable

public class OutputPaneController
extends Object
implements OutputPaneable

OutputPaneController Implementation class of the OutputPaneable. The OutPutPaneController is the controller class of the Output Subsystem. It is in charge of the implementation of the OutputPaneable class. Create the output view of the system, and display the appropriate data to the views.

Author:
Angelica Berenice Perez Apr 18, 2006

Field Summary
 
Fields inherited from interface edu.utep.cs.utjml.canica.output.OutputPaneable
VIEW_CONSOLE, VIEW_RUNTEST, VIEW_TESTGENERATION
 
Constructor Summary
OutputPaneController()
          Constructors
OutputPaneController(Mainable canica, JMLEditorable jmlEditor)
          Initializes the output pane view and all its components.
 
Method Summary
 void addOutPutToConsole(String output)
          It appends any output text to the console view.
 void focusView(int view)
          This service focus a view, either the console, test generation or run tests cases view.
 OutputStream getOutPutFromConsole()
          It returns the output text from the console view
 JPanel getOutputView()
          It returns the Output view.
 RatListener getTestGenListener()
          It returns the Test Generator listener, which lets add the test data generated from outer tools to this GUI
static void main(String[] args)
          The main entry point of this GUI.
 void printlnToConsole(String output)
          It appends any output text and a NEW LINE to the console view, and removes any highlights in the view.
 void resetRunTestView()
          Clear all values in the view, to start a new test execution.
 void setErrorsToRunTest(int errors)
          Sets the number of errors to the Run Test view
 void setFailureDetailView(junit.runner.FailureDetailView fFailureView)
          It sets the Failure detail view component into the GUI
 void setFailuresToRunTest(int failures)
          Sets the number of failures to the Run Test view
 void setStartToRunTest(int total)
          Adjusts the GUI objects to the beginning of the testing process
 void setSuite(String suiteName)
          Sets the suite name in the GUI.
 void setTestEnded(int runs, boolean successfull)
          Sets the number of runs (successful test cases) and updates the progress bar
 void setTestRunContext(TestRunContext context)
          Sets the Canica test runner context to Run Test Cases outputpane
 void setTestRunView(JPanel testRunView)
          It sets the test run view (contains the test cases and failures in different tabs)
 void showErrorToRunTest(String message)
          It shows an error message to the Status line in the Run Test view
 void showInfoToRunTest(String message)
          It shows information to the Status line in the Run Test view
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputPaneController

public OutputPaneController()
Constructors


OutputPaneController

public OutputPaneController(Mainable canica,
                            JMLEditorable jmlEditor)
Initializes the output pane view and all its components.

Parameters:
canica - Gets the main program
jmlEditor - Gets the JML editor.
Method Detail

getOutputView

public JPanel getOutputView()
Description copied from interface: OutputPaneable
It returns the Output view.

Specified by:
getOutputView in interface OutputPaneable
Returns:
OutputPaneView class contained in a JPanel class.

focusView

public void focusView(int view)
Description copied from interface: OutputPaneable
This service focus a view, either the console, test generation or run tests cases view.

Specified by:
focusView in interface OutputPaneable

addOutPutToConsole

public void addOutPutToConsole(String output)
Description copied from interface: OutputPaneable
It appends any output text to the console view.

Specified by:
addOutPutToConsole in interface OutputPaneable
Parameters:
output - The output text

printlnToConsole

public void printlnToConsole(String output)
Description copied from interface: OutputPaneable
It appends any output text and a NEW LINE to the console view, and removes any highlights in the view.

Specified by:
printlnToConsole in interface OutputPaneable
Parameters:
output - The output text

getOutPutFromConsole

public OutputStream getOutPutFromConsole()
Description copied from interface: OutputPaneable
It returns the output text from the console view

Specified by:
getOutPutFromConsole in interface OutputPaneable
Returns:
All Output text

getTestGenListener

public RatListener getTestGenListener()
Description copied from interface: OutputPaneable
It returns the Test Generator listener, which lets add the test data generated from outer tools to this GUI

Specified by:
getTestGenListener in interface OutputPaneable
Returns:
the object listener

setSuite

public void setSuite(String suiteName)
Sets the suite name in the GUI.

Specified by:
setSuite in interface OutputPaneable
Parameters:
suiteName - Test Data class file name

setTestRunContext

public void setTestRunContext(TestRunContext context)
Sets the Canica test runner context to Run Test Cases outputpane

Specified by:
setTestRunContext in interface OutputPaneable
Parameters:
context - TestRunContext

setFailureDetailView

public void setFailureDetailView(junit.runner.FailureDetailView fFailureView)
It sets the Failure detail view component into the GUI

Specified by:
setFailureDetailView in interface OutputPaneable
Parameters:
fFailureView - failure detail view

setTestRunView

public void setTestRunView(JPanel testRunView)
Description copied from interface: OutputPaneable
It sets the test run view (contains the test cases and failures in different tabs)

Specified by:
setTestRunView in interface OutputPaneable
Parameters:
testRunView - Test run view

resetRunTestView

public void resetRunTestView()
Description copied from interface: OutputPaneable
Clear all values in the view, to start a new test execution.

Specified by:
resetRunTestView in interface OutputPaneable

showInfoToRunTest

public void showInfoToRunTest(String message)
Description copied from interface: OutputPaneable
It shows information to the Status line in the Run Test view

Specified by:
showInfoToRunTest in interface OutputPaneable
Parameters:
message - Message information

showErrorToRunTest

public void showErrorToRunTest(String message)
Description copied from interface: OutputPaneable
It shows an error message to the Status line in the Run Test view

Specified by:
showErrorToRunTest in interface OutputPaneable
Parameters:
message - Message error

setStartToRunTest

public void setStartToRunTest(int total)
Description copied from interface: OutputPaneable
Adjusts the GUI objects to the beginning of the testing process

Specified by:
setStartToRunTest in interface OutputPaneable
Parameters:
total - Total number of test cases

setErrorsToRunTest

public void setErrorsToRunTest(int errors)
Description copied from interface: OutputPaneable
Sets the number of errors to the Run Test view

Specified by:
setErrorsToRunTest in interface OutputPaneable
Parameters:
errors - Total number of errors

setFailuresToRunTest

public void setFailuresToRunTest(int failures)
Description copied from interface: OutputPaneable
Sets the number of failures to the Run Test view

Specified by:
setFailuresToRunTest in interface OutputPaneable
Parameters:
failures - Total number of failures

setTestEnded

public void setTestEnded(int runs,
                         boolean successfull)
Description copied from interface: OutputPaneable
Sets the number of runs (successful test cases) and updates the progress bar

Specified by:
setTestEnded in interface OutputPaneable
Parameters:
runs - Total number of runs
successfull - It tells if the test was successful or not

main

public static void main(String[] args)
The main entry point of this GUI.


UTJML

UTJML is Copyright (C) 2004-2006 by University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the JML project.