public abstract class DBSelectTableModelBase extends javax.swing.table.AbstractTableModel
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector |
mAvailFieldNames |
protected java.util.Vector |
mAvailTableNames |
protected java.util.Vector |
mItems |
protected DSSchemaIFace |
mSchema |
Constructor and Description |
---|
DBSelectTableModelBase(DSSchemaIFace aSchema)
Constructor for Table Model
|
Modifier and Type | Method and Description |
---|---|
DBSelectTableModelItem |
add(DBSelectTableModelItem aItem,
boolean aDoAppend)
Adds a item (Row) to the model
|
DBSelectTableModelItem |
add(DBTableField aField,
boolean aDoAppend)
Adds a field (Row) to the model
|
void |
fireTableModelChanged()
Notifies the table that it has been completely updated.
|
java.util.Vector |
getAvailableFieldNames(java.lang.String aTableName)
Returns the available field names for a table
|
java.util.Vector |
getAvailableTableNames(int aRow)
Returns a vector of table names and includes the name of the table
identified by the aRow parameter
|
abstract java.lang.Class |
getColumnClass(int aColumn)
Returns the Class object for a column
|
abstract int |
getColumnCount()
Returns the number of columns
|
abstract java.lang.String |
getColumnName(int aColumn)
Get the column name
|
protected DBSelectTableModelItem |
getFieldForRow(int aRow)
Gets the current field for a row
|
java.util.Vector |
getItemVector()
Resturns the items vector
|
int |
getRowCount()
Returns the number of rows
|
DSSchemaIFace |
getSchema()
Returns the Schema object
|
abstract java.lang.Object |
getValueAt(int aRow,
int aColumn)
Gets the value of the row col
|
abstract boolean |
isCellEditable(int aRow,
int aColumn)
Indicates if col and row is editable
|
protected boolean |
isTableNameOK(int aRow)
Checks to see if there is a valid table name in the cell/row
|
protected void |
setCriteria(DBSelectTableModelItem aField,
java.lang.Object aValue)
Sets the crieria field if it is a string
|
protected void |
setDisplay(DBSelectTableModelItem aField,
java.lang.Object aValue)
Sets the field to be marked as "displayed" and updates the UI
|
protected abstract void |
setDisplayListCell(DBSelectTableModelItem aFieldCell,
boolean aFlag)
Sets Display attr in UI List cell
|
protected void |
setFieldName(DBSelectTableModelItem aField,
java.lang.Object aValue)
Sets a field name, and notifies the model of data change
|
void |
setIsDisplayed(int aRow,
boolean aFlag)
Sets the Display cell for a row
|
protected void |
setTableName(DBSelectTableModelItem aField,
int aRow,
java.lang.Object aValue)
Sets the table name, if the name is NO_NAME then it deletes the row in
the model
|
abstract void |
setValueAt(java.lang.Object aValue,
int aRow,
int aColumn)
Sets a new value into the Model
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
protected java.util.Vector mItems
protected DSSchemaIFace mSchema
protected java.util.Vector mAvailTableNames
protected java.util.Vector mAvailFieldNames
public DBSelectTableModelBase(DSSchemaIFace aSchema)
aSchema
- the schemapublic abstract int getColumnCount()
public abstract java.lang.Class getColumnClass(int aColumn)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
aColumn
- the column in questionpublic abstract boolean isCellEditable(int aRow, int aColumn)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
aRow
- the row of the cellaColumn
- the column of the cellpublic abstract java.lang.String getColumnName(int aColumn)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
aColumn
- the column of the cell to be gottenpublic abstract java.lang.Object getValueAt(int aRow, int aColumn)
aRow
- the row of the cell to be gottenaColumn
- the column of the cell to be gottenpublic abstract void setValueAt(java.lang.Object aValue, int aRow, int aColumn)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
aValue
- the value to be setaRow
- the row of the cell to be setaColumn
- the column of the cell to be setprotected abstract void setDisplayListCell(DBSelectTableModelItem aFieldCell, boolean aFlag)
aFieldCell
- the cell item to be changedaFlag
- whether it is to be displayedpublic DSSchemaIFace getSchema()
public int getRowCount()
public java.util.Vector getItemVector()
protected DBSelectTableModelItem getFieldForRow(int aRow)
the
- row of the field to be gottenprotected boolean isTableNameOK(int aRow)
the
- row of the field to be checkedpublic void setIsDisplayed(int aRow, boolean aFlag)
aRow
- the row of the field to be updatedaFlag
- indicates whether it is displayed or notpublic DBSelectTableModelItem add(DBTableField aField, boolean aDoAppend)
aField
- aDoAppend
- indicates whether to append it at the end or one index before
the endpublic DBSelectTableModelItem add(DBSelectTableModelItem aItem, boolean aDoAppend)
aItem
- the item to addaDoAppend
- indicates whether to append it at the end or one index before
the endprotected void setTableName(DBSelectTableModelItem aField, int aRow, java.lang.Object aValue)
aField
- object to be updatedaRow
- the row to be deleted if necessaryaValue
- the new name or NO_NAMEprotected void setFieldName(DBSelectTableModelItem aField, java.lang.Object aValue)
aField
- a model item to be changedaValue
- the new nameprotected void setDisplay(DBSelectTableModelItem aField, java.lang.Object aValue)
aField
- the fieldaValue
- the Boolean value to be setprotected void setCriteria(DBSelectTableModelItem aField, java.lang.Object aValue)
aField
- the field objectaValue
- the new string valuepublic java.util.Vector getAvailableFieldNames(java.lang.String aTableName)
aTableName
- table namepublic java.util.Vector getAvailableTableNames(int aRow)
aRow
- the row to be included or -1public void fireTableModelChanged()