org.apache.felix.ipojo.junit4osgi.command
Class ResultTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.apache.felix.ipojo.junit4osgi.command.ResultTableModel
All Implemented Interfaces:
Serializable, TableModel

public class ResultTableModel
extends AbstractTableModel

Result Table Model. Store the results of executed tests.

Author:
Felix Project Team
See Also:
Serialized Form

Field Summary
static String ERROR
          Error String.
static String FAILURE
          Failure String.
static String SUCCESS
          Success String.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ResultTableModel()
           
 
Method Summary
 void addTest(junit.framework.Test t)
          Adds a sucessfull test.
 void addTest(junit.framework.Test t, junit.framework.AssertionFailedError e)
          Adds a failing test.
 void addTest(junit.framework.Test t, Throwable e)
          Adds a test in error.
 void clear()
          Clear the list.
 int getColumnCount()
           
 String getColumnName(int column)
          Gets column names.
 int getErrors()
          Gets the number of errors.
 int getFailures()
          Gets the number of failures.
 String getMessage(int row, int column)
          Gets the message.
 int getRowCount()
           
 int getSucess()
          Gets the number of success.
 int getTestCount()
           
 Object getValueAt(int rowIndex, int columnIndex)
          Get the Object placed in the JTable.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final String SUCCESS
Success String.

See Also:
Constant Field Values

FAILURE

public static final String FAILURE
Failure String.

See Also:
Constant Field Values

ERROR

public static final String ERROR
Error String.

See Also:
Constant Field Values
Constructor Detail

ResultTableModel

public ResultTableModel()
Method Detail

getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

addTest

public void addTest(junit.framework.Test t,
                    junit.framework.AssertionFailedError e)
Adds a failing test.

Parameters:
t - the test
e - the assertion error

addTest

public void addTest(junit.framework.Test t,
                    Throwable e)
Adds a test in error.

Parameters:
t - the test
e - the thrown error

addTest

public void addTest(junit.framework.Test t)
Adds a sucessfull test.

Parameters:
t - the test

getTestCount

public int getTestCount()

getSucess

public int getSucess()
Gets the number of success.

Returns:
the number of success

getErrors

public int getErrors()
Gets the number of errors.

Returns:
the number of errors

getFailures

public int getFailures()
Gets the number of failures.

Returns:
the number of failures

clear

public void clear()
Clear the list.


getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Get the Object placed in the JTable.

Parameters:
rowIndex - the row
columnIndex - the column
Returns:
the object
See Also:
TableModel.getValueAt(int, int)

getColumnName

public String getColumnName(int column)
Gets column names.

Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel
Parameters:
column - the column
Returns:
the column name
See Also:
AbstractTableModel.getColumnName(int)

getMessage

public String getMessage(int row,
                         int column)
Gets the message.

Parameters:
row - the row
column - the column
Returns:
the message for this cell


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.