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 forComparePairTypewith 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>compareModesprivate intselectedIdx-
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 ComparePairTypegetElementAt(int index)ComparePairTypegetSelectedComparePair()java.lang.ObjectgetSelectedItem()intgetSize()voidsetSelectedItem(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:
getElementAtin interfacejavax.swing.ListModel<ComparePairType>- Overrides:
getElementAtin classJosmComboBoxModel<ComparePairType>
-
getSize
public int getSize()
- Specified by:
getSizein interfacejavax.swing.ListModel<ComparePairType>- Overrides:
getSizein classJosmComboBoxModel<ComparePairType>
-
getSelectedItem
public java.lang.Object getSelectedItem()
- Specified by:
getSelectedItemin interfacejavax.swing.ComboBoxModel<ComparePairType>- Overrides:
getSelectedItemin classJosmComboBoxModel<ComparePairType>
-
setSelectedItem
public void setSelectedItem(java.lang.Object anItem)
Description copied from class:JosmComboBoxModelSet the value of the selected item. The selected item may be null.- Specified by:
setSelectedItemin interfacejavax.swing.ComboBoxModel<ComparePairType>- Overrides:
setSelectedItemin classJosmComboBoxModel<ComparePairType>- Parameters:
anItem- The combo box value or null for no selection.
-
getSelectedComparePair
public ComparePairType getSelectedComparePair()
-
-