public class DefaultOptimizationRule extends java.lang.Object implements OptimizationRule
Default optimization rule. It uses the scene area occupied by the pane and
<code>min(width,height)</code> to optimize,e.g., to decide whether to
visualize the children of the pane (see OptimizableContentPane
).
Type | Property and Description |
---|---|
javafx.beans.property.BooleanProperty |
attachNodes |
javafx.beans.property.DoubleProperty |
minSceneArea |
javafx.beans.property.DoubleProperty |
minSceneDimension |
Constructor and Description |
---|
DefaultOptimizationRule() |
Modifier and Type | Method and Description |
---|---|
boolean |
attached(OptimizableContentPane p,
javafx.scene.transform.Transform t)
Indicates whether the children of the pane shall be attached to the scene graph.
|
javafx.beans.property.BooleanProperty |
attachNodesProperty() |
double |
getMinSceneArea()
Returns the minimum scene area.
|
double |
getMinSceneDimension()
Returns the minimum scene dimension.
|
boolean |
isAttachNodes()
Indicates whether this optimization shall attach/detach nodes from the
scene graph.
|
javafx.beans.property.DoubleProperty |
minSceneAreaProperty() |
javafx.beans.property.DoubleProperty |
minSceneDimensionProperty() |
void |
setAttachNodes(boolean attach)
Defines whether this optimization shall attach/detach nodes from the
scene graph.
|
void |
setMinSceneArea(double s)
Defines the minimum scene area.
|
void |
setMinSceneDimension(double d)
Defines the minimum scene dimension.
|
boolean |
visible(OptimizableContentPane p,
javafx.scene.transform.Transform t)
Indicates whether the children of the pane shall be visualized.
|
public javafx.beans.property.DoubleProperty minSceneAreaProperty
getMinSceneArea()
,
setMinSceneArea(double)
public javafx.beans.property.DoubleProperty minSceneDimensionProperty
public javafx.beans.property.BooleanProperty attachNodesProperty
isAttachNodes()
,
setAttachNodes(boolean)
public boolean visible(OptimizableContentPane p, javafx.scene.transform.Transform t)
OptimizationRule
Indicates whether the children of the pane shall be visualized.
visible
in interface OptimizationRule
p
- panet
- current transformationpublic boolean attached(OptimizableContentPane p, javafx.scene.transform.Transform t)
OptimizationRule
Indicates whether the children of the pane shall be attached to the scene graph.
attached
in interface OptimizationRule
p
- panet
- current transformationpublic javafx.beans.property.DoubleProperty minSceneAreaProperty()
getMinSceneArea()
,
setMinSceneArea(double)
public void setMinSceneArea(double s)
Defines the minimum scene area. If the area occupied by the pane is less than the specified value the children of the pane will be invisible.
s
- public double getMinSceneArea()
Returns the minimum scene area.
public javafx.beans.property.DoubleProperty minSceneDimensionProperty()
public void setMinSceneDimension(double d)
Defines the minimum scene dimension. If <code>min(width,height)</code> is less than the specified vaule the children of the pane will be invisible.
d
- minimum scene dimensionpublic double getMinSceneDimension()
Returns the minimum scene dimension.
public javafx.beans.property.BooleanProperty attachNodesProperty()
isAttachNodes()
,
setAttachNodes(boolean)
public void setAttachNodes(boolean attach)
Defines whether this optimization shall attach/detach nodes from the scene graph.
attach
- the state to setpublic boolean isAttachNodes()
Indicates whether this optimization shall attach/detach nodes from the scene graph.