P - the type of the parent row (example: row is of type "Building" and
parent type is "Factory" to express that the factory consists of
several buildings).C - the type of the children rows (example: row is of type "Building"
and children type is "Machine" to express that the building houses
several machines).A - the type of the activities shown in this row (example: row is of
type "Building", activities are "ProductionOrders" that are
executed in this building).public abstract class Row<P extends Row<?,?,?>,C extends Row<?,?,?>,A extends Activity> extends Object
getRepository()). The default repository is of type
IntervalTreeActivityRepository and can be replaced by calling
setRepository(ActivityRepository). Activities can be placed on lines
within the row. The row delegates this work to a LinesManager. The
default manager is of type EqualLinesManager. To replace the manager
simply call setLinesManager(LinesManager).
public class Aircraft extends Row<Fleet, CrewMember, Flight> {
}
This now allows you to call:
Aircraft aircraft = new Aircraft(); ... Fleet fleet = aircraft.getParent(); List<CrewMember> crew = aircraft.getChildren();
| Type | Property and Description |
|---|---|
BooleanProperty |
expanded
The property used to store the expansion state of the row.
|
DoubleProperty |
height
The property used to store the height of the row.
|
ObjectProperty<Layout> |
layout
The property used to store the layout used for laying out the activities
that are directly associated with the row (and not on an inner line).
|
IntegerProperty |
lineCount
The property used to keep track of the number of inner lines shown by the
row.
|
ObjectProperty<LinesManager<A>> |
linesManager
The property used to store the
LinesManager instance for this
row. |
DoubleProperty |
maxHeight
The property used to store the maximum height of the row.
|
DoubleProperty |
minHeight
The property used to store the minimum height of the row.
|
StringProperty |
name
The property used to store the name of the row.
|
ReadOnlyObjectProperty<P> |
parent
Returns a read-only property used to store the parent row of this row.
|
ObjectProperty<ActivityRepository<A>> |
repository
The property used to store the activity repository for the row.
|
ReadOnlyBooleanProperty |
showing
The property used to express whether a row is currently showing in the
view or not.
|
ObjectProperty<Object> |
userObject
The property used to store a row-specific user object.
|
ObjectProperty<ZoneId> |
zoneId
The property used to store the zone ID for this row.
|
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_ROW_HEIGHT |
| Constructor and Description |
|---|
Row()
Constructs a new row with an
IntervalTreeActivityRepository and
an EqualLinesManager. |
Row(String name)
Constructs a new row with an
IntervalTreeActivityRepository and
an EqualLinesManager and the given name. |
| Modifier and Type | Method and Description |
|---|---|
void |
addActivity(Layer layer,
A activity)
Adds the given activity for the given layer to this row.
|
void |
clearActivities()
Removes all activities from the row.
|
void |
clearActivities(Layer layer)
Removes all activities on the given layer from the row.
|
BooleanProperty |
expandedProperty()
The property used to store the expansion state of the row.
|
ObservableList<Calendar<?>> |
getCalendars()
Returns a list of calendars attached to this row.
|
ObservableList<C> |
getChildren()
Returns the list of children of this row.
|
Instant |
getEarliestTimeUsed()
Returns the earliest time used by the row.
|
double |
getHeight()
Returns the value of the
heightProperty(). |
Instant |
getLatestTimeUsed()
Returns the latest time used by the row.
|
Layout |
getLayout()
Returns the value of the
layoutProperty(). |
int |
getLineCount()
Returns the value of the
lineCountProperty(). |
double |
getLineHeight(int lineIndex)
Returns the height of the given inner line.
|
int |
getLineIndex(A activity)
Returns the line index for the given activity.
|
Layout |
getLineLayout(int lineIndex)
Returns a line-specific layout for the given line.
|
double |
getLineLocation(int lineIndex)
Returns the location of the given inner line.
|
LinesManager<A> |
getLinesManager()
Returns the value of
linesManagerProperty(). |
double |
getMaxHeight()
Returns the value of
maxHeightProperty(). |
double |
getMinHeight()
Returns the value of the
minHeightProperty(). |
String |
getName()
Returns the value of the
nameProperty(). |
P |
getParent()
The parent of this row.
|
Row[] |
getPath()
Returns the path to this row, for example [ROOT, Parent1, Parent2, this].
|
ActivityRepository<A> |
getRepository()
Returns the value of the
repositoryProperty(). |
Object |
getUserObject()
Returns the value of
userObjectProperty(). |
ZoneId |
getZoneId()
Returns the value of the
zoneIdProperty(). |
DoubleProperty |
heightProperty()
The property used to store the height of the row.
|
boolean |
isExpanded()
Returns the value of the
expandedProperty(). |
boolean |
isShowing()
Returns the value of
showingProperty(). |
ObjectProperty<Layout> |
layoutProperty()
The property used to store the layout used for laying out the activities
that are directly associated with the row (and not on an inner line).
|
IntegerProperty |
lineCountProperty()
The property used to keep track of the number of inner lines shown by the
row.
|
ObjectProperty<LinesManager<A>> |
linesManagerProperty()
The property used to store the
LinesManager instance for this
row. |
DoubleProperty |
maxHeightProperty()
The property used to store the maximum height of the row.
|
DoubleProperty |
minHeightProperty()
The property used to store the minimum height of the row.
|
StringProperty |
nameProperty()
The property used to store the name of the row.
|
ReadOnlyObjectProperty<P> |
parentProperty()
Returns a read-only property used to store the parent row of this row.
|
void |
removeActivity(Layer layer,
A activity)
Removes the given activity from the given layer from this row.
|
ObjectProperty<ActivityRepository<A>> |
repositoryProperty()
The property used to store the activity repository for the row.
|
void |
setExpanded(boolean expanded)
Sets the value of the
expandedProperty(). |
void |
setHeight(double height)
Sets the value of the
heightProperty(). |
void |
setLayout(Layout layout)
Sets the value of the
layoutProperty(). |
void |
setLineCount(int count)
Sets the value of the
lineCountProperty(). |
void |
setLinesManager(LinesManager<A> manager)
Sets the value of
linesManagerProperty(). |
void |
setMaxHeight(double height)
Sets the value of the
maxHeightProperty(). |
void |
setMinHeight(double height)
Sets a new value for the
minHeightProperty(). |
void |
setName(String name)
Sets the value of the
nameProperty(). |
void |
setRepository(ActivityRepository<A> repository)
Sets the value of the
repositoryProperty(). |
void |
setShowing(boolean showing)
Sets the value of the
showingProperty(). |
void |
setUserObject(Object obj)
Sets the value of
userObjectProperty(). |
void |
setZoneId(ZoneId zoneId)
Sets the value of the
zoneIdProperty(). |
ReadOnlyBooleanProperty |
showingProperty()
The property used to express whether a row is currently showing in the
view or not.
|
String |
toString() |
ObjectProperty<Object> |
userObjectProperty()
The property used to store a row-specific user object.
|
ObjectProperty<ZoneId> |
zoneIdProperty()
The property used to store the zone ID for this row.
|
public final ReadOnlyObjectProperty<P extends Row<?,?,?>> parentProperty
getParent()public final BooleanProperty expandedProperty
isExpanded(),
setExpanded(boolean)public final ReadOnlyBooleanProperty showingProperty
isShowing(),
setShowing(boolean)public final ObjectProperty<Layout> layoutProperty
getLayout(),
setLayout(Layout)public final ObjectProperty<ActivityRepository<A extends Activity>> repositoryProperty
getRepository(),
setRepository(ActivityRepository)public final StringProperty nameProperty
getName(),
setName(String)public final DoubleProperty heightProperty
getHeight(),
setHeight(double)public final DoubleProperty minHeightProperty
getMinHeight(),
setMinHeight(double)public final DoubleProperty maxHeightProperty
getMaxHeight(),
setMaxHeight(double)public final ObjectProperty<Object> userObjectProperty
getUserObject(),
setUserObject(Object)public final ObjectProperty<LinesManager<A extends Activity>> linesManagerProperty
LinesManager instance for this
row. The lines manager is used to control the layout of inner lines and
the placement of activities on these lines.getLinesManager(),
setLinesManager(LinesManager)public final ObjectProperty<ZoneId> zoneIdProperty
getZoneId(),
setZoneId(ZoneId)public final IntegerProperty lineCountProperty
getLineCount(),
setLineCount(int)public static final double DEFAULT_ROW_HEIGHT
public Row()
IntervalTreeActivityRepository and
an EqualLinesManager.public Row(String name)
IntervalTreeActivityRepository and
an EqualLinesManager and the given name.name - the name of the row (e.g. "Building 1")public final P getParent()
public final ReadOnlyObjectProperty<P> parentProperty()
getParent()public final Row[] getPath()
public final ObservableList<C> getChildren()
public final BooleanProperty expandedProperty()
isExpanded(),
setExpanded(boolean)public final void setExpanded(boolean expanded)
expandedProperty().expanded - the new value of the expanded propertypublic final boolean isExpanded()
expandedProperty().public final ReadOnlyBooleanProperty showingProperty()
isShowing(),
setShowing(boolean)public final void setShowing(boolean showing)
showingProperty().showing - the new valuepublic final boolean isShowing()
showingProperty().public final ObjectProperty<Layout> layoutProperty()
getLayout(),
setLayout(Layout)public final Layout getLayout()
layoutProperty().public final void setLayout(Layout layout)
layoutProperty().layout - the new row layoutpublic final ObjectProperty<ActivityRepository<A>> repositoryProperty()
getRepository(),
setRepository(ActivityRepository)public final ActivityRepository<A> getRepository()
repositoryProperty().public final void setRepository(ActivityRepository<A> repository)
repositoryProperty().repository - the new repository to usepublic final Instant getEarliestTimeUsed()
ActivityRepository.getEarliestTimeUsed().getLatestTimeUsed(), 1.0public final Instant getLatestTimeUsed()
ActivityRepository.getLatestTimeUsed().getEarliestTimeUsed(), 1.0public final StringProperty nameProperty()
getName(),
setName(String)public final String getName()
nameProperty().public final void setName(String name)
nameProperty().name - the new name of the rowpublic final DoubleProperty heightProperty()
getHeight(),
setHeight(double)public final void setHeight(double height)
heightProperty().height - the new height of the rowpublic final double getHeight()
heightProperty().public final DoubleProperty minHeightProperty()
getMinHeight(),
setMinHeight(double)public final void setMinHeight(double height)
minHeightProperty().height - the new minimum heightpublic final double getMinHeight()
minHeightProperty().public final DoubleProperty maxHeightProperty()
getMaxHeight(),
setMaxHeight(double)public final void setMaxHeight(double height)
maxHeightProperty().height - the maximum height of the rowpublic final double getMaxHeight()
maxHeightProperty().public final ObjectProperty<Object> userObjectProperty()
getUserObject(),
setUserObject(Object)public final Object getUserObject()
userObjectProperty().public final void setUserObject(Object obj)
userObjectProperty().obj - the new user objectpublic final ObjectProperty<LinesManager<A>> linesManagerProperty()
LinesManager instance for this
row. The lines manager is used to control the layout of inner lines and
the placement of activities on these lines.getLinesManager(),
setLinesManager(LinesManager)public final LinesManager<A> getLinesManager()
linesManagerProperty().public final void setLinesManager(LinesManager<A> manager)
linesManagerProperty().manager - the new lines managerpublic final ObjectProperty<ZoneId> zoneIdProperty()
getZoneId(),
setZoneId(ZoneId)public final ZoneId getZoneId()
zoneIdProperty().public final void setZoneId(ZoneId zoneId)
zoneIdProperty().zoneId - the new zone ID for this rowpublic final ObservableList<Calendar<?>> getCalendars()
public final IntegerProperty lineCountProperty()
getLineCount(),
setLineCount(int)public final void setLineCount(int count)
lineCountProperty().count - the new line count for the rowpublic final int getLineCount()
lineCountProperty().public final void addActivity(Layer layer, A activity)
MutableActivityRepository.addActivity(ActivityRef).layer - the layer where the activity will be displayedactivity - the activity that will be addedMutableActivityRepository.addActivity(ActivityRef)public final void removeActivity(Layer layer, A activity)
layer - the layer from which to remove the activityactivity - the activity to removeMutableActivityRepository.removeActivity(ActivityRef)public final void clearActivities()
MutableActivityRepository.clearActivities()public final void clearActivities(Layer layer)
layer - the layer from which to remove all activitiesMutableActivityRepository.clearActivities(Layer)public final int getLineIndex(A activity)
LinesManager.getLineIndex(Activity).activity - the activity for which to return a line indexpublic final double getLineLocation(int lineIndex)
getHeight().lineIndex - the index of the line for which to return a locationpublic final double getLineHeight(int lineIndex)
getHeight().lineIndex - the index of the line for which to return a heightpublic final Layout getLineLayout(int lineIndex)
lineIndex - the index of the lineCopyright © 2014 Dirk Lemmermann Software & Consulting. All rights reserved.