de.dfg.oc.logfileanalyzer.gui
Class TableClickMouseListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by de.dfg.oc.logfileanalyzer.gui.TableClickMouseListener
All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener

public class TableClickMouseListener
extends MouseAdapter

Listens to mouse events on a table.

Author:
Holger Prothmann

Field Summary
(package private)  JTable table
          The table associated with this TableClickMouseListener.
 
Constructor Summary
TableClickMouseListener(JTable _table)
          Creates a new TableClickMouseListener.
 
Method Summary
private  boolean columnConvertible(int columnId)
          Returns true iff the contents of the given table column can be converted to double.
 ComparisonDataSet determineMinMax(int _columnId, double selected)
          Determines the minimum and maximum value of a table column.
 void mouseClicked(MouseEvent e)
          Reacts on a mouse event that occurred in the table.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

JTable table
The table associated with this TableClickMouseListener.

Constructor Detail

TableClickMouseListener

TableClickMouseListener(JTable _table)
Creates a new TableClickMouseListener.

Parameters:
_table - the table associated with this TableClickMouseListener
Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)
Reacts on a mouse event that occurred in the table. In case of a double click, a new ComparisonFrame is created that compares the classifier currently selected in the table with the table's other classifiers.

Specified by:
mouseClicked in interface MouseListener
Overrides:
mouseClicked in class MouseAdapter

columnConvertible

private boolean columnConvertible(int columnId)
Returns true iff the contents of the given table column can be converted to double.

Parameters:
columnId - id of relevant table column
Returns:
true iff the contents of the given column can be converted to double

determineMinMax

public ComparisonDataSet determineMinMax(int _columnId,
                                         double selected)
Determines the minimum and maximum value of a table column.

Parameters:
_columnId - the id of the table column
selected - the value of the currently selected row
Returns:
a ComparisonDataSet that can be displayed in a ComparisionFrame