public class BrowsableTableModel extends AbstractTableModel implements IPageNavigator, IRecordNavigator, IBrowserMode, ISortableColumns, IFilteredColumns, IFindNavigator, ISelectableRecords, TableModelListener
IBrowserMode.BrowserMode
ISelectableRecords.SELECTION_MODE
Modifier and Type | Field and Description |
---|---|
protected IBrowserMode.BrowserMode |
browserMode |
protected ImageIcon |
currentIcon |
protected TableModel |
dataModel |
protected int |
idColumn |
protected int |
page |
protected int |
pageSize |
protected PropertyChangeSupport |
ps |
protected int |
record |
protected ImageIcon |
selectedAndCurrentIcon |
protected ImageIcon |
selectedIcon |
protected double[] |
zoomFactor |
listenerList
PROPERTY_MAXPAGES, PROPERTY_PAGE, PROPERTY_PAGERECORD, PROPERTY_PAGESIZE
PROPERTY_MAXRECORDS, PROPERTY_RECORD
PROPERTY_MODE, PROPERTY_ZOOM
PROPERTY_VALUE
Constructor and Description |
---|
BrowsableTableModel() |
BrowsableTableModel(TableModel dataModel) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
protected PropertyChangeSupport ps
protected TableModel dataModel
protected int pageSize
protected int page
protected int record
protected int idColumn
protected double[] zoomFactor
protected ImageIcon selectedIcon
protected ImageIcon currentIcon
protected ImageIcon selectedAndCurrentIcon
protected IBrowserMode.BrowserMode browserMode
public BrowsableTableModel()
public BrowsableTableModel(TableModel dataModel)
public int getColumnCount()
getColumnCount
in interface TableModel
public int getRowCount()
getRowCount
in interface TableModel
public Class<?> getColumnClass(int column)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
protected int getDataModelColumn(int row, int column)
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
public void setValueAt(Object value, int row, int col)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
public Object getValueAt(int row, int col)
getValueAt
in interface TableModel
protected ImageIcon getRecordMarker(int realRow)
public TableModel getDataModel()
public void setDataModel(TableModel dataModel)
public void addPropertyChangeListener(PropertyChangeListener x)
addPropertyChangeListener
in interface IBrowserMode
addPropertyChangeListener
in interface IFindNavigator
addPropertyChangeListener
in interface IPageNavigator
addPropertyChangeListener
in interface IRecordNavigator
public int getMaxPages()
getMaxPages
in interface IPageNavigator
public int getPage()
getPage
in interface IPageNavigator
public int getPageSize()
getPageSize
in interface IPageNavigator
public void nextPage()
nextPage
in interface IPageNavigator
public void previousPage()
previousPage
in interface IPageNavigator
public void removePropertyChangeListener(PropertyChangeListener x)
removePropertyChangeListener
in interface IBrowserMode
removePropertyChangeListener
in interface IFindNavigator
removePropertyChangeListener
in interface IPageNavigator
removePropertyChangeListener
in interface IRecordNavigator
public void setPage(int page)
setPage
in interface IPageNavigator
public void setPageSize(int size)
setPageSize
in interface IPageNavigator
public int getMaxRecords()
getMaxRecords
in interface IRecordNavigator
public int getRecord()
getRecord
in interface IRecordNavigator
public void next()
next
in interface IRecordNavigator
public void prev()
prev
in interface IRecordNavigator
public void setRecord(int record)
setRecord
in interface IRecordNavigator
public IBrowserMode.BrowserMode getBrowserMode()
getBrowserMode
in interface IBrowserMode
public int getIDColumn()
public void setBrowserMode(IBrowserMode.BrowserMode mode)
setBrowserMode
in interface IBrowserMode
public void setIDColumn(int id)
public void zoom(double x, double y)
zoom
in interface IBrowserMode
public void setFilter(int column, Object value) throws UnsupportedOperationException
setFilter
in interface IFilteredColumns
UnsupportedOperationException
public void dropFilter(int column) throws UnsupportedOperationException
dropFilter
in interface IFilteredColumns
UnsupportedOperationException
public void sort(int column, boolean ascending) throws UnsupportedOperationException
sort
in interface ISortableColumns
UnsupportedOperationException
public boolean isCompleted()
isCompleted
in interface IFindNavigator
public int findNext() throws UnsupportedOperationException
findNext
in interface IFindNavigator
UnsupportedOperationException
public int findPrevious() throws UnsupportedOperationException
findPrevious
in interface IFindNavigator
UnsupportedOperationException
public Object getValue()
getValue
in interface IFindNavigator
public void setValue(Object value)
setValue
in interface IFindNavigator
public void setCompleted(boolean value)
setCompleted
in interface IFindNavigator
public int find() throws UnsupportedOperationException
find
in interface IFindNavigator
UnsupportedOperationException
public boolean isFound(int record)
isFound
in interface IFindNavigator
public void tableChanged(TableModelEvent e)
tableChanged
in interface TableModelListener
public void setSelection(ISelectableRecords.SELECTION_MODE mode)
setSelection
in interface ISelectableRecords
public ISelectableRecords.SELECTION_MODE getSelection()
getSelection
in interface ISelectableRecords
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.