Class RelationListDialog.RelationListModel
java.lang.Object
javax.swing.AbstractListModel<IRelation<?>>
org.openstreetmap.josm.gui.dialogs.RelationListDialog.RelationListModel
- All Implemented Interfaces:
Serializable,ListModel<IRelation<?>>
- Enclosing class:
- RelationListDialog
The list model for the list of relations displayed in the relation list dialog.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SearchCompiler.Matchprivate final DefaultListSelectionModelFields inherited from class javax.swing.AbstractListModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelations(Collection<? extends OsmPrimitive> addedPrimitives) Add all relations inaddedPrimitivesto the model for the relation list dialogvoidclear()Clears the model.IRelation<?>getElementAt(int index) Replies the list of selected relations.intgetSize()private IRelation<?>getVisibleRelation(int index) private booleanvoidremoveRelations(Collection<? extends OsmPrimitive> removedPrimitives) Removes all relations inremovedPrimitivesfrom the modelvoidsetFilter(SearchCompiler.Match filter) voidsetRelations(Collection<? extends IRelation<?>> relations) voidsetSelectedRelations(Collection<? extends IRelation<?>> sel) Sets the selected relations.voidsort()Sorts the model usingDefaultNameFormatterrelation comparator.private voidvoidUpdate the title for the relation list dialogMethods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Field Details
-
relations
-
filteredRelations
-
selectionModel
-
filter
-
-
Constructor Details
-
RelationListModel
RelationListModel(DefaultListSelectionModel selectionModel)
-
-
Method Details
-
clear
Clears the model. -
sort
Sorts the model usingDefaultNameFormatterrelation comparator. -
isValid
-
setRelations
-
addRelations
Add all relations inaddedPrimitivesto the model for the relation list dialog- Parameters:
addedPrimitives- the collection of added primitives. May include nodes, ways, and relations.
-
removeRelations
Removes all relations inremovedPrimitivesfrom the model- Parameters:
removedPrimitives- the removed primitives. May include nodes, ways, and relations
-
updateFilteredRelations
-
setFilter
-
getVisibleRelations
-
getVisibleRelation
-
getElementAt
-
getSize
-
getSelectedRelations
Replies the list of selected relations. Empty list, if there are no selected relations.- Returns:
- the list of selected, non-new relations.
- Since:
- 13957 (signature)
-
setSelectedRelations
Sets the selected relations.- Parameters:
sel- the list of selected relations- Since:
- 13957 (signature)
-
updateTitle
Update the title for the relation list dialog
-