T - the object type of the related timeline objectspublic class DefaultRelationship<T> extends Object implements IRelationship<T>
IRelationship.| Constructor and Description |
|---|
DefaultRelationship(TimelineObjectPath<T> sourcePath,
TimelineObjectPath<T> targetPath)
Constructs a new relationship object.
|
DefaultRelationship(TimelineObjectPath<T> sourcePath,
TimelineObjectPath<T> targetPath,
RelationshipType type)
Constructs a new relationship object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getLabel(LabelType type)
Returns a label for the given type / purpose.
|
Object |
getPopupObject(boolean extended)
Returns the object to be shown inside the popup window when the mouse
cursor hovers over the relationship.
|
Object |
getPopupTitleObject()
Returns the object used for storing the data that is needed for the popup
title.
|
TimelineObjectPath<T> |
getSourcePath()
Returns the tree path information that can be used to locate the row on
which the source timeline object is displayed.
|
TimelineObjectPath<T> |
getTargetPath()
Returns the tree path information that can be used to locate the row on
which the target timeline object is displayed.
|
RelationshipType |
getType()
The type of relationship expressed by the line drawn between two timeline
objects.
|
boolean |
isDeletable()
Determines if the user is allowed to delete the relationship.
|
boolean |
isSelectable()
Determines if the user is allowed to select the relationship by clicking
on it.
|
void |
setDeletable(boolean b)
Specifies whether the relationship can be deleted by the user or not.
|
void |
setLabel(String label,
LabelType type)
Sets a new label for the given label type.
|
void |
setPopupObject(Object popupObject,
boolean extended)
Sets the object used for displaying popup information for the given
relationship.
|
void |
setPopupTitleObject(Object titleObject)
Sets the object used for storing the data that is needed for the popup
title.
|
void |
setSelectable(boolean b)
Specifies whether the relationship can be selected by the user or not.
|
void |
setSourcePath(TimelineObjectPath<T> path)
Sets a new tree path that can be used to locate the row on which the
source timeline object is displayed.
|
void |
setTargetPath(TimelineObjectPath<T> path)
Sets a new tree path that can be used to locate the row on which the
target timeline object is displayed.
|
void |
setType(RelationshipType type)
Sets the relationship type expressed by the line drawn between two
timeline objects.
|
String |
toString() |
public DefaultRelationship(TimelineObjectPath<T> sourcePath, TimelineObjectPath<T> targetPath, RelationshipType type)
sourcePath - the timeline object path used to locate the source timeline
objecttargetPath - the timeline object path used to locate the target timeline
objecttype - the type of relationship (start to end, end to start, start to
start, end to end)public DefaultRelationship(TimelineObjectPath<T> sourcePath, TimelineObjectPath<T> targetPath)
sourcePath - the timeline object path used to locate the source timeline
objecttargetPath - the timeline object path used to locate the target timeline
objectpublic void setLabel(String label, LabelType type)
LabelType
enumerator specifies the context in which the label gets used: tooltip,
popup, status bar.label - the new label used for the given label typetype - the label type designating where the label will be usedpublic String getLabel(LabelType type)
IRelationshipgetLabel in interface IRelationship<T>type - the label typepublic void setSourcePath(TimelineObjectPath<T> path)
IRelationshipsetSourcePath in interface IRelationship<T>path - the new source pathpublic TimelineObjectPath<T> getSourcePath()
IRelationshipgetSourcePath in interface IRelationship<T>public void setTargetPath(TimelineObjectPath<T> path)
IRelationshipsetTargetPath in interface IRelationship<T>path - the new target pathpublic TimelineObjectPath<T> getTargetPath()
IRelationshipgetTargetPath in interface IRelationship<T>public void setSelectable(boolean b)
b - if TRUE the user will be able to select the relationshipISelectionPolicy.isSelectable(IRelationship, IGanttChartModel)public boolean isSelectable()
IRelationshipisSelectable in interface IRelationship<T>public boolean isDeletable()
IRelationshipisDeletable in interface IRelationship<T>public void setDeletable(boolean b)
b - if TRUE the user will be able to delete the relationshipIRelationshipPolicy.isDeletable(IRelationship, IGanttChartModel)public void setPopupObject(Object popupObject, boolean extended)
popupObject - extended - public Object getPopupObject(boolean extended)
IRelationshipgetPopupObject in interface IRelationship<T>extended - if TRUE the user wants to see the extended popup informationpublic void setPopupTitleObject(Object titleObject)
titleObject - the data object used for the popup titlepublic Object getPopupTitleObject()
getPopupTitleObject in interface IRelationship<T>public void setType(RelationshipType type)
IRelationshipsetType in interface IRelationship<T>type - the relationship typepublic RelationshipType getType()
IRelationshipgetType in interface IRelationship<T>Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.