TridentBuilder is a Groovy builder for the open source Trident animation library
Description
The goal of this project is to provide a powerful and extensible animation library for Java applications.
Download
Installing
Drop tridentbuilder-0.5 into $GROOVY_HOME/lib along with its dependencies
All these dependencies can be downloaded from this directory too.
| Warning Trident and TridentBuilder require Jdk6 to be installed. |
Maven
Gradle
Pre-requisites
Groovy 1.8.0 is the required minimum version to run TridentBuilder 0.5
It is recommended that you upgrade to the 1.8.x series in order to take advantage of
- @Bindable and ASTTransformations
- short binding syntax
- numerous enhancements made to SwingBuilder and FactoryBuilderSupport
Documentation
An example application can be found at http://github.com/aalmiray/TridentDemo/tree/master, it recreates some of Trident's samples in a friendly Griffon manner.
These are the nodes currently supported by TridentBuilder 0.5, they are listed in groups. Component groups are a good way to organize nodes, they also serve another purpose when used with Griffon's CompositeBuilder.
| Properties The following table summarizes the properties required by the node factories, there are other properties that can be set on the built nodes, refer to Trident's javadocs to know more about them. |
Trident |
|
|
|
|
|
|
|
Node |
Property |
Type |
Default |
Required |
Bindable |
Notes |
|
|---|---|---|---|---|---|---|---|
timeline |
start |
boolean |
|
|
|
|
|
|
loop |
Timeline.RepeatBehavior |
|
|
|
alternative values are [true, "loop", "reverse"] |
|
|
target |
Object |
|
|
|
also can be set as the node's value |
|
timelineCallback |
timelinePulse |
Closure |
|
|
|
can be defined as a nested closure |
|
|
timelineStateChanged |
Closure |
|
|
|
can be defined as a nested closure |
|
interpolatedProperty |
property |
String |
|
|
|
or set the property's as the node's value |
|
|
from |
Object |
|
|
|
|
|
|
to |
Object |
|
|
|
|
|
|
interpolator |
PropertyInterpolator |
|
|
|
|
|
keyFrames |
property |
String |
|
|
|
or set the property's as the node's value |
|
|
interpolator |
PropertyInterpolator |
|
|
|
|
|
keyFrame |
offset |
float |
|
|
|
|
|
|
value |
Object |
|
|
|
|
|
|
ease |
TimelineEase |
|
|
|
|
|
linearEase |
|
|
|
|
|
|
|
sineEase |
|
|
|
|
|
|
|
splineEase |
amount |
float |
|
|
|
must be in the range [0..1] |
|
timelineScenario |
|
|
|
|
|
|
|
parallelScenario |
|
|
|
|
|
|
|
sequenceScenario |
|
|
|
|
|
|
|
rendevouzScenario |
|
|
|
|
|
|
|
timelineScenarioCallback |
onDone |
Closure |
|
|
|
can be defined as a nested closure |
|
swingRepaintTimeline |
start |
boolean |
|
|
|
|
|
|
loop |
Timeline.RepeatBehavior |
|
|
|
alternative values are [true, "loop", "reverse"] |
|
|
target |
Object |
|
|
|
also can be set as the node's value |
|
|
zone |
Rectangle |
|
|
|
|
|
timelineRunnable |
|
|
|
|
|
|
|
Triggers |
|
|
|
|
|
|
|
Node |
Property |
Type |
Default |
Required |
Bindable |
Notes |
|
actionTrigger |
|
|
|
|
|
node value will be used as the event source |
|
focusTrigger |
event |
FocusTriggerEvent |
GAINED |
|
|
values can be literal too ['gained', 'lost'] |
|
|
autoReverse |
boolean |
false |
|
|
|
|
|
|
|
|
|
|
node value will be used as the event source |
|
mouseTrigger |
event |
MouseTriggerEvent |
CLICK |
|
|
values can be literal too ['enter', 'exit', 'press', 'release', 'click'] |
|
|
autoReverse |
boolean |
false |
|
|
|
|
|
|
|
|
|
|
node value will be used as the event source |
An additional synthetic property is available too:
- actionTriggerFor - its value must be a Timeline reference. This attribute makes the owner the source of the trigger event.
Exmaple:
Hovering the mouse over button 'One' will trigger the animation. Moving the mouse outside of the button's boundaries will reverse the animation. Clicking on the second button triggers the animation too.
Developers
Andres Almiray
Source Control
https://github.com/griffon/tridentbuilder
Building
TridentBuilder uses Gradle as its build tool.
Contributing
Please contact the Griffon team members by e-mail.
Mailing List(s)
http://griffon.codehaus.org/Mailing+Lists