private class RelationListDialog.RelationListModel extends javax.swing.AbstractListModel<IRelation<?>>
Modifier and Type | Field and Description |
---|---|
private SearchCompiler.Match |
filter |
private java.util.List<IRelation<?>> |
filteredRelations |
private java.util.List<IRelation<?>> |
relations |
private javax.swing.DefaultListSelectionModel |
selectionModel |
Constructor and Description |
---|
RelationListModel(javax.swing.DefaultListSelectionModel selectionModel) |
Modifier and Type | Method and Description |
---|---|
void |
addRelations(java.util.Collection<? extends OsmPrimitive> addedPrimitives)
Add all relations in
addedPrimitives to the model for the
relation list dialog |
void |
clear()
Clears the model.
|
IRelation<?> |
getElementAt(int index) |
java.util.List<IRelation<?>> |
getSelectedRelations()
Replies the list of selected relations.
|
int |
getSize() |
private IRelation<?> |
getVisibleRelation(int index) |
private java.lang.Integer |
getVisibleRelationIndex(IRelation<?> rel) |
private java.util.List<IRelation<?>> |
getVisibleRelations() |
private boolean |
isValid(IRelation<?> r) |
void |
removeRelations(java.util.Collection<? extends OsmPrimitive> removedPrimitives)
Removes all relations in
removedPrimitives from the model |
void |
setFilter(SearchCompiler.Match filter) |
void |
setRelations(java.util.Collection<? extends IRelation<?>> relations) |
void |
setSelectedRelations(java.util.Collection<? extends IRelation<?>> sel)
Sets the selected relations.
|
void |
sort()
Sorts the model using
DefaultNameFormatter relation comparator. |
private void |
updateFilteredRelations() |
void |
updateTitle() |
private transient java.util.List<IRelation<?>> filteredRelations
private final javax.swing.DefaultListSelectionModel selectionModel
private transient SearchCompiler.Match filter
RelationListModel(javax.swing.DefaultListSelectionModel selectionModel)
public void clear()
public void sort()
DefaultNameFormatter
relation comparator.public void setRelations(java.util.Collection<? extends IRelation<?>> relations)
public void addRelations(java.util.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(java.util.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 java.util.List<IRelation<?>> getVisibleRelations()
private IRelation<?> getVisibleRelation(int index)
public IRelation<?> getElementAt(int index)
public int getSize()
public java.util.List<IRelation<?>> getSelectedRelations()
public void setSelectedRelations(java.util.Collection<? extends IRelation<?>> sel)
sel
- the list of selected relationsprivate java.lang.Integer getVisibleRelationIndex(IRelation<?> rel)
public void updateTitle()