Class ToolbarPreferences.Settings.ActionDefinitionModel
- java.lang.Object
-
- javax.swing.AbstractListModel<E>
-
- javax.swing.DefaultListModel<ToolbarPreferences.ActionDefinition>
-
- org.openstreetmap.josm.gui.preferences.ToolbarPreferences.Settings.ActionDefinitionModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.ListModel<ToolbarPreferences.ActionDefinition>
,ReorderableModel<ToolbarPreferences.ActionDefinition>
,ReorderableTableModel<ToolbarPreferences.ActionDefinition>
- Enclosing class:
- ToolbarPreferences.Settings
private final class ToolbarPreferences.Settings.ActionDefinitionModel extends javax.swing.DefaultListModel<ToolbarPreferences.ActionDefinition> implements ReorderableTableModel<ToolbarPreferences.ActionDefinition>
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ActionDefinitionModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getRowCount()
Returns the number of rows in the list/table.javax.swing.ListSelectionModel
getSelectionModel()
Returns the selection model.ToolbarPreferences.ActionDefinition
getValue(int index)
Get object value at given index.ToolbarPreferences.ActionDefinition
setValue(int index, ToolbarPreferences.ActionDefinition value)
Set object value at given index.-
Methods inherited from class javax.swing.DefaultListModel
add, addAll, addAll, addElement, capacity, clear, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getSize, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAllElements, removeElement, removeElementAt, removeRange, set, setElementAt, setSize, size, toArray, toString, trimToSize
-
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.ReorderableModel
canMove, canMoveDown, canMoveUp, doMove
-
Methods inherited from interface org.openstreetmap.josm.gui.util.ReorderableTableModel
canMove, canMoveDown, canMoveDown, canMoveUp, canMoveUp, getSelectedIndices, move, moveDown, moveDown, moveUp, moveUp, selectedIndices
-
-
-
-
Constructor Detail
-
ActionDefinitionModel
private ActionDefinitionModel()
-
-
Method Detail
-
getSelectionModel
public javax.swing.ListSelectionModel getSelectionModel()
Description copied from interface:ReorderableTableModel
Returns the selection model.- Specified by:
getSelectionModel
in interfaceReorderableTableModel<ToolbarPreferences.ActionDefinition>
- Returns:
- the selection model (never null)
- See Also:
JList.getSelectionModel()
,JTable.getSelectionModel()
-
getRowCount
public int getRowCount()
Description copied from interface:ReorderableTableModel
Returns the number of rows in the list/table.- Specified by:
getRowCount
in interfaceReorderableTableModel<ToolbarPreferences.ActionDefinition>
- Returns:
- the number of rows in the list/table
- See Also:
ListModel.getSize()
,TableModel.getRowCount()
-
getValue
public ToolbarPreferences.ActionDefinition getValue(int index)
Description copied from interface:ReorderableModel
Get object value at given index.- Specified by:
getValue
in interfaceReorderableModel<ToolbarPreferences.ActionDefinition>
- Parameters:
index
- index- Returns:
- object value at given index
-
setValue
public ToolbarPreferences.ActionDefinition setValue(int index, ToolbarPreferences.ActionDefinition value)
Description copied from interface:ReorderableModel
Set object value at given index.- Specified by:
setValue
in interfaceReorderableModel<ToolbarPreferences.ActionDefinition>
- Parameters:
index
- indexvalue
- new value- Returns:
- the value previously at the specified position
-
-