Class ReferringRelationsBrowserModel
- java.lang.Object
-
- javax.swing.AbstractListModel<Relation>
-
- org.openstreetmap.josm.gui.dialogs.relation.ReferringRelationsBrowserModel
-
- All Implemented Interfaces:
java.io.Serializable,javax.swing.ListModel<Relation>
public class ReferringRelationsBrowserModel extends javax.swing.AbstractListModel<Relation>
This is the model for theReferringRelationsBrowser.It holds all referrers to a given relation
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReferringRelationsBrowserModel(Relation relation)Constructs a newReferringRelationsBrowserModel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanReload()Determines if reloading the relation is possible/authorized.protected voidfireModelUpdate()RelationgetElementAt(int index)RelationgetRelation()Returns the relation.intgetSize()protected booleanisReferringRelation(Relation parent)voidpopulate(java.util.List<Relation> parents)Populates the model with parent referrers.voidpopulate(DataSet ds)Populates the browser with the list of referring relations in theDataSetds.voidsetRelation(Relation relation)Sets the relation.
-
-
-
Constructor Detail
-
ReferringRelationsBrowserModel
public ReferringRelationsBrowserModel(Relation relation)
Constructs a newReferringRelationsBrowserModel.- Parameters:
relation- relation
-
-
Method Detail
-
fireModelUpdate
protected void fireModelUpdate()
-
setRelation
public void setRelation(Relation relation)
Sets the relation.- Parameters:
relation- the relation
-
getElementAt
public Relation getElementAt(int index)
-
getSize
public int getSize()
-
isReferringRelation
protected boolean isReferringRelation(Relation parent)
-
populate
public void populate(java.util.List<Relation> parents)
Populates the model with parent referrers.- Parameters:
parents- parent referrers
-
populate
public void populate(DataSet ds)
Populates the browser with the list of referring relations in theDataSetds.- Parameters:
ds- the data set
-
canReload
public boolean canReload()
Determines if reloading the relation is possible/authorized.- Returns:
trueif reloading the relation is possible/authorized
-
getRelation
public Relation getRelation()
Returns the relation.- Returns:
- the relation
-
-