|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.pdfsam.guiclient.commons.models.AbstractPdfSelectionTableModel
public abstract class AbstractPdfSelectionTableModel
Abstract model for the selection table
Nested Class Summary | |
---|---|
class |
AbstractPdfSelectionTableModel.SortingState
Model of a sorting state (column and sort type) |
Field Summary | |
---|---|
static int |
ASCENDING
|
static int |
DEFAULT_SHOWED_COLUMNS_NUMBER
|
static int |
DESCENDING
|
static int |
FILENAME
|
static int |
MAX_COLUMNS_NUMBER
|
static int |
NOT_SORTED
|
static int |
PAGES
|
static int |
PAGESELECTION
|
static int |
PASSWORD
|
static int |
PATH
|
static int |
PDF_DOCUMENT_VERSION
|
static int |
ROW_NUM
|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
AbstractPdfSelectionTableModel()
|
Method Summary | |
---|---|
abstract void |
addRow(PdfSelectionTableItem inputData)
Add a row to the table data source if maxRowsNumber is not reached and fire to Listeners |
abstract void |
addRowAt(int index,
PdfSelectionTableItem inputData)
Add a row to the table data source if maxRowsNumber is not reached and fire to Listeners |
abstract void |
clearData()
Removes any data source for the model |
abstract void |
deleteRow(int row)
Remove a row from the table data source and fire to Listeners |
abstract void |
deleteRows(int[] rows)
Remove a set of rows from the table data source and fire to Listeners |
java.lang.Class<?> |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int col)
Return column name |
java.lang.String[] |
getColumnNames()
|
int |
getMaxRowsNumber()
|
abstract PdfSelectionTableItem |
getRow(int row)
Return the value at row |
abstract PdfSelectionTableItem[] |
getRows()
|
int |
getShowedColumns()
|
abstract AbstractPdfSelectionTableModel.SortingState |
getSortingState()
|
java.lang.String[] |
getToolTips()
|
boolean |
isCellEditable(int row,
int column)
Return true if the cell is editable |
boolean |
isSortable()
|
abstract void |
moveDownRow(int row)
Moves down a row to the table data source and fire to Listeners |
abstract void |
moveDownRows(int[] rows)
Moves down a set of rows to the table data source and fire to Listeners |
abstract void |
moveUpRow(int row)
Moves up a row to the table data source and fire to Listeners |
abstract void |
moveUpRows(int[] rows)
Moves up a set of rows to the table data source and fire to Listeners |
void |
setColumnNames(java.lang.String[] columnNames)
|
abstract void |
setData(PdfSelectionTableItem[] inputData)
set data source for the model |
void |
setMaxRowsNumber(int maxRowsNumber)
|
void |
setShowedColumns(int showedColumns)
|
protected void |
setSortable(boolean sortable)
|
abstract void |
setSortingState(AbstractPdfSelectionTableModel.SortingState sortingState)
sets the sorting state |
void |
setToolTips(java.lang.String[] toolTips)
|
abstract void |
sort()
Sort the data |
abstract void |
updateRowAt(int index,
PdfSelectionTableItem inputData)
Replace a row to the table data source and fire to Listeners |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
getRowCount, getValueAt |
Field Detail |
---|
public static final int ROW_NUM
public static final int FILENAME
public static final int PATH
public static final int PAGES
public static final int PASSWORD
public static final int PDF_DOCUMENT_VERSION
public static final int PAGESELECTION
public static final int MAX_COLUMNS_NUMBER
public static final int DEFAULT_SHOWED_COLUMNS_NUMBER
public static final int DESCENDING
public static final int NOT_SORTED
public static final int ASCENDING
Constructor Detail |
---|
public AbstractPdfSelectionTableModel()
Method Detail |
---|
public java.lang.String[] getColumnNames()
public void setToolTips(java.lang.String[] toolTips)
toolTips
- the toolTips to setpublic int getColumnCount()
public int getShowedColumns()
public java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
public void setShowedColumns(int showedColumns)
showedColumns
- the showedColumns to set (must be positive)public int getMaxRowsNumber()
public void setMaxRowsNumber(int maxRowsNumber)
maxRowsNumber
- the maxRowsNumber to set (must be positive)public boolean isCellEditable(int row, int column)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
public java.lang.String getColumnName(int col)
Return column name
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
col
- Column number
public java.lang.String[] getToolTips()
public void setColumnNames(java.lang.String[] columnNames)
columnNames
- The columnNames to set.protected void setSortable(boolean sortable)
sortable
- the sortable to setpublic boolean isSortable()
public abstract PdfSelectionTableItem[] getRows()
public abstract void deleteRows(int[] rows) throws java.lang.IndexOutOfBoundsException
Remove a set of rows from the table data source and fire to Listeners
rows
- rows number to remove from the data source
java.lang.Exception
- if an exception occurs
java.lang.IndexOutOfBoundsException
public abstract void deleteRow(int row) throws java.lang.IndexOutOfBoundsException
Remove a row from the table data source and fire to Listeners
row
- row number to remove from the data source
java.lang.Exception
- if an exception occurs
java.lang.IndexOutOfBoundsException
public abstract void moveDownRows(int[] rows) throws java.lang.IndexOutOfBoundsException
rows
- Row numbers to move from the data source
java.lang.IndexOutOfBoundsException
public abstract void moveDownRow(int row) throws java.lang.IndexOutOfBoundsException
row
- Row number to remove from the data source
java.lang.IndexOutOfBoundsException
public abstract void moveUpRows(int[] rows) throws java.lang.IndexOutOfBoundsException
rows
- Row numbers to move from the data source
java.lang.IndexOutOfBoundsException
public abstract void moveUpRow(int row) throws java.lang.IndexOutOfBoundsException
row
- Row number to move from the data source
java.lang.IndexOutOfBoundsException
public abstract void addRowAt(int index, PdfSelectionTableItem inputData)
inputData
- PdfSelectionTableItem
to add to the data sourcepublic abstract void updateRowAt(int index, PdfSelectionTableItem inputData)
index
- index to be replacedinputData
- new PdfSelectionTableItem
to replace the data sourcepublic abstract void addRow(PdfSelectionTableItem inputData)
inputData
- PdfSelectionTableItem
to add to the data sourcepublic abstract void clearData()
public abstract void setData(PdfSelectionTableItem[] inputData)
inputData
- array PdfSelectionTableItem[]
as data sourcepublic abstract PdfSelectionTableItem getRow(int row)
public abstract void sort()
public abstract AbstractPdfSelectionTableModel.SortingState getSortingState()
public abstract void setSortingState(AbstractPdfSelectionTableModel.SortingState sortingState)
sortingState
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |