Class ReferringRelationsBrowserModel
java.lang.Object
javax.swing.AbstractListModel<Relation>
org.openstreetmap.josm.gui.dialogs.relation.ReferringRelationsBrowserModel
- All Implemented Interfaces:
Serializable,ListModel<Relation>
This is the model for the
ReferringRelationsBrowser.
It holds all referrers to a given relation
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.AbstractListModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionReferringRelationsBrowserModel(Relation relation) Constructs a newReferringRelationsBrowserModel. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if reloading the relation is possible/authorized.protected voidgetElementAt(int index) Returns the relation.intgetSize()protected booleanisReferringRelation(Relation parent) voidPopulates the model with parent referrers.voidPopulates the browser with the list of referring relations in theDataSetds.voidsetRelation(Relation relation) Sets the relation.Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Field Details
-
relation
the relation -
referrers
-
-
Constructor Details
-
ReferringRelationsBrowserModel
Constructs a newReferringRelationsBrowserModel.- Parameters:
relation- relation
-
-
Method Details
-
fireModelUpdate
-
setRelation
Sets the relation.- Parameters:
relation- the relation
-
getElementAt
-
getSize
-
isReferringRelation
-
populate
Populates the model with parent referrers.- Parameters:
parents- parent referrers
-
populate
Populates the browser with the list of referring relations in theDataSetds.- Parameters:
ds- the data set
-
canReload
Determines if reloading the relation is possible/authorized.- Returns:
trueif reloading the relation is possible/authorized
-
getRelation
Returns the relation.- Returns:
- the relation
-