java.lang.Object
com.flexganttfx.model.ActivityRef<A>
- Type Parameters:
A
- the type of the referenced activity
An activity reference is used to precisely identify the location of an
activity where the location is a combination of row, layer, and the activity
itself. As the same activity can be located on multiple rows and or multiple
layers at the same time it is often necessary to work with an activity
reference instead of only the activity.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionActivityRef
(Row<?, ?, A> row, Layer layer, A activity) Constructs a new activity reference. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Attaches the activity to its row.void
Removes the activity from the row where it is currently shown.boolean
Returns the activity itself.getLayer()
The layer on which the activity is shown.int
The line index of the activity.getRow()
Returns the row where the activity is located.int
hashCode()
boolean
Determines if the entire row path to the activity is currently expanded or not.toString()
-
Constructor Details
-
ActivityRef
Constructs a new activity reference.- Parameters:
row
- the row where the activity is shownlayer
- the model layer where the activity is located (optional)activity
- the referenced activity- Since:
- 1.0
-
-
Method Details
-
isPathExpanded
public boolean isPathExpanded()Determines if the entire row path to the activity is currently expanded or not. An activity will not be shown if the tree path to it is not expanded.- Returns:
- true if the row path to the activity is completely expanded
- Since:
- 1.0
-
getRow
Returns the row where the activity is located.- Returns:
- the row where the activity is located
- Since:
- 1.0
-
getLayer
The layer on which the activity is shown.- Returns:
- the layer that is displaying the activity
- Since:
- 1.0
-
getActivity
Returns the activity itself.- Returns:
- the activity
-
getLineIndex
public int getLineIndex()The line index of the activity. This is a convenience method delegating toRow.getLineIndex(Activity)
which then delegates toLinesManager.getLineIndex(Activity)
.- Returns:
- the line index of the activity
- Since:
- 1.0
-
detachFromRow
public void detachFromRow()Removes the activity from the row where it is currently shown.- Since:
- 1.0
- See Also:
-
attachToRow
public void attachToRow()Attaches the activity to its row.- Since:
- 1.0
- See Also:
-
toString
-
hashCode
public int hashCode() -
equals
-