Skip to content

dooApp/FXBinding

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

FXBinding

The binding you need.

FXBinding allow you to create advanced JavaFX binding on complex model.

Let me show an example :

private StringBinding nameBinding = new FXStringBinding() {
        @Override
        protected void configure() {
            try {
                addObservable(aProperty);
                addObservable(aProperty.get().bProperty());
                addObservable(aProperty.get().bProperty().get().cProperty());
                addObservable(aProperty.get().bProperty().get().cProperty().get().stringProperty());
            } catch (NullPointerException ignored) {
            }
        }
        @Override
        protected String compute() {
            try {
                return aProperty.get().bProperty().get().cProperty().get().stringProperty().get();
            } catch (NullPointerException e) {
                return null;
            }
        }
    };

Every time the model is changing, we will reconfigure the binding to always get the value you want.

Maven

To add FXBinding to your project, add this on the pom.xml

<dependencies>
    <dependency>
        <groupId>com.dooapp</groupId>
        <artifactId>FXBinding</artifactId>
        <version>0.0.1</version>
    </dependency>
</dependencies>
<repositories>
    <repository>
        <id>fxbinding</id>
        <url>https://raw.github.com/dooApp/FXBinding/maven/</url>
        <name>fxbinding</name>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
     </repository>
</repositories>

Build Status

About

FXBinding

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages