protected class SourceEditor.ActiveSourcesModel extends javax.swing.table.AbstractTableModel implements ReorderableTableModel<SourceEntry>
Modifier and Type | Field and Description |
---|---|
private java.util.List<SourceEntry> |
data |
private javax.swing.DefaultListSelectionModel |
selectionModel |
Constructor and Description |
---|
ActiveSourcesModel(javax.swing.DefaultListSelectionModel selectionModel)
Constructs a new
ActiveSourcesModel . |
Modifier and Type | Method and Description |
---|---|
void |
addExtendedSourceEntries(java.util.List<ExtendedSourceEntry> sources)
Adds multiple sources.
|
void |
addSource(SourceEntry entry)
Adds an active source.
|
java.lang.Class<?> |
getColumnClass(int column) |
int |
getColumnCount() |
int |
getRowCount() |
javax.swing.DefaultListSelectionModel |
getSelectionModel()
Returns the selection model.
|
java.util.List<SourceEntry> |
getSources()
Returns the active sources.
|
SourceEntry |
getValue(int index)
Get object value at given index.
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex) |
boolean |
isCellEditable(int rowIndex,
int columnIndex) |
void |
removeIdxs(java.util.Collection<java.lang.Integer> idxs)
Removes the sources at given indexes.
|
void |
removeSelected()
Removes the selected sources.
|
void |
setActiveSources(java.util.Collection<? extends SourceEntry> sources)
Sets active sources.
|
SourceEntry |
setValue(int index,
SourceEntry value)
Set object value at given index.
|
void |
setValueAt(java.lang.Object aValue,
int row,
int column) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canMove, canMoveDown, canMoveDown, canMoveUp, canMoveUp, getSelectedIndices, move, moveDown, moveDown, moveUp, moveUp
addTableModelListener, getColumnName, removeTableModelListener
canMove, canMoveDown, canMoveUp, doMove
private transient java.util.List<SourceEntry> data
private final javax.swing.DefaultListSelectionModel selectionModel
public ActiveSourcesModel(javax.swing.DefaultListSelectionModel selectionModel)
ActiveSourcesModel
.selectionModel
- selection modelpublic int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
public java.lang.Class<?> getColumnClass(int column)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
public void setValueAt(java.lang.Object aValue, int row, int column)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
public void setActiveSources(java.util.Collection<? extends SourceEntry> sources)
sources
- active sourcespublic void addSource(SourceEntry entry)
entry
- source to addpublic void removeSelected()
public void removeIdxs(java.util.Collection<java.lang.Integer> idxs)
idxs
- indexes to removepublic void addExtendedSourceEntries(java.util.List<ExtendedSourceEntry> sources)
sources
- source entriespublic java.util.List<SourceEntry> getSources()
public javax.swing.DefaultListSelectionModel getSelectionModel()
ReorderableTableModel
getSelectionModel
in interface ReorderableTableModel<SourceEntry>
public SourceEntry getValue(int index)
ReorderableModel
getValue
in interface ReorderableModel<SourceEntry>
index
- indexpublic SourceEntry setValue(int index, SourceEntry value)
ReorderableModel
setValue
in interface ReorderableModel<SourceEntry>
index
- indexvalue
- new value