|
||||||||||
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
org.pdfsam.guiclient.commons.models.SimplePdfSelectionTableModel
public class SimplePdfSelectionTableModel
Model for the table in JPdfSlectionPanel
AbstractTableModel
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.pdfsam.guiclient.commons.models.AbstractPdfSelectionTableModel |
---|
AbstractPdfSelectionTableModel.SortingState |
Field Summary | |
---|---|
protected Configuration |
config
|
protected java.util.Vector<PdfSelectionTableItem> |
data
|
Fields inherited from class org.pdfsam.guiclient.commons.models.AbstractPdfSelectionTableModel |
---|
ASCENDING, DEFAULT_SHOWED_COLUMNS_NUMBER, DESCENDING, FILENAME, MAX_COLUMNS_NUMBER, NOT_SORTED, PAGES, PAGESELECTION, PASSWORD, PATH, PDF_DOCUMENT_VERSION, ROW_NUM |
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
SimplePdfSelectionTableModel()
default constructor with default number of showed columns |
|
SimplePdfSelectionTableModel(int showedColumns,
int maxRowsNumber)
|
Method Summary | |
---|---|
void |
addRow(PdfSelectionTableItem inputData)
Add a row to the table data source if maxRowsNumber is not reached and fire to Listeners |
void |
addRowAt(int index,
PdfSelectionTableItem inputData)
Add a row to the table data source if maxRowsNumber is not reached and fire to Listeners |
void |
clearData()
Removes any data source for the model |
void |
deleteRow(int row)
Remove a row from the table data source and fire to Listeners |
void |
deleteRows(int[] rows)
Remove a set of rows from the table data source and fire to Listeners |
PdfSelectionTableItem |
getRow(int row)
Return the value at row |
int |
getRowCount()
|
PdfSelectionTableItem[] |
getRows()
|
AbstractPdfSelectionTableModel.SortingState |
getSortingState()
|
java.lang.Object |
getValueAt(int row,
int col)
Return the value at row, col |
void |
moveDownRow(int row)
Moves down a row to the table data source and fire to Listeners |
void |
moveDownRows(int[] rows)
Moves down a set of rows to the table data source and fire to Listeners |
void |
moveUpRow(int row)
Moves up a row to the table data source and fire to Listeners |
void |
moveUpRows(int[] rows)
Moves up a set of rows to the table data source and fire to Listeners |
void |
setData(PdfSelectionTableItem[] inputData)
set data source for the model |
void |
setSortingState(AbstractPdfSelectionTableModel.SortingState sortingState)
sets the sorting state |
void |
setValueAt(java.lang.Object value,
int row,
int column)
|
void |
sort()
Sort the data |
void |
updateRowAt(int index,
PdfSelectionTableItem inputData)
Replace a row to the table data source and fire to Listeners |
Methods inherited from class org.pdfsam.guiclient.commons.models.AbstractPdfSelectionTableModel |
---|
getColumnClass, getColumnCount, getColumnName, getColumnNames, getMaxRowsNumber, getShowedColumns, getToolTips, isCellEditable, isSortable, setColumnNames, setMaxRowsNumber, setShowedColumns, setSortable, setToolTips |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector<PdfSelectionTableItem> data
protected Configuration config
Constructor Detail |
---|
public SimplePdfSelectionTableModel()
public SimplePdfSelectionTableModel(int showedColumns, int maxRowsNumber)
showedColumns
- maxRowsNumber
- Method Detail |
---|
public int getRowCount()
public java.lang.Object getValueAt(int row, int col)
public PdfSelectionTableItem getRow(int row)
getRow
in class AbstractPdfSelectionTableModel
public void setData(PdfSelectionTableItem[] inputData)
setData
in class AbstractPdfSelectionTableModel
inputData
- array PdfSelectionTableItem[]
as data sourcepublic void clearData()
clearData
in class AbstractPdfSelectionTableModel
public void setValueAt(java.lang.Object value, int row, int column)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
value
- value to assign to cellrow
- row of cellcolumn
- column of cellpublic void addRow(PdfSelectionTableItem inputData)
addRow
in class AbstractPdfSelectionTableModel
inputData
- PdfSelectionTableItem
to add to the data sourcepublic void deleteRow(int row) throws java.lang.IndexOutOfBoundsException
Remove a row from the table data source and fire to Listeners
deleteRow
in class AbstractPdfSelectionTableModel
row
- row number to remove from the data source
java.lang.Exception
- if an exception occurs
java.lang.IndexOutOfBoundsException
public void deleteRows(int[] rows) throws java.lang.IndexOutOfBoundsException
Remove a set of rows from the table data source and fire to Listeners
deleteRows
in class AbstractPdfSelectionTableModel
rows
- rows number to remove from the data source
java.lang.Exception
- if an exception occurs
java.lang.IndexOutOfBoundsException
public PdfSelectionTableItem[] getRows()
getRows
in class AbstractPdfSelectionTableModel
public void addRowAt(int index, PdfSelectionTableItem inputData)
addRowAt
in class AbstractPdfSelectionTableModel
index
- index to add toinputData
- PdfSelectionTableItem
to add to the data sourcepublic void updateRowAt(int index, PdfSelectionTableItem inputData)
updateRowAt
in class AbstractPdfSelectionTableModel
index
- index to be replacedinputData
- new PdfSelectionTableItem
to replace the data sourcepublic void moveUpRow(int row) throws java.lang.IndexOutOfBoundsException
moveUpRow
in class AbstractPdfSelectionTableModel
row
- Row number to move from the data source
java.lang.IndexOutOfBoundsException
public void moveUpRows(int[] rows) throws java.lang.IndexOutOfBoundsException
moveUpRows
in class AbstractPdfSelectionTableModel
rows
- Row numbers to move from the data source
java.lang.IndexOutOfBoundsException
public void moveDownRow(int row) throws java.lang.IndexOutOfBoundsException
moveDownRow
in class AbstractPdfSelectionTableModel
row
- Row number to remove from the data source
java.lang.IndexOutOfBoundsException
public void moveDownRows(int[] rows) throws java.lang.IndexOutOfBoundsException
moveDownRows
in class AbstractPdfSelectionTableModel
rows
- Row numbers to move from the data source
java.lang.IndexOutOfBoundsException
public void sort()
AbstractPdfSelectionTableModel
sort
in class AbstractPdfSelectionTableModel
public AbstractPdfSelectionTableModel.SortingState getSortingState()
getSortingState
in class AbstractPdfSelectionTableModel
public void setSortingState(AbstractPdfSelectionTableModel.SortingState sortingState)
AbstractPdfSelectionTableModel
setSortingState
in class AbstractPdfSelectionTableModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |