A library for creating and editing graph-like diagrams in JavaFX.

Overview

Graph Editor

A library for creating and editing graph-like diagrams in JavaFX.

This project is a fork of tesis-dynaware/graph-editor 1.3.1, which is no longer being maintained.

Features

  • Highly customizable
  • Add your own custom skins or restyle existing ones via CSS
  • Graphical effects where connections intersect:

Examples of how intersections look in the graph editor demo.

  • Full undo / redo functionality via EMF commands
  • Selection API with cut, copy, paste
  • Alignment (optionally with snap-to-grid)
  • Editing of large graphs via a panning mechanism & minimap
  • Additional skin examples provided:

Examples of skins provided with the graph editor demo.

Example of a fully customized implementation: Demo of a fully customized application.

Use it

Download the latest Release.

Try the tutorials here.

Demo

Requires Java 11, Git and Maven.

First clone the project:

git clone https://github.com/eckig/graph-editor.git
cd graph-editor
  1. Import into your favorite IDE
  2. Navigate to the demo modules main class GraphEditorDemo and launch it.

Thanks to

Comments
  • Create self-contained Demo Application

    Create self-contained Demo Application

    opened by eckig 14
  • How to add graph-editor as Maven dependency in pom.xml?

    How to add graph-editor as Maven dependency in pom.xml?

    Forgive my ignorance, but I've been butting my head against this for the past five hours. How do I add graph-editor as a dependency in my pom.xml?

    I've added the following to my <repositories>, is this right?

    <repository>
        <id>eckig-graph-editor</id>
        <url>https://maven.pkg.github.com/eckig/graph-editor/</url>
        <releases><enabled>true</enabled></releases>
        <snapshots><enabled>true</enabled></snapshots>
    </repository>
    

    I also have the following under <dependencies>

    <dependency>
        <groupId>fx.graph.editor</groupId>
        <artifactId>graph-editor</artifactId>
        <version>11.0.4</version>
    </dependency>
    <dependency>
        <groupId>fx.graph.editor</groupId>
        <artifactId>graph-editor-model</artifactId>
        <version>11.0.4</version>
    </dependency>
    <dependency>
        <groupId>fx.graph.editor</groupId>
        <artifactId>graph-editor-api</artifactId>
        <version>11.0.4</version>
    </dependency>
    <dependency>
        <groupId>fx.graph.editor</groupId>
        <artifactId>graph-editor-core</artifactId>
        <version>11.0.4</version>
    </dependency>
    

    Maven is complaining that the dependencies cannot be found, and that I can't download from the repo because I need authentication... what documentation there is about setting up this authentication I haven't been able to get working.

    I've also noticed that the links under the Packages pane for this project are in the form of https://github.com/eckig/graph-editor/packages/145128, which I've never seen before.

    This is all super confusing. What do I add to pom.xml to make this work?

    question 
    opened by mediumrarez 8
  • Dragging a selection box goes out-of-bounds when graph container is larger than graph

    Dragging a selection box goes out-of-bounds when graph container is larger than graph

    Platform: Windows 10 x64 build 19041 graph-editor version: commit 70a8567 from repo latest as of 2020/12/14 Tested Java versions: Adopt OpenJDK 15 and Amazon Coretto 11

    Demo: https://streamable.com/d4hqeq Demo code: https://pastebin.com/5kpBNn7d

    Steps to reproduce:

    1. Instantiate a GModel, a GraphEditor, and a GraphEditorContainer. (Optional: enable minimap view)
    2. Resize the GraphEditorContainer so that it's larger than the GraphEditor
    3. Click and drag a selection box past the top-left boundaries of the graph
    4. Observe that the graph suddenly flickers to the right of the screen
    5. Observe that the minimap, if enabled, displays an impossible viewing rectangle--one that's out of the bounds of the graph itself

    This bug also occurs if you zoom out too far using the minimap.

    bug 
    opened by mediumrarez 5
  • There seems to be an OOM issue.

    There seems to be an OOM issue.

    After I start the demo program and load the same graph file many times, I find that the memory usage will continue to grow without any signs of recycling. And when I delete all nodes on the scene, it seems that the memory usage has not been reduced. Is there a memory overflow problem?

    opened by weixiaoRetour 4
  • Disable drag interactions with connections

    Disable drag interactions with connections

    Is there a way to programmatically block/disable the drag and drop interaction with connections (and joints)? I would like to leave the drag interaction with boxes, but I want to disable just the connections interactions (which I want to add only programmatically: see #42 ).

    feature_request 
    opened by danielemaddaluno 4
  • How to connect two default nodes programmatically

    How to connect two default nodes programmatically

    I didn't manage to connect two simple nodes together programmatically. In the demo it is done with the tree skin, but what if I just want to do it with the default skin? I would add this to the wiki documentation too if possible.

    question 
    opened by danielemaddaluno 4
  • How to package the project?

    How to package the project?

    I used the 'mvn package' command to package the project, and then run the generated 'graph-editor-demo-17.0.0-jar-with-dependencies.jar' file, the program can be started normally, but the node cannot be added , check the exception information, and find that the error occurs in the "org.eclipse.emf.*" package. I suspect that my packaging method is incorrect. I would like to ask how to correctly package the project into an executable program?

    opened by weixiaoRetour 3
  • How do I automatically position the joints in a connection?

    How do I automatically position the joints in a connection?

    My graph is a left-to-right flowchart style digraph, and I am trying to get my joints to automatically lay themselves out whenever the nodes are moved. What is the recommended approach?


    Overriding GNodeSkin::layoutConnectors() seems like the way to go, but I've had trouble getting it to work; there seems to be no way to derive the position of a connector relative to the entire graph from either a GConnection object or a GJoint object. What am I doing wrong?

    question 
    opened by mediumrarez 3
  • Bump maven-javadoc-plugin from 3.2.0 to 3.3.1

    Bump maven-javadoc-plugin from 3.2.0 to 3.3.1

    Bumps maven-javadoc-plugin from 3.2.0 to 3.3.1.

    Commits
    • 2d22cca [maven-release-plugin] prepare release maven-javadoc-plugin-3.3.1
    • 7b7813e [MJAVADOC-450] Artifacts with a classifier are ignored when looking for resou...
    • 0d0e0cc [MJAVADOC-618] Goal javadoc:aggregate fails with submodules packaged as war
    • a2acaa2 [MJAVADOC-137] transform verify script from bsh to groovy
    • 16ca119 Clean up slf4j-simple
    • 87dbfb2 [MJAVADOC-677] Using "requires static transitive" makes javadoc goal fail
    • d770460 [MJAVADOC-680] JDK 16+: Error fetching link: ...\target\javadoc-bundle-option...
    • 292ebb7 Bump slf4j-simple from 1.7.30 to 1.7.32
    • fe6d738 Bump mockito-core from 3.9.0 to 3.12.0
    • d2dd532 [MJAVADOC-679] "Unable to compute stale date" in a directory with accent char...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump org.eclipse.emf.common from 2.22.0 to 2.23.0

    Bump org.eclipse.emf.common from 2.22.0 to 2.23.0

    Bumps org.eclipse.emf.common from 2.22.0 to 2.23.0.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • How do I attach arbitrary data to a GNode?

    How do I attach arbitrary data to a GNode?

    Lets say that I have some extra data that I want to display in my custom GNodeSkin. From what I understand of the wiki page, this would be done by creating a new EMF model, and then creating a new EClass with the extra attributes needed. Whenever a new node of that extended type is needed, both a GNode and a MyExtendedGNode are instantiated, with the same ID, and both are added to the GModel.

    But then how does the custom GNodeSkin get access to the MyExtendedGNode instance? Do I use the GNode to look up the MyExtendedGNode instance? Where do I do this? Do I do this in the skin factory? Is there a function I can call such as getMyExtendedGNodeById(String id), or do I manually keep a Map<String, MyExtendedGNode> that acts as an index for the extra attributes? I'm confused. What is the recommended approach? (Or am I going about this entirely the wrong way?)

    question 
    opened by mediumrarez 2
Releases(v19.0.0)
Owner
Steffen
Steffen
A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.

⚡ A powerful & easy to use chart library for Android ⚡ Charts is the iOS version of this library Table of Contents Quick Start Gradle Maven Documentat

Philipp Jahoda 36k Jan 9, 2023
A Java framework for creating sophisticated calendar views (JavaFX 8, 9, 10, and 11)

CalendarFX A Java framework for creating sophisticated calendar views based on JavaFX. A detailed developer manual can be found online: CalendarFX 8 D

DLSC Software & Consulting GmbH 660 Jan 6, 2023
A framework for easily creating forms for a JavaFX UI.

FormsFX Forms for business application made easy. Creating forms in Java has never been this easy! Maven To use this framework as part of your Maven b

DLSC Software & Consulting GmbH 534 Dec 30, 2022
Generate all call graph for Java Code.

README-en.md 1. 前言 在很多场景下,如果能够生成Java代码中方法之间的调用链,是很有帮助的。 IDEA提供了显示调用指定Java方法向上的完整调用链的功能,可以通过“Navigate -> Call Hierarchy”菜单(快捷键:Ctrl+Alt+H)使用;Eclipse也提供

null 226 Jan 6, 2023
Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE 8 and provides the functionalities to use and handle easily Tiles in your JavaFX application.

Lib-Tile Intention Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE and provides the functionalities to use and handle easily Tile

Peter Rogge 13 Apr 13, 2022
CSS keyframe animation for JavaFX. Create animations like you would do with CSS.

JFXAnimation CSS keyframe animation for JavaFX. If you are using JFoenix JFXAnimation is included (currently version 1.0.0 only) Requirements JDK 8 an

Marcel Schlegel 49 Dec 28, 2022
Tetromino is a Tetris-like game written in Java with JavaFX.

Tetromino Link to original project in university's GitLab Tetromino is a Tetris-like game written in Java with JavaFX made by Jonas and myself during

Tobias Helmrich 2 Dec 13, 2021
DataFX - is a JavaFX frameworks that provides additional features to create MVC based applications in JavaFX by providing routing and a context for CDI.

What you’ve stumbled upon here is a project that intends to make retrieving, massaging, populating, viewing, and editing data in JavaFX UI controls ea

Guigarage 110 Dec 29, 2022
Tray Icon implementation for JavaFX applications. Say goodbye to using AWT's SystemTray icon, instead use a JavaFX Tray Icon.

FXTrayIcon Library intended for use in JavaFX applications that makes adding a System Tray icon easier. The FXTrayIcon class handles all the messy AWT

Dustin Redmond 248 Dec 30, 2022
A framework for easily creating a UI for application settings / preferences.

PreferencesFX Preference dialogs for business applications made easy. Creating preference dialogs in Java has never been this easy! Table of Contents

DLSC Software & Consulting GmbH 545 Dec 22, 2022
Tool for creating custom GUIs using packets.

Tool for creating custom GUIs using packets.

Geo3gamer 0 Feb 14, 2022
Android Resource Manager application to manage and analysis your app resources with many features like image resize, Color, Dimens and code Analysis

AndroidResourceManager Cross-Platform tools to manage your resources as an Android Developer, AndroidResourceManager - ARM provide five main services

Amr Hesham 26 Nov 16, 2022
A JavaFX 3D Visualization and Component Library

FXyz3D FXyz3D Core: FXyz3D Client: FXyz3D Importers: A JavaFX 3D Visualization and Component Library How to build The project is managed by gradle. To

null 16 Aug 23, 2020
Flow Visualization Library for JavaFX and VRL-Studio

VWorkflows Interactive flow/graph visualization for building domain specific visual programming environments. Provides UI bindings for JavaFX. See htt

Michael Hoffer 274 Dec 29, 2022
SynchronizeFX - a library for JavaFX 2 and later that enables property bindings between different JVMs

SynchronizeFX - a library for JavaFX 2 and later that enables property bindings between different JVMs, both on a local computer and over the network.

Manuel Mauky 8 Jul 24, 2020
A library of +70 ready-to-use animations for JavaFX

AnimateFX A library of ready-to-use animations for JavaFX Features: Custom animations Custom interpolators Play/Stop animation Play an animation after

Loïc Sculier 366 Jan 5, 2023
A JavaFX library that allows Java2D code (Graphics2D) to be used to draw to a Canvas node.

FXGraphics2D Version 2.1, 3 October 2020. Overview FXGraphics2D is a free implementation of Java's Graphics2D API that targets the JavaFX Canvas. It m

David Gilbert 184 Dec 31, 2022
A library for JavaFX that gives you the ability to show progress on the Windows taskbar.

A clean and easy way to implement this amazing native Windows taskbar-progressbar functionality in javaFX Background Since Windows 7 there is a taskba

Daniel Gyoerffy 77 Nov 28, 2022
Provides a Java API to use the JavaScript library d3.js with the JavaFx WebView

javafx-d3 Provides a Java API for using the JavaScript library d3.js with JavaFx Applications. Many thanks to the authors of the projects gwt-d3 [1] a

null 98 Dec 19, 2022