Library for Java
Features include
- data plotting API inspired by Mathematica:
ListPlot
,Spectrogram
, ... - reflection-based serialization to properties-files, and gui generation
- data structures
BoundedPriorityQueue
,DisjointSets
, ... - class discovery
3rd party dependencies are
FlatLaf
For non-final fields of type String
, Boolean
, Integer
, File
, Font
, Color
, LocalDate
, etc. of a class
public class MyConfig {
public String text = "abc";
public Boolean flag = false;
public File file = new File("/home/user/text.txt");
public Color color = Color.RED;
}
a dialog is auto-generated that allows the user to edit the values of the fields of an instance live.
The code that generates the dialog is shown below
MyConfig myConfig = new MyConfig();
PanelFieldsEditor panelFieldsEditor = new PanelFieldsEditor(myConfig);
panelFieldsEditor.addUniversalListener(() -> System.out.println("my config changed"));
JFrame jFrame = new JFrame();
jFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
jFrame.setContentPane(panelFieldsEditor.createJScrollPane());
jFrame.setBounds(100, 100, 320, 200);
jFrame.setVisible(true);
From time to time, a version is deployed and made available for maven integration. Specify repository
and dependency
of the bridge library in the pom.xml
file of your maven project:
<dependencies>
<!-- other dependencies -->
<dependency>
<groupId>ch.alpine</groupId>
<artifactId>bridge</artifactId>
<version>0.3.6</version>
</dependency>
</dependencies>
<repositories>
<!-- other repositories -->
<repository>
<id>bridge-mvn-repo</id>
<url>https://raw.github.com/datahaki/bridge/mvn-repo/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
For Java 11, for version
use 0.4.1-jdk-11
.
The source code is attached to every release.
The branch master
always contains the latest features for Java 17, and does not correspond to the most recent deployed version generally.