https://github.com/cathive/fx-dconf
https://github.com/cathive/fx-dconf
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cathive/fx-dconf
- Owner: cathive
- Created: 2013-07-29T14:28:53.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-10-01T11:40:08.000Z (over 12 years ago)
- Last Synced: 2025-04-15T00:08:23.251Z (about 1 year ago)
- Language: Java
- Size: 188 KB
- Stars: 0
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
dconf integration for Java and JavaFX
=====================================
Introduction
------------
This library provides an easy way to integrate dconf into
your Java / JavaFX applications.
It uses the fx-glib GLib bindings
to map native java objects to GVariant pointers and vice versa.
Highlights
----------
* Native bindings to libdconf via BridJ (no need to install any native libraries)
* Nice object-oriented API
* Supported platforms: Linux, possibly others (untested)
Requirements
------------
* libdconf, libglib2,.... whatever is needed to interact with dconf
* Running D-Bus instance (the default dconf client interacts with libdconf via D-Bus)
* Oracle Java SE 7 Runtime (possibly OpenJDK 7 works, haven't tested)
Usually every modern Linux distribution should meet the first of the two requirements mentioned above.
Features
--------
Below you'll find a list of already existing features as well as features that are planned for
future releases:
- [x] Bindings to the C-API of dconf (libdconf) - about 95% done
- [x] Support for synchronous calls
- [ ] Support for asynchronous calls
- [ ] Nice JavaFX API using Workers, Services, Callbacks and Properties
- [x] java.util.prefs.Preferences implementation that uses dconf as it's backend - No listener support, otherwise usable
Example Usage
-------------
The Java code below shows how to play around with a few configuration keys.:
```java
// Obtains a new dconf client instance.
final org.gnome.dconf.Client dconfClient = org.gnome.dconf.Client.create();
// Use the client to write some config entries...
dconfClient.writeBoolean("/com/example/ExampleApp/exampleBoolean", true);
dconfClient.writeString("/com/example/ExampleApp/exampleString", "Hello, World!")
// Retrieve some config values...
final boolean exampleBoolean = dconfClient.readBoolean("/com/example/ExampleApp/exampleBoolean");
final String exampleString = dconfClient.readString("/com/example/ExampleApp/exampleString");
```
Bugs and Open Issues
--------------------
- Unless the fx-glib GLib bindings don't offer proper mapping of
GObject signal mapping it is not possible to provide the desired listener functionality to this library. :-(
- The example app that ships with this library (dconf Editor) is not feature-complete (yet)