public class DefaultRelationshipSelectionModel extends Object implements IRelationshipSelectionModel
RelationshipLayer
.Constructor and Description |
---|
DefaultRelationshipSelectionModel()
Constructs a new selection model.
|
Modifier and Type | Method and Description |
---|---|
void |
addRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)
Adds a listener to the model so that changes to the selection can be
detected.
|
void |
addSelection(Collection<IRelationship> relationships)
Adds several relationships to the selection.
|
void |
clearSelection()
Removes all relationships from the model, hence deselecting them.
|
protected void |
fireValueChanged(RelationshipSelectionEvent evt)
Sends the given event object to all listeners that are attached to this
model.
|
Collection<IRelationship> |
getSelection()
Returns all relationship model object that are currently selected.
|
boolean |
isEmpty()
Returns TRUE if currently no relationships are selected.
|
boolean |
isSelected(IRelationship relationship)
Returns TRUE if the given relationship object is selected.
|
void |
removeRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)
Removes a listener from the model.
|
void |
removeSelection(Collection<IRelationship> relationships)
Removes several relationships from the selection.
|
public DefaultRelationshipSelectionModel()
public Collection<IRelationship> getSelection()
IRelationshipSelectionModel
getSelection
in interface IRelationshipSelectionModel
public void addSelection(Collection<IRelationship> relationships)
IRelationshipSelectionModel
addSelection
in interface IRelationshipSelectionModel
relationships
- the selected relationshipspublic void removeSelection(Collection<IRelationship> relationships)
IRelationshipSelectionModel
removeSelection
in interface IRelationshipSelectionModel
relationships
- the deselected relationshipspublic void clearSelection()
IRelationshipSelectionModel
clearSelection
in interface IRelationshipSelectionModel
public boolean isEmpty()
IRelationshipSelectionModel
isEmpty
in interface IRelationshipSelectionModel
public boolean isSelected(IRelationship relationship)
IRelationshipSelectionModel
isSelected
in interface IRelationshipSelectionModel
relationship
- the relationship to check for its selection statepublic void addRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)
IRelationshipSelectionModel
addRelationshipSelectionModelListener
in interface IRelationshipSelectionModel
l
- the model listenerpublic void removeRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)
IRelationshipSelectionModel
removeRelationshipSelectionModelListener
in interface IRelationshipSelectionModel
l
- the model listenerprotected void fireValueChanged(RelationshipSelectionEvent evt)
evt
- the selection eventCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.