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, removeTableModelListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanMove, canMoveDown, canMoveDown, canMoveUp, canMoveUp, getSelectedIndices, move, moveDown, moveDown, moveUp, moveUpaddTableModelListener, getColumnName, removeTableModelListenercanMove, canMoveDown, canMoveUp, doMoveprivate 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.TableModelpublic int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt in interface javax.swing.table.TableModelpublic boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelpublic java.lang.Class<?> getColumnClass(int column)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelpublic void setValueAt(java.lang.Object aValue, int row, int column)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelpublic 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()
ReorderableTableModelgetSelectionModel in interface ReorderableTableModel<SourceEntry>public SourceEntry getValue(int index)
ReorderableModelgetValue in interface ReorderableModel<SourceEntry>index - indexpublic SourceEntry setValue(int index, SourceEntry value)
ReorderableModelsetValue in interface ReorderableModel<SourceEntry>index - indexvalue - new value