ewe.database
Class DatabaseTableModel
java.lang.Object
ewe.ui.TableModel
ewe.data.FieldTableModel
ewe.database.DatabaseTableModel
- All Implemented Interfaces:
- CellConstants, ControlConstants, EventListener, UIConstants
- public class DatabaseTableModel
- extends FieldTableModel
| Fields inherited from class ewe.ui.TableModel |
activeCellControl, allColumnsSameSize, allRowsSameSize, canHScroll, canVScroll, cellInsets, charHeight, clipData, controlProxy, cursorSize, fillToEqualHeights, fillToEqualWidths, gap, hasColumnHeaders, hasPreferredSize, hasRowHeaders, hasSpanningColumns, hasSpanningRows, horizontalScrollUnit, insets, numCols, numRows, preferredCols, preferredRows, rect, selectRowWhenEditing, shadeAlternateRows, table, tca, verticalScrollUnit |
| Fields inherited from interface ewe.ui.UIConstants |
BDR_DOTTED, BDR_INNER, BDR_NOBORDER, BDR_OUTER, BDR_OUTLINE, BDR_RAISEDINNER, BDR_RAISEDOUTER, BDR_SUNKENINNER, BDR_SUNKENOUTER, BF_BOTTOM, BF_BOTTOMLEFT, BF_BOTTOMRIGHT, BF_BUTTON, BF_DIAGONAL, BF_DIAGONAL_ENDBOTTOMLEFT, BF_DIAGONAL_ENDBOTTOMRIGHT, BF_DIAGONAL_ENDTOPLEFT, BF_DIAGONAL_ENDTOPRIGHT, BF_EXACT, BF_FLAT, BF_LEFT, BF_MIDDLE, BF_MONO, BF_PALM, BF_RECT, BF_RIGHT, BF_SOFT, BF_SQUARE, BF_TOP, BF_TOPLEFT, BF_TOPRIGHT, EDGE_BUMP, EDGE_ETCHED, EDGE_RAISED, EDGE_SUNKEN |
| Fields inherited from interface ewe.ui.CellConstants |
BORDER, BOTTOM, CELLFLAG, CELLMASK, CENTER, CONTROLMASK, DONTCHANGE, DONTFILL, DONTSTRETCH, EAST, FILL, FIXEDSIZE, GROW, HCENTER, HCONTRACT, HEXPAND, HFILL, HGROW, HSHRINK, HSTRETCH, INITIALLY_CLOSED, INITIALLY_MINIMIZED, INITIALLY_PREFERRED_SIZE, INSETS, LEFT, MAXIMUMSIZE, MINIMUMSIZE, NORTH, NORTHEAST, NORTHWEST, PREFERREDSIZE, RECT, RIGHT, SHRINK, SOUTH, SOUTHEAST, SOUTHWEST, SPAN, STRETCH, TEXTSIZE, TOP, VCENTER, VCONTRACT, VEXPAND, VFILL, VGROW, VSHRINK, VSTRETCH, WEST |
| Fields inherited from interface ewe.ui.ControlConstants |
All, AlwaysEnabled, AlwaysRecalculateSizes, ByDeferredMouse, ByDeferredPen, ByFrameChange, ByKeyboard, ByMouse, ByPen, ByRequest, CalculatedSizes, Disabled, DisablePopupMenu, DisplayOnly, Down, DrawFlat, Flag, ForceResize, HasData, Invisible, KeepImage, KeepSIP, Left, MakeMenuAtLeastAsWide, Maximize, Minimize, MouseSensitive, NoFocus, NotAnEditor, NotEditable, PaintDataOnly, PaintOutsideOnly, PenTransparent, PreferredSizeOnly, Right, SendUpKeyEvents, SendUpPenEvents, ShowSIP, ShrinkToNothing, SmallControl, SpecialBackground, TakeControlEvents, TakesKeyFocus, Transparent, Up, WantDrag, WantHoldDown |
| Methods inherited from class ewe.data.FieldTableModel |
cacheObject, calculateColWidth, calculateRowHeight, calculateTextCharsInColumn, countEntries, dataChanged, doColumnSelection, doHotKey, entriesChanged, getAllFields, getCachedObject, getCellAttributes, getCellControlFor, getCellText, getColumnSelector, getColumnSelectorButton, getExportTask, getField, getFieldData, getFieldValue, getMaxColWidth, getMinColWidth, getNew, getObjectAtRow, getSelectedEntry, getTableExportButton, getTableExporter, getTableForm, getTableForm, invalidateCache, invalidateCachedObject, invalidateCachedObject, made, main, modifyFields, rowChanged, selectEntry, setFields, setFields, setFields, setFields, setFields, setFields, setObjects |
| Methods inherited from class ewe.ui.TableModel |
calculateTextLinesInRow, canScreenScroll, canSelect, checkControlFor, clearCellAdjustments, closeActiveControl, deferPaintTableCell, findCellsInArea, fixBorder, getCellData, getCellInsets, getCellPreferredSize, getCellRect, getColWidth, getControlFor, getLinesFor, getMaxRowHeight, getMenuFor, getMenuOutsideCells, getMinRowHeight, getPreferredSize, getRowHeight, getToolTip, hasActiveControls, inset, isActiveCellControl, notifyDataChange, onKeyEvent, paintTableCell, paintTableCell, paintTableCellData, paintTableCellText, penPressed, popupMenuEvent, remapColumns, resized, scrollTo, select, show, startedEditing |
database
public Database database
entries
public FoundEntries entries
view
public EntriesView view
record
public Record record
useDataObjects
protected boolean useDataObjects
DatabaseTableModel
public DatabaseTableModel(Database table)
DatabaseTableModel
public DatabaseTableModel(Database table,
String fields)
DatabaseTableModel
public DatabaseTableModel(Database table,
int[] fields,
boolean addNormalFieldsAfter)
DatabaseTableModel
public DatabaseTableModel(Database table,
boolean useFields)
DatabaseTableModel
public DatabaseTableModel(FoundEntries fe)
DatabaseTableModel
public DatabaseTableModel(EntriesView view)
entriesChanged
public void entriesChanged()
- Description copied from class:
FieldTableModel
- Call this to notify the table that the entries to be displayed have been changed in some way. It
recalculates the number of rows and redisplays the table.
- Overrides:
entriesChanged in class FieldTableModel
checkUpdate
public void checkUpdate()
setEntries
public DatabaseTableModel setEntries(FoundEntries entries)
- Call this to set the entries to be displayed in this table. You can also use entriesChanged() to
notify the table that the entries have been changed.
- Parameters:
entries - The entries to display in this table.
setView
public DatabaseTableModel setView(EntriesView view)
calculateNumRows
protected int calculateNumRows()
- This calculates the number of rows in the table. By default this will return the size
of the objects Vector. If this Vector is null it will return zero. Override this if you
are not using the objects Vector - in which case you must also override loadObjectAtRow().
- Overrides:
calculateNumRows in class FieldTableModel
loadObjectAtRow
protected Object loadObjectAtRow(int row)
throws Exception
- Override this to use a different method of retrieving the object at a particular row.
- Overrides:
loadObjectAtRow in class FieldTableModel
- Throws:
Exception
dataChanged
protected void dataChanged(Object obj,
int row,
String fieldName)
- Overrides:
dataChanged in class FieldTableModel
addNew
public int addNew()
throws IOException
- Throws:
IOException
addObject
public int addObject(Object obj)
throws IOException
- Throws:
IOException
onEvent
public void onEvent(Event ev)
- Specified by:
onEvent in interface EventListener- Overrides:
onEvent in class FieldTableModel