private class RelationListDialog.RelationListModel extends AbstractListModel<Relation>
Modifier and Type | Field and Description |
---|---|
private SearchCompiler.Match |
filter |
private List<Relation> |
filteredRelations |
private List<Relation> |
relations |
private DefaultListSelectionModel |
selectionModel |
listenerList
Constructor and Description |
---|
RelationListModel(DefaultListSelectionModel selectionModel) |
Modifier and Type | Method and Description |
---|---|
void |
addRelations(Collection<? extends OsmPrimitive> addedPrimitives)
Add all relations in
addedPrimitives to the model for the
relation list dialog |
Relation |
getElementAt(int index) |
List<Relation> |
getSelectedRelations()
Replies the list of selected relations.
|
int |
getSize() |
private Relation |
getVisibleRelation(int index) |
private Integer |
getVisibleRelationIndex(Relation rel) |
private List<Relation> |
getVisibleRelations() |
private boolean |
isValid(Relation r) |
void |
removeRelations(Collection<? extends OsmPrimitive> removedPrimitives)
Removes all relations in
removedPrimitives from the model |
void |
setFilter(SearchCompiler.Match filter) |
void |
setRelations(Collection<Relation> relations) |
void |
setSelectedRelations(Collection<Relation> sel)
Sets the selected relations.
|
void |
sort() |
private void |
updateFilteredRelations() |
void |
updateTitle() |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
private transient List<Relation> filteredRelations
private final DefaultListSelectionModel selectionModel
private transient SearchCompiler.Match filter
RelationListModel(DefaultListSelectionModel selectionModel)
public void sort()
public void setRelations(Collection<Relation> relations)
public void addRelations(Collection<? extends OsmPrimitive> addedPrimitives)
addedPrimitives
to the model for the
relation list dialogaddedPrimitives
- the collection of added primitives. May include nodes,
ways, and relations.public void removeRelations(Collection<? extends OsmPrimitive> removedPrimitives)
removedPrimitives
from the modelremovedPrimitives
- the removed primitives. May include nodes, ways,
and relationsprivate void updateFilteredRelations()
public void setFilter(SearchCompiler.Match filter)
private List<Relation> getVisibleRelations()
private Relation getVisibleRelation(int index)
public Relation getElementAt(int index)
public int getSize()
public List<Relation> getSelectedRelations()
public void setSelectedRelations(Collection<Relation> sel)
sel
- the list of selected relationsprivate Integer getVisibleRelationIndex(Relation rel)
public void updateTitle()