Class AbstractListMergeModel.ComparePairListModel
- java.lang.Object
-
- javax.swing.AbstractListModel<E>
-
- org.openstreetmap.josm.gui.widgets.JosmComboBoxModel<ComparePairType>
-
- org.openstreetmap.josm.gui.conflict.pair.AbstractListMergeModel.ComparePairListModel
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<ComparePairType>
,javax.swing.ComboBoxModel<ComparePairType>
,javax.swing.ListModel<ComparePairType>
,javax.swing.MutableComboBoxModel<ComparePairType>
- Enclosing class:
- AbstractListMergeModel<T extends PrimitiveId,C extends ConflictResolveCommand>
public class AbstractListMergeModel.ComparePairListModel extends JosmComboBoxModel<ComparePairType>
A model forComparePairType
with the enums added as options.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.widgets.JosmComboBoxModel
JosmComboBoxModel.Preferences
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ComparePairType>
compareModes
private int
selectedIdx
-
Fields inherited from class org.openstreetmap.josm.gui.widgets.JosmComboBoxModel
elements, selected
-
-
Constructor Summary
Constructors Constructor Description ComparePairListModel()
Constructs a newComparePairListModel
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComparePairType
getElementAt(int index)
ComparePairType
getSelectedComparePair()
java.lang.Object
getSelectedItem()
int
getSize()
void
setSelectedItem(java.lang.Object anItem)
Set the value of the selected item.-
Methods inherited from class org.openstreetmap.josm.gui.widgets.JosmComboBoxModel
addAllElements, addAllElements, addElement, addTopElement, asCollection, doAddElement, find, getIndexOf, insertElementAt, iterator, prefs, removeAllElements, removeElement, removeElementAt, setSize
-
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
-
-
-
Field Detail
-
selectedIdx
private int selectedIdx
-
compareModes
private final java.util.List<ComparePairType> compareModes
-
-
Constructor Detail
-
ComparePairListModel
public ComparePairListModel()
Constructs a newComparePairListModel
.
-
-
Method Detail
-
getElementAt
public ComparePairType getElementAt(int index)
- Specified by:
getElementAt
in interfacejavax.swing.ListModel<ComparePairType>
- Overrides:
getElementAt
in classJosmComboBoxModel<ComparePairType>
-
getSize
public int getSize()
- Specified by:
getSize
in interfacejavax.swing.ListModel<ComparePairType>
- Overrides:
getSize
in classJosmComboBoxModel<ComparePairType>
-
getSelectedItem
public java.lang.Object getSelectedItem()
- Specified by:
getSelectedItem
in interfacejavax.swing.ComboBoxModel<ComparePairType>
- Overrides:
getSelectedItem
in classJosmComboBoxModel<ComparePairType>
-
setSelectedItem
public void setSelectedItem(java.lang.Object anItem)
Description copied from class:JosmComboBoxModel
Set the value of the selected item. The selected item may be null.- Specified by:
setSelectedItem
in interfacejavax.swing.ComboBoxModel<ComparePairType>
- Overrides:
setSelectedItem
in classJosmComboBoxModel<ComparePairType>
- Parameters:
anItem
- The combo box value or null for no selection.
-
getSelectedComparePair
public ComparePairType getSelectedComparePair()
-
-