|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
hicosim.components.frontend.tablemodels.CustomAbstractTableModel
public class CustomAbstractTableModel
This class extends the super class AbstractTableModel and provides methods to hide and show rows and columns and also to add and remove rows and columns.
| Constructor Summary | |
|---|---|
CustomAbstractTableModel()
|
|
CustomAbstractTableModel(java.util.Vector<java.util.Vector<java.lang.Object>> data)
|
|
| Method Summary | |
|---|---|
void |
addColumn()
This method adds a column at the end of the JTable. |
void |
addRow()
This method adds a row at the end of the JTable. |
int |
getAmountOfColumns()
This method returns the amount of columns as an Integer-Object. |
int |
getAmountOfRows()
This method returns the amount of rows as an Integer-Object. |
int |
getColumnCount()
This method returns the amount of visible columns as an Integer-Object. |
int |
getRowCount()
This method returns the amount of visible rows as an Integer-Object. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
This method returns a value, which is an Object, located at the passed indexes int "rowIndex" and int "columnIndex". |
void |
hideColumn(int column)
This method hides a column, which is specified by the passed Integer-Object "column". |
void |
hideRow(int row)
This method hides a row, which is specified by the passed Integer-Object "row". |
void |
removeLastColumn()
This method removes the last column of the JTable. |
void |
removeLastRow()
This method removes the last row of the JTable. |
void |
setData(java.util.Vector<java.util.Vector<java.lang.Object>> data)
This method is used to set the data vector of the JTable, which is using this class. |
void |
setJTableSize(int rows,
int columns)
This method sets the size of the JTable. |
void |
setRow(java.util.Vector<java.lang.Object> rowData,
int row)
This method sets the content of the passed row, by using the Vector |
void |
setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
This method sets the content of the passed cell, specified by the two Integer-Objects "rowIndex" and "columnIndex", using the Object value. |
void |
showColumn(int column)
This method shows a column, which is specified by the passed Integer-Object "column". |
void |
showRow(int row)
This method shows a row, which is specified by the passed Integer-Object "row". |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CustomAbstractTableModel(java.util.Vector<java.util.Vector<java.lang.Object>> data)
Vector - public CustomAbstractTableModel()
| Method Detail |
|---|
public void setJTableSize(int rows,
int columns)
int - rowsint - columnspublic int getRowCount()
public int getColumnCount()
public int getAmountOfRows()
public int getAmountOfColumns()
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
int - rowIndexint - columnIndex
public void setData(java.util.Vector<java.util.Vector<java.lang.Object>> data)
Vector - public void addColumn()
public void removeLastColumn()
public void addRow()
public void removeLastRow()
public void setRow(java.util.Vector<java.lang.Object> rowData,
int row)
public void setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelObject - valueint - rowIndexint - columnIndexpublic void hideRow(int row)
int - rowpublic void showRow(int row)
int - rowpublic void hideColumn(int column)
int - columnpublic void showColumn(int column)
int - column
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||