|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel cz.aiken.util.lwtt.TaskTableModel
public class TaskTableModel
This class represents the task table model.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
TaskTableModel(TaskFrame tf)
Creates a new instance of TaskTableModel |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Processes an action event. |
void |
addNewTask()
Creates a new task. |
void |
cancelAutoSave()
Destroys the timer controlling automatic data saving. |
java.lang.Class<?> |
getColumnClass(int columnIndex)
Returns the class of the given column. |
int |
getColumnCount()
Returns the column count (currently 2). |
java.lang.String |
getColumnName(int column)
Returns the name of the given column. |
static java.io.File |
getDir()
Returns the absolute path to the directory where LWTT data should be saved. |
static java.io.File |
getPath()
Returns the absolute path to the file where LWTT data should be saved. |
int |
getRowCount()
Returns the row count. |
Task |
getTask(int index)
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value at the given coordinates. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Checks whether the given cell is editable. |
boolean |
isRunning(int index)
Checks whether the given task is running. |
void |
loadFromFile()
Loads application's data from the file. |
void |
removeTasks(int start,
int end)
Removes the given tasks. |
void |
resetTasks(int start,
int end)
Resets the given tasks. |
void |
saveToFile()
Saves application's data to the file. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
Sets a new value of the given cell. |
void |
startTasks(int start,
int end)
Starts the given tasks. |
void |
stopAllTasks()
Stops all tasks. |
void |
stopTasks(int start,
int end)
Stops the given tasks. |
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 |
Constructor Detail |
---|
public TaskTableModel(TaskFrame tf)
tf
- task frame instanceMethod Detail |
---|
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
rowIndex
- row indexcolumnIndex
- column index
null
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
aValue
- new valuerowIndex
- row indexcolumnIndex
- column indexpublic java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
column
- column index
public java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
columnIndex
- column index
Void.class
.public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
rowIndex
- row indexcolumnIndex
- column index
true
for the first column (index 0),
false
otherwisepublic Task getTask(int index)
public void addNewTask()
public void removeTasks(int start, int end)
start
- start indexend
- end index (including)public void startTasks(int start, int end)
start
- start indexend
- end index (including)public void stopTasks(int start, int end)
start
- start indexend
- end index (including)public void stopAllTasks()
public void resetTasks(int start, int end)
start
- index of the first resetted taskend
- index of the first NOT resetted task (the first task beyond the interval)public void cancelAutoSave()
public static java.io.File getDir()
public static java.io.File getPath()
public boolean isRunning(int index)
index
- task index
true
for running task,
false
otherwisepublic void loadFromFile()
public void saveToFile()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- action event
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |