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()
IRelationshipSelectionModelgetSelection in interface IRelationshipSelectionModelpublic void addSelection(Collection<IRelationship> relationships)
IRelationshipSelectionModeladdSelection in interface IRelationshipSelectionModelrelationships - the selected relationshipspublic void removeSelection(Collection<IRelationship> relationships)
IRelationshipSelectionModelremoveSelection in interface IRelationshipSelectionModelrelationships - the deselected relationshipspublic void clearSelection()
IRelationshipSelectionModelclearSelection in interface IRelationshipSelectionModelpublic boolean isEmpty()
IRelationshipSelectionModelisEmpty in interface IRelationshipSelectionModelpublic boolean isSelected(IRelationship relationship)
IRelationshipSelectionModelisSelected in interface IRelationshipSelectionModelrelationship - the relationship to check for its selection statepublic void addRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)
IRelationshipSelectionModeladdRelationshipSelectionModelListener in interface IRelationshipSelectionModell - the model listenerpublic void removeRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)
IRelationshipSelectionModelremoveRelationshipSelectionModelListener in interface IRelationshipSelectionModell - the model listenerprotected void fireValueChanged(RelationshipSelectionEvent evt)
evt - the selection eventCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.