|
GoGraph |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--javax.swing.table.AbstractTableModel
|
+--gograph.algorithms.courses.GGPriorityQueue
Priority queue based on a sorted set, used in course algorithms. Also used as data model for visualisation in GGTable.
| Field Summary |
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Constructor Summary | |
GGPriorityQueue()
Creates a new instance of GGPriorityQueue. |
|
| Method Summary | |
boolean |
add(java.lang.Object o)
Add element to the sorted set. |
void |
clear()
Empty sorted set. |
java.lang.Object |
first()
Get top element in sorted set. |
java.lang.Class |
getColumnClass(int columnIndex)
Always return DefaultGraphCell.class. |
int |
getColumnCount()
Returns the number of columns in the model. |
java.lang.String |
getColumnName(int column)
Always return null |
int |
getRowCount()
Returns the number of rows in the model. |
boolean |
getShowPriority()
Get flag for elements priorities visualisation in the table. |
java.lang.Object |
getValueAt(int row,
int column)
Returns the value for the cell at column and row. |
boolean |
isCellEditable(int row,
int column)
Always return false to prevent table edition. |
boolean |
isEmpty()
Test sorted set emptiness. |
java.lang.Object |
pop()
Extract element from the top of the sorted set. |
void |
reset()
Reorder sorted set after updating an element priority. |
void |
setShowPriority(boolean isShowPriority)
Set flag for elements priorities visualisation in the table. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GGPriorityQueue()
| Method Detail |
public boolean add(java.lang.Object o)
Updates table model.
o - Element to add.
true if element successfully added, false otherwise.public java.lang.Object pop()
Updates table model.
public void clear()
Updates table model.
public void reset()
Updates table model.
public java.lang.Object first()
No modification.
public void setShowPriority(boolean isShowPriority)
isShowPriority - Boolean to set flag with.public boolean getShowPriority()
public boolean isEmpty()
true if sorted set is empty, false otherwise.public int getColumnCount()
public java.lang.Class getColumnClass(int columnIndex)
DefaultGraphCell.class.
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelcolumnIndex - Column being queried.
DefaultGraphCell.class.public java.lang.String getColumnName(int column)
null, so that no column name is added.
- Specified by:
getColumnName in interface javax.swing.table.TableModel- Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
- Parameters:
column - The column being queried.
- Returns:
- Always
null.
public int getRowCount()
public java.lang.Object getValueAt(int row,
int column)
column and row.
row - Row whose value is to be queried.column - Column whose value is to be queried.
public boolean isCellEditable(int row,
int column)
false to prevent table edition.
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelrow - Row whose value is to be queried.column - Column whose value is to be queried.
false.
|
GoGraph |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||