java.lang.Object
com.flexganttfx.model.Layer
public class Layer extends Object
Layers are used to group activities together. Activities on the same layer
are drawn at the same time (z-order). A layer has a name, an ID, it can be
turned on / off, and their opacity can be changed. These changes have an
impact on all activities on that layer.
The ID of the layer is used for drag and drop operations of activities between different Gantt charts. Dropped activities will be added to the layer with the same ID. The layer name will be used as the default ID for newly created layers. The ID only needs to be changed if the same layer type will be used with different names in different Gantt charts.
- Since:
- 1.0
-
Property Summary
Properties Type Property Description BooleanProperty
deletable
The property used to define whether the layer can be deleted by the user or not.DoubleProperty
fadeInOutOpacity
The property used to store the temporary opacity of the layer while the layer is being made visible or hidden.StringProperty
id
The property used to store the id of the layer.StringProperty
name
The property used to store the name of the layer.DoubleProperty
opacity
The property used to store the opacity of the layer.BooleanProperty
visible
The property used to store the visibility of the layer. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description BooleanProperty
deletableProperty()
The property used to define whether the layer can be deleted by the user or not.DoubleProperty
fadeInOutOpacityProperty()
The property used to store the temporary opacity of the layer while the layer is being made visible or hidden.double
getFadeInOutOpacity()
Returns the value offadeInOutOpacityProperty()
.String
getId()
Returns the value of theidProperty()
.String
getName()
Returns the value of thenameProperty()
.double
getOpacity()
Returns the value ofopacityProperty()
.StringProperty
idProperty()
The property used to store the id of the layer.boolean
isDeletable()
Returns the value ofdeletableProperty()
.boolean
isVisible()
Returns the value ofvisibleProperty()
.StringProperty
nameProperty()
The property used to store the name of the layer.DoubleProperty
opacityProperty()
The property used to store the opacity of the layer.void
setDeletable(boolean deletable)
Sets the value ofdeletableProperty()
.void
setFadeInOutOpacity(double opacity)
Sets the value offadeInOutOpacityProperty()
.void
setId(String id)
Sets the value of theidProperty()
.void
setName(String name)
Sets the value of thenameProperty()
.void
setOpacity(double opacity)
Sets the value of theopacityProperty()
.void
setVisible(boolean visible)
Sets the value ofvisibleProperty()
.String
toString()
BooleanProperty
visibleProperty()
The property used to store the visibility of the layer.
-
Property Details
-
name
The property used to store the name of the layer.- Since:
- 1.0
- See Also:
getName()
,setName(String)
-
id
The property used to store the id of the layer.- Since:
- 1.0
- See Also:
getId()
,setId(String)
-
opacity
The property used to store the opacity of the layer.- Since:
- 1.0
- See Also:
getOpacity()
,setOpacity(double)
-
fadeInOutOpacity
The property used to store the temporary opacity of the layer while the layer is being made visible or hidden. This property is needed for the animation that takes place while this is done.- Since:
- 1.0
- See Also:
getFadeInOutOpacity()
,setFadeInOutOpacity(double)
-
visible
The property used to store the visibility of the layer.- Since:
- 1.0
- See Also:
isVisible()
,setVisible(boolean)
-
deletable
The property used to define whether the layer can be deleted by the user or not.- Since:
- 1.0
- See Also:
isDeletable()
,setDeletable(boolean)
-
-
Constructor Details
-
Layer
Constructs a new layer with the given name.- Parameters:
name
- the name of the layer- Since:
- 1.0
-
Layer
public Layer()Constructs a new layer.- Since:
- 1.0
-
-
Method Details
-
nameProperty
The property used to store the name of the layer.- Since:
- 1.0
- See Also:
getName()
,setName(String)
-
setName
Sets the value of thenameProperty()
.- Parameters:
name
- the new name of the layer- Since:
- 1.0
-
getName
Returns the value of thenameProperty()
.- Returns:
- the layer name
- Since:
- 1.0
-
idProperty
The property used to store the id of the layer.- Since:
- 1.0
- See Also:
getId()
,setId(String)
-
setId
Sets the value of theidProperty()
.- Parameters:
id
- the new id of the layer- Since:
- 1.0
-
getId
Returns the value of theidProperty()
.- Returns:
- the layer id
- Since:
- 1.0
-
opacityProperty
The property used to store the opacity of the layer.- Since:
- 1.0
- See Also:
getOpacity()
,setOpacity(double)
-
setOpacity
public final void setOpacity(double opacity)Sets the value of theopacityProperty()
.- Parameters:
opacity
- the new opacity of the layer- Since:
- 1.0
-
getOpacity
public final double getOpacity()Returns the value ofopacityProperty()
.- Returns:
- the opacity of the layer
- Since:
- 1.0
-
fadeInOutOpacityProperty
The property used to store the temporary opacity of the layer while the layer is being made visible or hidden. This property is needed for the animation that takes place while this is done.- Since:
- 1.0
- See Also:
getFadeInOutOpacity()
,setFadeInOutOpacity(double)
-
getFadeInOutOpacity
public final double getFadeInOutOpacity()Returns the value offadeInOutOpacityProperty()
.- Returns:
- the fade in / fade out opacity value
- Since:
- 1.0
-
setFadeInOutOpacity
public final void setFadeInOutOpacity(double opacity)Sets the value offadeInOutOpacityProperty()
.- Parameters:
opacity
- the new opacity- Since:
- 1.0
-
visibleProperty
The property used to store the visibility of the layer.- Since:
- 1.0
- See Also:
isVisible()
,setVisible(boolean)
-
isVisible
public final boolean isVisible()Returns the value ofvisibleProperty()
.- Returns:
- true if the layer is visible
- Since:
- 1.0
-
setVisible
public final void setVisible(boolean visible)Sets the value ofvisibleProperty()
.- Parameters:
visible
- the new visibility of the layer
-
deletableProperty
The property used to define whether the layer can be deleted by the user or not.- Since:
- 1.0
- See Also:
isDeletable()
,setDeletable(boolean)
-
isDeletable
public final boolean isDeletable()Returns the value ofdeletableProperty()
.- Returns:
- true if the layer can be deleted
- Since:
- 1.0
-
setDeletable
public final void setDeletable(boolean deletable)Sets the value ofdeletableProperty()
.- Parameters:
deletable
- the new deletable value- Since:
- 1.0
-
toString
-