|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tentackle.ui.FormTableEntry
public abstract class FormTableEntry
Entry per object that describes the data and configuration in order to keep all table-config-stuff in one place.
| Constructor Summary | |
|---|---|
FormTableEntry()
|
|
| Method Summary | |
|---|---|
int |
compareTo(FormTableEntry entry,
int[] compareBy)
Compares this entry with another one (for sorting). |
void |
fireCellsUpdated(int... mColumns)
Fires an update of the given cells in current row. |
void |
fireRowUpdated()
Fires an update of all cells in the current row. |
TableCellEditor |
getCellEditor(int mColumn)
Gets the cell editor for a given column. |
Rectangle |
getCellRect(int vRow,
int vColumn,
boolean includeSpacing)
Gets the cellrect for a column. The method is only invoked if isCellRectFixed() returns false. |
TableCellRenderer |
getCellRenderer(int mColumn)
Gets the cell renderer for a given column. Depending on isCellRendererFixed() this method is invoked only once per column or for each cell. |
Class |
getColumnClass(int mColumn)
Determines the class for a given column. If not overridden (or returning null) the class will be determined by inspecting the data. |
abstract int |
getColumnCount()
Determines the number of data-model columns. |
abstract String |
getColumnName(int mColumn)
Describes the column name. This may be a symbolic name if getDisplayedColumnName() is overridden. |
char |
getConvert(int mColumn)
Defines the character conversion attribute for each column. |
String |
getDisplayedColumnName(int mColumn)
Gets the displayed column name. By default the column-name and the displayed column name are the same. |
String |
getFormat(int mColumn)
Defines the format (for numeric or date/time-types) for each column. |
int |
getHorizontalAlignment(int mColumn)
Defines the horizontal alignment for each column. |
AbstractFormTableModel |
getModel()
Gets the model. |
abstract Object |
getObject()
Gets the object wrapped by this entry. |
int |
getReferencedColumn(int vRow,
int vColumn)
Gets the referenced column if cells are merged. If cells are merged they must reference to valid cell. |
int |
getReferencedRow(int vRow,
int vColumn)
Gets the referenced row if cells are merged. If cells are merged they must reference to valid cell. |
int |
getRow()
Gets the row of this entry with respect to the model. |
boolean |
getShowHorizontalLine(int vRow)
Determines whether the horizontal grid line following the given row should be drawn or not. |
boolean |
getShowVerticalLine(int vRow,
int vColumn)
Determines whether the vertical grid line following the given cell should be drawn or not. |
abstract Object |
getValueAt(int mColumn)
Gets the column-object for this entry in a given column. |
int |
getVerticalAlignment(int mColumn)
Defines the vertical alignment for each column. |
boolean |
isAutoSelect(int mColumn)
Gets the autoselect flag. |
boolean |
isBlankZero(int mColumn)
Defines the "blankzero" attribute for each column. |
boolean |
isCellEditable(int mColumn)
Determines whether the cell is editable or not. |
boolean |
isCellEditorFixed()
Determines whether the cell editors are fixed. FormTable invokes getCellEditor in FormTableEntry only once to improve performance. |
boolean |
isCellRectFixed()
Determines whether the cell rectangles are fixed. Usually the cell dimension is fixed and does not depend on the data. |
boolean |
isCellRendererFixed()
Determines whether the cell renderers are fixed. FormTable invokes getCellRenderer in FormTableEntry only once to improve performance. |
boolean |
isCellVisible(int vRow,
int vColumn)
Determines whether the cell is visible or not. The method is only invoked if isCellRectFixed() returns false. |
boolean |
isColumnNotSummable(int mColumn)
Determines whether the given column is summable. The SumFormTableEntry will sumup all numeric columns by default. |
boolean |
isVisiblyEqual(FormTableEntry entry)
Compares what the user sees on the GUI between two HistoryTableEntries. |
abstract FormTableEntry |
newInstanceOf(Object object)
Creates a new instance of an entry for a given data-object. |
void |
setModel(AbstractFormTableModel model)
Sets the model this entry lives in. |
void |
setRow(int row)
Sets the row of this entry with respect to the model. |
void |
setValueAt(int mColumn,
Object value)
Sets the data object for a column. |
boolean |
updateArray(int mRow)
Performs an update of the current entry to the underlying array, if the data-model is based on an object array. |
boolean |
updateCursor(int mRow)
Performs an update of the current entry to the underlying database cursor, if the data-model is based on a cursor. |
boolean |
updateList(int mRow)
Performs an update of the current entry to the underlying list, if the data-model is based on a List. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FormTableEntry()
| Method Detail |
|---|
public abstract FormTableEntry newInstanceOf(Object object)
object - the data-object
public abstract int getColumnCount()
public abstract String getColumnName(int mColumn)
mColumn - the datamodel-column
public String getDisplayedColumnName(int mColumn)
mColumn - the datamodel column
public Class getColumnClass(int mColumn)
mColumn - the datamodel-column
public String getFormat(int mColumn)
mColumn - the datamodel-column
public int getHorizontalAlignment(int mColumn)
mColumn - the datamodel-column
public int getVerticalAlignment(int mColumn)
mColumn - the datamodel-column
public boolean isBlankZero(int mColumn)
mColumn - the datamodel-column
public boolean isAutoSelect(int mColumn)
mColumn - the datamodel-column
public char getConvert(int mColumn)
mColumn - the datamodel-column
public boolean isColumnNotSummable(int mColumn)
mColumn - the datamodel column
public boolean isCellRendererFixed()
public boolean isCellEditorFixed()
public boolean isCellRectFixed()
public void setModel(AbstractFormTableModel model)
model - the data-modelpublic AbstractFormTableModel getModel()
public void setRow(int row)
row - the data-model rowpublic int getRow()
public abstract Object getObject()
public abstract Object getValueAt(int mColumn)
mColumn - the datamodel-column
public void setValueAt(int mColumn,
Object value)
mColumn - the datamodel-columnvalue - the cell valuepublic boolean updateCursor(int mRow)
mRow - the datamodel-row
public boolean updateList(int mRow)
mRow - the datamodel-row
public boolean updateArray(int mRow)
mRow - the datamodel-row
public int compareTo(FormTableEntry entry,
int[] compareBy)
entry - to be compared against this entrycompareBy - is an array of mColumns where 0 is the first and
negative minus 1 means descending. I.e.: [-1, 2] means:
first column descending, third ascending
public boolean isVisiblyEqual(FormTableEntry entry)
entry - to be compared against this entry
public TableCellRenderer getCellRenderer(int mColumn)
mColumn - the datamodel-column
public boolean isCellEditable(int mColumn)
mColumn - the datamodel-column
public TableCellEditor getCellEditor(int mColumn)
mColumn - the datamodel-column
public Rectangle getCellRect(int vRow,
int vColumn,
boolean includeSpacing)
Note: Usually tables with dynamic cell sizes (i.e. multispan columns) don't allow the user to change column ordering and/or sort rows. For optimization reasons the given row and column are according to the view which is usually is identical to the model. If this is not the case (which is hard to handle btw.) getCellRect must convert the row and column to the datamodel.
vRow - the row in table viewvColumn - the column in table viewincludeSpacing - is true to include margins
public boolean isCellVisible(int vRow,
int vColumn)
vRow - the row in table viewvColumn - the column in table view
public int getReferencedRow(int vRow,
int vColumn)
vRow - the row in table viewvColumn - the column in table view
public int getReferencedColumn(int vRow,
int vColumn)
vRow - the row in table viewvColumn - the column in table view
public boolean getShowHorizontalLine(int vRow)
vRow - the row in table view
public boolean getShowVerticalLine(int vRow,
int vColumn)
vRow - the row in table viewvColumn - the column in table view
public void fireRowUpdated()
public void fireCellsUpdated(int... mColumns)
mColumns - columns with respect to the model
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||