net.ponec.jworksheet.gui.models
Class EventTableModel

Package class diagram package EventTableModel
java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.ujoframework.swing.UjoTableModel<Event>
          extended by net.ponec.jworksheet.gui.models.EventTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class EventTableModel
extends UjoTableModel<Event>

Event Table Model

See Also:
Serialized Form

Field Summary
static int ACTION_SELECT_EVENT
           
protected  ApplContext applContext
          Application workSpace
static Event PROPS
          Properties
 
Fields inherited from class org.ujoframework.swing.UjoTableModel
columns, EVENT_REPAINT_HEADER, rows
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
EventTableModel(ApplContext applContext)
          Creates a new instance of UjoTableModel
 
Method Summary
 java.lang.Class getColumnClass(UjoProperty column)
           
 java.lang.String getColumnName(UjoProperty property)
          Returns a localized Column Name
 int getTotalTime()
          Returns a total time
 java.lang.String getTotalTimeHours()
          Returns a total time
 void insertRow(Event row)
          Insert a row to End of model.
 void insertRowAndDefault(Event row)
          Insert a row to End of model and set a Default project
 boolean isCellEditable(int rowIndex, UjoProperty column)
          Is the cell editable?
protected  void performAfterInsertAction(Event insertedRow)
          Splitting of Interval is supported.
 void setRows(java.util.List<Event> events)
           
 void setTimeOfLastPeriod()
          Set a time of the last period.
 void setValueAt(java.lang.Object value, int rowIndex, UjoProperty column)
          Set value to cell.
 void sort(boolean enableInsertAction)
          Sort table and recalculate periods.
 
Methods inherited from class org.ujoframework.swing.UjoTableModel
addRow, cloneRow, deleteRow, fireTableAllRowUpdated, fireTableColumnUpdated, fireTableHeaderRepainted, getColumn, getColumnClass, getColumnCount, getColumnIndex, getColumnName, getRow, getRowCount, getRowIndex, getRowLast, getRowNullable, getUjoManager, getValueAt, getValueAt, initData, isCellEditable, setColumns, setValueAt, sort, sort
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_SELECT_EVENT

public static final int ACTION_SELECT_EVENT
See Also:
Constant Field Values

PROPS

public static final Event PROPS
Properties


applContext

protected ApplContext applContext
Application workSpace

Constructor Detail

EventTableModel

public EventTableModel(ApplContext applContext)
Creates a new instance of UjoTableModel

Parameters:
applContext - Application Context
Method Detail

isCellEditable

public boolean isCellEditable(int rowIndex,
                              UjoProperty column)
Is the cell editable?

Overrides:
isCellEditable in class UjoTableModel<Event>

getColumnName

public java.lang.String getColumnName(UjoProperty property)
Returns a localized Column Name

Overrides:
getColumnName in class UjoTableModel<Event>

insertRow

public void insertRow(Event row)
Insert a row to End of model.


insertRowAndDefault

public void insertRowAndDefault(Event row)
Insert a row to End of model and set a Default project


setTimeOfLastPeriod

public void setTimeOfLastPeriod()
Set a time of the last period.


performAfterInsertAction

protected void performAfterInsertAction(Event insertedRow)
Splitting of Interval is supported. Set a time of the last realPeriod.

Parameters:
insertedRow - Send inserted file

sort

public void sort(boolean enableInsertAction)
Sort table and recalculate periods.


getTotalTime

public int getTotalTime()
Returns a total time


getTotalTimeHours

public java.lang.String getTotalTimeHours()
Returns a total time


getColumnClass

public java.lang.Class getColumnClass(UjoProperty column)
Overrides:
getColumnClass in class UjoTableModel<Event>

setValueAt

public void setValueAt(java.lang.Object value,
                       int rowIndex,
                       UjoProperty column)
Set value to cell.

Overrides:
setValueAt in class UjoTableModel<Event>

setRows

public void setRows(java.util.List<Event> events)
Overrides:
setRows in class UjoTableModel<Event>


Copyright © 2007-2009 PPonec