@ -0,0 +1,13 @@
Copyright (c) 2020, Máté Kukri
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@ -0,0 +1,35 @@
Java graph drawing library. It's purpose is to simplify building graphs out of Swing
GUI components. More edge style and automatic layouting support is planned.
Build using maven the usual way, or use the pre-compiled jars provided. Add the jar
as a dependency to your project and use the `SwingGraph` component to render graphs.
It's API consists of two main methods:
* Add a vertex to the panel
* @param v AWT or Swing component of the vertex
public void addVertex(Component v)
Use this for adding vertices two the graph, vertices can be any Swing component,
including JPanels with child components.
* Add an edge connecting v1 to v2
* @param v1 AWT or Swing component of the v1
* @param v2 AWT or Swing component of the v2
public void addEdge(Component v1, Component v2)
Use this to add a directed edge connecting v1 to v2. Non-directional edges are currently
Changing the starting size of vertices can be accomplished by calling `setPreferredSize`
on them before adding them to the graph. Similarly the starting position can be adjusted
An example application called `TestGui` is provided.
SwingGraph is released under the terms of the ISC license, check `license.txt` for more
@ -1,7 +1,5 @@