public class NodeAnimationController extends Object
The default settings are:
TreeTable.setNodeAnimationController(NodeAnimationController)
Constructor and Description |
---|
NodeAnimationController()
Constructs a new controller.
|
Modifier and Type | Method and Description |
---|---|
int |
getAnimationDuration(int rowCount)
Calculates the animation duration.
|
int |
getAnimationTimePerRow()
Returns the animation duration in milliseconds per row.
|
int |
getMaximumAnimationDuration()
Returns the amount of time that the animation may run.
|
int |
getMinimumAnimationDuration()
Returns the minimum time the animation can run.
|
boolean |
isNodeAnimated(TreeTableNode node)
Determines if the given node will be toggled with an animation or not.
|
boolean |
isShadowVisible()
Determines if the controller is configured to show a drop shadow below
the toggled tree node.
|
boolean |
isUsingTransparency()
Determines if the expand / collapse animation will use transparency to
make the children nodes that slide in / out fade in / out.
|
void |
setAnimationTimePerRow(int millis)
Sets the animation duration in milliseconds per row.
|
void |
setMaximumAnimationDuration(int millis)
Limits the amount of time that the animation may run.
|
void |
setMinimumAnimationDuration(int millis)
Specifies the minimum time the animation can run.
|
void |
setNodeAnimated(boolean animate)
Specifies whether the tree table will animate the tree node expansion or
not.
|
void |
setShadowVisible(boolean visible)
Specifies whether a drop shadow will be shown below the expanded /
collapsed node.
|
void |
setUsingTransparency(boolean use)
Specifies whether the expand / collapse animation will use transparency
to make the children nodes that slide in / out fade in / out.
|
String |
toString() |
public NodeAnimationController()
public void setNodeAnimated(boolean animate)
animate
- if TRUE then the node will be opened / closed with a little
animationpublic boolean isNodeAnimated(TreeTableNode node)
setNodeAnimated(boolean)
. This class needs to be subclassed and
this method needs to be overriden in order to control the animation for
indivudual nodes.node
- the node to checkpublic void setShadowVisible(boolean visible)
visible
- if TRUE a drop shadow will be shownpublic boolean isShadowVisible()
public void setUsingTransparency(boolean use)
use
- if TRUE the animation will also use transparency to make the
nodes fade in / out.public boolean isUsingTransparency()
public void setMaximumAnimationDuration(int millis)
millis
- the maximum animation durationpublic int getMaximumAnimationDuration()
public void setMinimumAnimationDuration(int millis)
millis
- the duration to setpublic int getMinimumAnimationDuration()
public int getAnimationTimePerRow()
setMaximumAnimationDuration(int)
,
setMinimumAnimationDuration(int)
public void setAnimationTimePerRow(int millis)
millis
- the animation duration per rowsetMaximumAnimationDuration(int)
,
setMinimumAnimationDuration(int)
public int getAnimationDuration(int rowCount)
duration = Math.max(minimumAnimationDuration, Math.min(maximumAnimationDuration, rowCount * animationTimePerRow))
rowCount
- the number of rows affected by the animation = children nodes
of toggled nodeCopyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.