Skip to content

Commit

Permalink
Release 1.1.0.
Browse files Browse the repository at this point in the history
 * Fixes for method execution
 * Made modular
 * Moved some classes into their own file
 * New theme (JMetro)
 * Dependency and JRE update
  • Loading branch information
brett-smith committed Oct 7, 2023
1 parent 4f34585 commit 25e6b61
Show file tree
Hide file tree
Showing 28 changed files with 1,695 additions and 1,486 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ A cross-platform, JavaFX based clone of [D-Feet](https://wiki.gnome.org/Apps/DFe

Installers are provided for Linux, Windows and Mac OS. Download and run the GUI installers appropriate for your desktop.

* [Linux Installer](https://github.com/bithatch/dj-feet/releases/download/1.0.3/dj-feet_unix_1_0_3.sh)
* [Mac OS Installer](https://github.com/bithatch/dj-feet/releases/download/1.0.3/dj-feet_macos_1_0_3.dmg)
* [Windows Installer](https://github.com/bithatch/dj-feet/releases/download/1.0.3/dj-feet_windows-x64_1_0_3.exe)
* [Linux Installer](https://github.com/bithatch/dj-feet/releases/download/1.1.0/dj-feet_unix_1_0_3.sh)
* [Mac OS Installer](https://github.com/bithatch/dj-feet/releases/download/1.1.0/dj-feet_macos_1_0_3.dmg)
* [Windows Installer](https://github.com/bithatch/dj-feet/releases/download/1.1.0/dj-feet_windows-x64_1_0_3.exe)

### Run From Source

Expand All @@ -34,6 +34,8 @@ What is available when you start the application will depend on the operating sy

Other features include :-

* Export existing DBus services as Java code (uses dbus-java's code generator)

* Filter bus names by typing in the search box at the top-left of the user interface.

* Select a bus in the left hand pane to view the available objects exported on that base.
Expand Down Expand Up @@ -61,7 +63,15 @@ With the installers, also included are easy launchers for all of the [dbus-java-

## Changes

### 1.0.3
### 1.1.0

* Use (in development) dbus-java-5.0.0.
* Now uses JPMS
* Improvements to export. Option to use `@DBusBoundProperty`, Disable Filter and set alternative package name (now in upstream)
* Now uses [JMetro](https://www.pixelduke.com/java-javafx-theme-jmetro/) as skin. Looks more at home on Windows.
* Several fixes for method executing, now supports `new variant(<val>[,'<sig>'])`. See [#2](https://github.com/bithatch/dj-feet/issues/2)

### 1.1.0

* Use official release of dbus-java-4.0.0.

Expand Down
471 changes: 300 additions & 171 deletions pom.xml

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions scenicView.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ScenicView properties
#Sat Oct 07 23:07:07 BST 2023
stageWidth=1023.0
showBaseline=false
ignoreMouseTransparentNodes=true
splitPaneDividerPosition=0.4530791788856305
showNodesIdInTree=false
showDefaultProperties=true
showCSSProperties=true
collapseControls=true
showSearchBar=true
showFilteredNodesInTree=true
autoRefreshStyleSheets=true
showBounds=true
collapseContainerControls=false
automaticScenegraphStructureRefreshing=true
registerShortcuts=true
stageHeight=777.0
showInvisibleNodes=false
104 changes: 59 additions & 45 deletions src/main/installer/dj-feet.install4j
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<install4j version="9.0.5" transformSequenceNumber="9">
<install4j version="10.0.6" transformSequenceNumber="10">
<directoryPresets config="../../../target/dj-feet-0.0.1-SNAPSHOT.jar" />
<application name="DJ Feet" applicationId="9111-8436-8395-1844" mediaDir="media" shortName="dj-feet" publisher="Bithatch" publisherWeb="https://bithatch.co.uk" version="4.0.0-SNAPSHOT" allPathsRelative="true" macVolumeId="865270be2028a846">
<jreBundles jdkProviderId="AdoptOpenJDK" release="17/jdk-17+35" />
<application name="DJ Feet" applicationId="9111-8436-8395-1844" mediaDir="media" shortName="dj-feet" publisher="Bithatch" publisherWeb="https://bithatch.co.uk" version="5.0.0-SNAPSHOT" allPathsRelative="true" macVolumeId="865270be2028a846" javaMinVersion="17">
<jreBundles jdkProviderId="AdoptOpenJDK" release="20/jdk-20.0.2+9" />
</application>
<files>
<mountPoints>
Expand Down Expand Up @@ -50,11 +50,13 @@ NOTE: This daemon is INSECURE. It is running on an open TCP port, and the full a
<executable name="dbus-java-list" iconSet="true" redirectStderr="false" executableMode="console" />
<java mainClass="org.freedesktop.dbus.utils.bin.ListDBus">
<classPath>
<archive location="lib/dbus-java-transport-tcp-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-1.7.30.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-tcp-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-2.0.9.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/jul-to-slf4j-2.0.9.jar" failOnError="false" />
<archive location="lib/slf4j-simple-2.0.9.jar" failOnError="false" />
</classPath>
</java>
<iconImageFiles>
Expand All @@ -65,27 +67,31 @@ NOTE: This daemon is INSECURE. It is running on an open TCP port, and the full a
<executable name="dbus-java-daemonc" iconSet="true" redirectStderr="false" executableMode="console" />
<java mainClass="org.freedesktop.dbus.bin.DBusDaemon">
<classPath>
<archive location="lib/dbus-java-transport-tcp-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-1.7.30.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-tcp-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-2.0.9.jar" failOnError="false" />
<archive location="lib/dj-feet-${compiler:sys.version}.jar" failOnError="false" />
<archive location="lib/slf4j-simple-2.0.9.jar" failOnError="false" />
<archive location="lib/jul-to-slf4j-2.0.9.jar" failOnError="false" />
</classPath>
</java>
<iconImageFiles>
<file path="./bus.png" />
</iconImageFiles>
</launcher>
<launcher name="dbus-java-viewer" id="35">
<executable name="dbus-java-viewer" iconSet="true" executableMode="gui" />
<executable name="dbus-java-viewer" iconSet="true" stderrFile="~/.dj-feet/dbus-java-viewer/error.log" redirectStdout="true" stdoutFile="~/.dj-feet/dbus-java-viewer/error.log" executableMode="gui" />
<java mainClass="org.freedesktop.dbus.viewer.DBusViewer">
<classPath>
<archive location="lib/dbus-java-transport-tcp-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-1.7.30.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-tcp-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-2.0.9.jar" failOnError="false" />
<archive location="lib/slf4j-simple-2.0.9.jar" failOnError="false" />
<archive location="lib/jul-to-slf4j-2.0.9.jar" failOnError="false" />
</classPath>
</java>
<iconImageFiles>
Expand All @@ -96,11 +102,11 @@ NOTE: This daemon is INSECURE. It is running on an open TCP port, and the full a
<executable name="dbus-java-interface-code-generator" iconSet="true" redirectStderr="false" executableMode="console" />
<java mainClass="org.freedesktop.dbus.utils.generator.InterfaceCodeGenerator">
<classPath>
<archive location="lib/dbus-java-transport-tcp-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-1.7.30.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-tcp-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-2.0.9.jar" failOnError="false" />
</classPath>
</java>
<iconImageFiles>
Expand All @@ -111,11 +117,13 @@ NOTE: This daemon is INSECURE. It is running on an open TCP port, and the full a
<executable name="dbus-java-caller" iconSet="true" redirectStderr="false" executableMode="console" />
<java mainClass="org.freedesktop.dbus.utils.bin.Caller">
<classPath>
<archive location="lib/dbus-java-transport-tcp-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-1.7.30.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-tcp-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-2.0.9.jar" failOnError="false" />
<archive location="lib/slf4j-simple-2.0.9.jar" failOnError="false" />
<archive location="lib/jul-to-slf4j-2.0.9.jar" failOnError="false" />
</classPath>
</java>
<iconImageFiles>
Expand All @@ -126,11 +134,13 @@ NOTE: This daemon is INSECURE. It is running on an open TCP port, and the full a
<executable name="dbus-java-create-interface" iconSet="true" redirectStderr="false" executableMode="console" />
<java mainClass="org.freedesktop.dbus.utils.bin.CreateInterface">
<classPath>
<archive location="lib/dbus-java-transport-tcp-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-1.7.30.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-tcp-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-2.0.9.jar" failOnError="false" />
<archive location="lib/slf4j-simple-2.0.9.jar" failOnError="false" />
<archive location="lib/jul-to-slf4j-2.0.9.jar" failOnError="false" />
</classPath>
</java>
<iconImageFiles>
Expand All @@ -141,11 +151,13 @@ NOTE: This daemon is INSECURE. It is running on an open TCP port, and the full a
<executable name="dbus-java-type-string-to-java" iconSet="true" redirectStderr="false" executableMode="console" />
<java mainClass="org.freedesktop.dbus.utils.translator.DBusTypeStringToJava">
<classPath>
<archive location="lib/dbus-java-transport-tcp-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-1.7.30.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-tcp-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-2.0.9.jar" failOnError="false" />
<archive location="lib/slf4j-simple-2.0.9.jar" failOnError="false" />
<archive location="lib/jul-to-slf4j-2.0.9.jar" failOnError="false" />
</classPath>
</java>
<iconImageFiles>
Expand All @@ -170,12 +182,14 @@ NOTE: This daemon is INSECURE. It is running on an open TCP port, and the full a
<executable name="dbus-java-daemon" iconSet="true" stderrFile="daemon-error.log" redirectStdout="true" stdoutFile="daemon-output.log" executableMode="service" />
<java mainClass="uk.co.bithatch.djfeet.DBusDaemon" arguments="--addresspref default --addressfile ${installer:sys.tempDir}/dbus-java.address --insecure --tcp --authmode AUTH_ANONYMOUS">
<classPath>
<archive location="lib/dbus-java-transport-tcp-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-4.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-1.7.30.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-tcp-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-utils-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-core-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/dbus-java-transport-native-unixsocket-5.0.0-SNAPSHOT.jar" failOnError="false" />
<archive location="lib/slf4j-api-2.0.9.jar" failOnError="false" />
<archive location="lib/dj-feet-${compiler:sys.version}.jar" failOnError="false" />
<archive location="lib/slf4j-simple-2.0.9.jar" failOnError="false" />
<archive location="lib/jul-to-slf4j-2.0.9.jar" failOnError="false" />
</classPath>
</java>
<iconImageFiles>
Expand Down Expand Up @@ -657,7 +671,7 @@ return console.askYesNo(message, true);
</styles>
</installerGui>
<mediaSets>
<windows name="Windows" id="25">
<windows name="Windows" id="25" architecture="64">
<exclude>
<entry location="lib/linux" />
<entry location="lib/mac" />
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
open module uk.co.bithatch.djfeet {
requires com.miglayout.javafx;
requires javafx.controls;
requires com.miglayout.core;
requires org.freedesktop.dbus;
requires org.jsoup;
requires org.kordamp.ikonli.fontawesome;
requires org.kordamp.ikonli.javafx;
requires java.prefs;
requires spring.expression;
requires spring.core;
requires org.freedesktop.dbus.utils;
requires javafx.graphics;
requires org.jfxtras.styles.jmetro;
requires static org.scenicview.scenicview;
requires jul.to.slf4j;

}
101 changes: 101 additions & 0 deletions src/main/java/uk/co/bithatch/djfeet/AbstractPane.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
package uk.co.bithatch.djfeet;

import net.miginfocom.layout.AC;
import net.miginfocom.layout.LC;
import org.tbee.javafx.scene.layout.MigPane;

import javafx.scene.control.ButtonBar.ButtonData;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
import javafx.scene.control.Label;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

public abstract class AbstractPane extends MigPane {

private final String applyText;
private final String title;
private final Stage stage;

protected Dialog<Boolean> dialog;

public AbstractPane(Stage stage, String title, String applyText) {
super();
this.applyText = applyText;
this.title = title;
this.stage = stage;
}

public AbstractPane(Stage stage, String title, String applyText, LC layoutConstraints, AC colConstraints, AC rowConstraints) {
super(layoutConstraints, colConstraints, rowConstraints);
this.applyText = applyText;
this.title = title;
this.stage = stage;
}

public AbstractPane(Stage stage, String title, String applyText, LC layoutConstraints, AC colConstraints) {
super(layoutConstraints, colConstraints);
this.applyText = applyText;
this.title = title;
this.stage = stage;
}

public AbstractPane(Stage stage, String title, String applyText, LC layoutConstraints) {
super(layoutConstraints);
this.applyText = applyText;
this.title = title;
this.stage = stage;
}

public AbstractPane(Stage stage, String title, String applyText, String layoutConstraints, String colConstraints, String rowConstraints) {
super(layoutConstraints, colConstraints, rowConstraints);
this.applyText = applyText;
this.title = title;
this.stage = stage;
}

public AbstractPane(Stage stage, String title, String applyText, String layoutConstraints, String colConstraints) {
super(layoutConstraints, colConstraints);
this.applyText = applyText;
this.title = title;
this.stage = stage;
}

public AbstractPane(Stage stage, String title, String applyText, String layoutConstraints) {
super(layoutConstraints);
this.applyText = applyText;
this.title = title;
this.stage = stage;
}

public void show() {
dialog = new Dialog<>();
dialog.initOwner(stage);
dialog.initStyle(StageStyle.UTILITY);
ButtonType loginButtonType = new ButtonType(applyText, ButtonData.APPLY);
dialog.setResultConverter(b -> {
if (b == loginButtonType) {
return execute();
} else
return Boolean.FALSE;
});
dialog.setOnCloseRequest(e -> {
if (dialog.getResult())
e.consume();
});
dialog.setTitle(title);

var pane = dialog.getDialogPane();
pane.getButtonTypes().addAll(loginButtonType, ButtonType.CLOSE);
DJFeetApp.decorateStylesheets(pane.getStylesheets());
pane.setContent(this);
dialog.show();
}

protected abstract boolean execute();

protected Label bold(Label label) {
label.getStyleClass().add("strong");
return label;
}
}
3 changes: 2 additions & 1 deletion src/main/java/uk/co/bithatch/djfeet/AnnotatbleData.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ protected static String typeName(Type type) {
return typeText;
}

protected static Text colorText(String text, Paint color) {
protected static Text colorText(String text, Color color) {
Text t = new Text(text);
t.setFill(color);
// t.setStyle("-fx-text-fill: #" + color.toString().substring(2) + " !important;");
return t;
}
}
Loading

0 comments on commit 25e6b61

Please sign in to comment.