Questions tagged [jgraphx]

JGraphX is an open source Java Swing Component. It is the architecture written after JGraph 5, but not named JGraph 6 because it is rewritten and the API is entirely different.

182 questions
1
vote
1 answer

Java 2d graphic library

Hi I am trying to create simple 2d graphic editor. I need some library which will create shape from given points(draw lines between these points) and then user can move this shape with mouse or scale this shape with mouse. I need points, because I…
Frees
  • 139
  • 1
  • 7
1
vote
0 answers

Draw n points polygon with jgraphX

I am trying to draw custom shape with jgraphx. I have few mxPoints and customcell. I want to be able not just draw rectangles or ellipses, but draw random n point polygon too. Is this possible? Here is code, which I use, but it doesn't work. It…
Frees
  • 139
  • 1
  • 7
1
vote
1 answer

How do I change the edge style between an mxCell and mxPoint in mxgraph?

I am trying to draw an edge with specific edge style, other than the default one. The problem is that I am drawing an edge between a cell and a point so that the edge appears as if coming from a cell to space in the graph. edge =…
user3062529
  • 87
  • 1
  • 8
1
vote
1 answer

Single ended edge in jGraph

I am trying to draw directed graphs using jGraph and Java, however I would like a single ended arrow to notate the starting node. The only thing I can think of that may be able to do this is to have a Node that has no use, but can be linked to the…
Matt
  • 1,471
  • 8
  • 20
  • 28
1
vote
1 answer

How can I draw with Graphics2D on the JGraphX graph?

How can I can draw with Graphics2D on the JGraphX graph? I tried something like this: mxGraphComponent graphComponent = ...; // ... Graphics2D g = (Graphics2D)graphComponent.getGraphics(); g.setColor(Color.BLACK); g.drawLine(0, 0, 500,…
tobi
  • 1,944
  • 6
  • 29
  • 48
1
vote
1 answer

Jgraphx out of memory - Java

I am trying to create an mxgraph and a image from the created mxgraph in JAVA. Below is the code to create the image from mxgraph. BufferedImage image = mxCellRenderer.createBufferedImage(graph, null, 1, Color.WHITE,…
AJJ
  • 3,570
  • 7
  • 43
  • 76
1
vote
0 answers

How to reference an object on JGraphX XML?

I'm getting a StackOverFlow exception when trying to save my JGraphX model as XML, because I have a circular reference on my mxCell value class (and yes, I need it). My question is: How can I make the JGraphX recognize the attribute responsible for…
1
vote
2 answers

How to add a mouselistener to a vertex - jgraphx

How can I add a mouselistener to a specific vertex in jgraphx? graphComponent.getGraphControl().addMouseListener(new MouseAdapter() { public void mouseReleased (MouseEvent e1) { I can use this fro graphcomponent but how can I…
user2598911
  • 379
  • 2
  • 6
  • 22
1
vote
0 answers

How can I create a a text box to appear when mouse moves over a vertex in jgraph?

I need to find a way so that when mouse moves over a vertex of the jgraph, a textbox to appear as overlay, different for every vertex. I have searched a lot in the web, but havent found anything good enouph. Any ideas how to achieve that? Thanks in…
user2598911
  • 379
  • 2
  • 6
  • 22
1
vote
1 answer

Groups break hierarchical layout in JGraphX

I find that if I introduce groups in to a simple graph laid out with hierarchical layout, the group is incorrectly positioned. For example, here is a simple graph: public class HierarchicalLayoutWithGrouping extends JFrame { public…
Ian Jones
  • 1,998
  • 1
  • 17
  • 17
1
vote
1 answer

How to change edge rooting style

I am using eclipse as editor and jgraphx v1.1. I am trying to change the edge style to sidetoside. For some reason I keep getting errors in setStyle. I have also tried edgeStyle[mxConstants.STYLE_EDGE] = mxEdgeStyle.SideToSide but still nothing. Any…
user2598911
  • 379
  • 2
  • 6
  • 22
1
vote
1 answer

mxHierarchicalLayout ignores isVertexMovable

in JGraphX the most layout algorithms don't move vertices which are not movable. Unfortunately mxHierarchicalLayout ignores, whether a vertex is movable or not. I found out, that this layout alogrithm dosen't use isVertexMovable at all. Where do I…
Andreas
  • 130
  • 2
  • 7
1
vote
1 answer

JGraph/JGraphX : Creating a very complex graph

I'm currently working on a software allowing the creation of gamebooks, and I'm trying to add a graph view. I create a graph where the vertices are the paragraphs and the edges the links between them. The gamebook I created has over 100 paragraphs,…
1
vote
1 answer

Jgraph in JavaFx

Is it possible to use jgraphx with JavaFx 2.0? I have tried using the below code, but i could not add the graph component to the JavaFx component. mxGraph graph = new mxGraph(); Object parent = graph.getDefaultParent(); …
AJJ
  • 3,570
  • 7
  • 43
  • 76
1
vote
0 answers

Selection only on visible part of a shape?

I would like to have the JGraphX editor to be able to select a shape only if the user click on a visible part of the shape instead of the full bounding box of a shape. For instance, if you insert a Triangle in a graph, I want to be able to select it…
Xavier M.
  • 136
  • 1
  • 7