1. Introduction

2. Configuration

The plugin delivers artifacts for Swing only. It also contains Groovy enhancements that can be used in combination with Swing DSL: SwingBuilder.

2.1. Gradle

You have two options for configuring this plugin: automatic and manual.

2.1.1. Automatic

As long as the project has the org.codehaus.griffon.griffon plugin applied to it you may include the following snippet in build.gradle

dependencies {
    griffon 'org.codehaus.griffon.plugins:griffon-trident-plugin:1.0.1'
}

The griffon plugin will take care of the rest given its configuration.

2.1.2. Manual

You will need to configure any of the following blocks depending on your setup

Java
dependencies {
    compile 'org.codehaus.griffon.plugins:griffon-trident-swing:1.0.1'
}
Groovy
dependencies {
    compile 'org.codehaus.griffon.plugins:griffon-trident-swing-groovy:1.0.1'
}

2.2. Maven

First configure the griffon-trident-plugin BOM in your POM file, by placing the following snippet before the <build> element

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.griffon.plugins</groupId>
            <artifactId>griffon-trident-plugin</artifactId>
            <version>1.0.1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Next configure dependencies as required by your particular setup

Java
<dependency>
    <groupId>org.codehaus.griffon.plugins</groupId>
    <artifactId>griffon-trident-swing</artifactId>
</dependency>
Groovy
<dependency>
    <groupId>org.codehaus.griffon.plugins</groupId>
    <artifactId>griffon-trident-swing-groovy</artifactId>
</dependency>

3. Modules

The following sections display all bindings per module. Use this information to successfully override a binding on your own modules or to troubleshoot a module binding if the wrong type has been applied by the Griffon runtime.

3.1. Swing

Module name: trident-swing-groovy

Depends on: swing-groovy

bind(BuilderCustomizer.class)
    .to(TridentSwingBuilderCustomizer.class)
    .asSingleton();

3.1.1. Nodes

The following nodes will become available on a Groovy View

Name Type

timeline

Timeline

timelineCallback

TimelineCallback

uiThreadTimelineCallback

UIThreadTimelineCallback

interpolatedProperty

InterpolatedProperty

keyFrames

KeyFrames

keyFrame

KeyFrame

linearEase

Ease

sineEase

Ease

splineEase

SplineEase

timelineScenario

TimelineScenario

parallelScenario

TimelineScenario.Parallel

sequenceScenario

TimelineScenario.Sequence

rendevouzScenario

TimelineScenarioRendezvousSequence

timelineScenarioCallback

TimelineScenarioCallback

swingRepaintTimeline

SwingRepaintTimeline

timelineRunnable

TimelineRunnable

actionTrigger

ActionTrigger

mouseTrigger

MouseTrigger

focusTrigger

FocusTrigger

Table 1. focusTrigger
Property Type Required Bindable Default

autoReverse

boolean

no

no

false

event

FocusTriggerEvent

no

no

FocusTriggerEvent.GAINED

Table 2. keyFrame
Property Type Required Bindable Default

offset

float

no

no

0f

ease

TimeLineEase

no

no

Linear

value

Object

yes

no

Table 3. keyFrames
Property Type Required Bindable Default

interpolator

PropertyInterpolator

yes

no

Table 4. mouseTrigger
Property Type Required Bindable Default

autoReverse

boolean

no

no

false

event

MouseTriggerEvent

no

no

MouseTriggerEvent.CLICK

Table 5. splineEase
Property Type Required Bindable Default

amount

float

yes

no

Table 6. swingRepaintTimeline
Property Type Required Bindable Default

target

Component

yes

no

Table 7. timeline
Property Type Required Bindable Default

start

boolean

yes

no

loop

boolean

yes

no

reverse

boolean

yes

no

skip

long

no

no

0

count

int

no

no

-1