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 boolean
canReload()
Determines if reloading the relation is possible/authorized.protected void
fireModelUpdate()
Relation
getElementAt(int index)
Relation
getRelation()
Returns the relation.int
getSize()
protected boolean
isReferringRelation(Relation parent)
void
populate(java.util.List<Relation> parents)
Populates the model with parent referrers.void
populate(DataSet ds)
Populates the browser with the list of referring relations in theDataSet
ds.void
setRelation(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 theDataSet
ds.- Parameters:
ds
- the data set
-
canReload
public boolean canReload()
Determines if reloading the relation is possible/authorized.- Returns:
true
if reloading the relation is possible/authorized
-
getRelation
public Relation getRelation()
Returns the relation.- Returns:
- the relation
-
-