tit.gui.widget.FromUntilWidget Class Reference

List of all members.

Public Member Functions

 FromUntilWidget (FromUntilPair[] intervals)
 FromUntilWidget ()
int getRowCount ()
int getColumnCount ()
String getColumnName (int column)
Class<?> getColumnClass (int column)
synchronized boolean isCellEditable (int row, int column)
synchronized Object getValueAt (int row, int column)
synchronized void setValueAt (Object value, int row, int column)
synchronized void addTableModelListener (TableModelListener listener)
synchronized void removeTableModelListener (TableModelListener listener)
void actionPerformed (ActionEvent event)
void valueChanged (ListSelectionEvent event)
FromUntilPair[] getFromUntilPairs ()
void addFromUntilPair (FromUntilPair pair)
void addFromUntilPair (long from, long until)

Private Member Functions

synchronized void notifyListeners ()
synchronized void notifyListeners (int row)

Private Attributes

EventListenerList listeners
List< FromUntilPairpairs
JTable table
JButton addbutton
JButton removebutton

Static Private Attributes

static final int NUMBER_OF_COLUMNS = 2
static final String[] COLUMN_NAME = {"From", "Until"}
static final Class<?>[] COLUMN_CLASS = {Object.class, Object.class}
static final boolean[] COLUMN_EDITABLE = {true, true}
static final int FROM_COLUMN = 0
static final int UNTIL_COLUMN = 1

Detailed Description

A widget wich allows to specify a number of time intervals.
Author:
Bart Sas


Constructor & Destructor Documentation

tit.gui.widget.FromUntilWidget.FromUntilWidget ( FromUntilPair[]  intervals  ) 

Creates a new FromUntilWidget.

Parameters:
intervals The initial intervals.

tit.gui.widget.FromUntilWidget.FromUntilWidget (  ) 

Creates a new FromUntilWidget.


Member Function Documentation

int tit.gui.widget.FromUntilWidget.getRowCount (  ) 

Returns the number of rows.

Returns:
The number of rows.

int tit.gui.widget.FromUntilWidget.getColumnCount (  ) 

Returns the number of columns.

Returns:
The number of columns.

String tit.gui.widget.FromUntilWidget.getColumnName ( int  column  ) 

Returns the name of a column.

Parameters:
column The column's index.
Returns:
Column column's name.

Class<?> tit.gui.widget.FromUntilWidget.getColumnClass ( int  column  ) 

Returns the class of a column.

Parameters:
column The column's index.
Returns:
Column column's class.

synchronized boolean tit.gui.widget.FromUntilWidget.isCellEditable ( int  row,
int  column 
)

Returns whether cell (row, column) is editable or not.

Parameters:
row The cell's row-index.
column The cell's column-index.
Returns:
true if cell (row, column) is editable, false otherwise.

synchronized void tit.gui.widget.FromUntilWidget.notifyListeners (  )  [private]

Notify all listeners that the TableModel has been changed.

synchronized void tit.gui.widget.FromUntilWidget.notifyListeners ( int  row  )  [private]

Notify all listeners that row row has changed.

Parameters:
row The index of the row that has been changed.

synchronized Object tit.gui.widget.FromUntilWidget.getValueAt ( int  row,
int  column 
)

Returns the value of cell (row, column).

Parameters:
row The cell's row-index.
column The cell's column-index.
Returns:
The value of cell (row, column).

synchronized void tit.gui.widget.FromUntilWidget.setValueAt ( Object  value,
int  row,
int  column 
)

Changes the value of cell (row, column).

Parameters:
value The new value of cell (row, column).
row The cell's row-index.
column The cell's column-index.

synchronized void tit.gui.widget.FromUntilWidget.addTableModelListener ( TableModelListener  listener  ) 

Adds a TableModelListener to this ObservationTableModel.

Parameters:
listener The listener we want to add.

synchronized void tit.gui.widget.FromUntilWidget.removeTableModelListener ( TableModelListener  listener  ) 

Removes a TableModelListener from this ObservationTableModel.

Parameters:
listener The listener we want to remove.

void tit.gui.widget.FromUntilWidget.actionPerformed ( ActionEvent  event  ) 

Handles ActionEvents.

Parameters:
event The associated ActionEvent.

void tit.gui.widget.FromUntilWidget.valueChanged ( ListSelectionEvent  event  ) 

Handles ListSelectionEvents.

Parameters:
event The associated ListSelectionEvent.

FromUntilPair [] tit.gui.widget.FromUntilWidget.getFromUntilPairs (  ) 

Returns an array containing all from-until pairs.

Returns:
An array containing all from-until pairs.

void tit.gui.widget.FromUntilWidget.addFromUntilPair ( FromUntilPair  pair  ) 

Adds a FromUntilPair to this FromUntilWidget.

Parameters:
pair The pair to add.

void tit.gui.widget.FromUntilWidget.addFromUntilPair ( long  from,
long  until 
)

Adds a FromUntilPair to this FromUntilWidget.

Parameters:
from The from-time.
until The until-time.


Member Data Documentation

final int tit.gui.widget.FromUntilWidget.NUMBER_OF_COLUMNS = 2 [static, private]

The number of colums.

final String [] tit.gui.widget.FromUntilWidget.COLUMN_NAME = {"From", "Until"} [static, private]

The names of the colums.

final Class<?> [] tit.gui.widget.FromUntilWidget.COLUMN_CLASS = {Object.class, Object.class} [static, private]

The classes of the colums.

final boolean [] tit.gui.widget.FromUntilWidget.COLUMN_EDITABLE = {true, true} [static, private]

Which colums are editable when the measurement is stopped?

final int tit.gui.widget.FromUntilWidget.FROM_COLUMN = 0 [static, private]

The index of the from-column.

final int tit.gui.widget.FromUntilWidget.UNTIL_COLUMN = 1 [static, private]

The index of the until-column.

EventListenerList tit.gui.widget.FromUntilWidget.listeners [private]

This TableModel's listeners.

List<FromUntilPair> tit.gui.widget.FromUntilWidget.pairs [private]

The list of from-until pairs.

JTable tit.gui.widget.FromUntilWidget.table [private]

This FromUntilWidget table.

JButton tit.gui.widget.FromUntilWidget.addbutton [private]

This FromUntilWidget add-button.

JButton tit.gui.widget.FromUntilWidget.removebutton [private]

This FromUntilWidget remove-button.


The documentation for this class was generated from the following file:
Generated on Sun Jun 3 16:44:00 2007 by  doxygen 1.5.1