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

jgraphx: hierarchical layout reduce distance between nodes

I'm using jgraphx to visualize a control low inside a method. Thus, i'm using the mxHierarchicalLayout. But in the result graph the distance between two nodes is too big. (see img) I want to reduce the yellow marked areas. Im adding nodes…
osanger
  • 2,276
  • 3
  • 28
  • 35
1
vote
0 answers

How to reposition non reliative multiple labels of edges in JGraphX

In a graph, I have edges that have more than one label (multi labels): one label is beside the source cell and another one beside the target cell. Both labels are created as child vertices of the edge. For correct positioning adjustement reasons,…
Ronan
  • 21
  • 3
1
vote
1 answer

How to get coordinates of a mxCell?

I need to get the coordinates (x,y) of a mxCell that i find by his Id, but when i call getGeometry() on it, it gives me null and after i get NullPointerException. private double getX(String node){ mxCell cell = (mxCell)…
Stefano Berti
  • 141
  • 1
  • 11
1
vote
1 answer

JGraphX: Reposition edge terminal on vertices

I've a graph with 18 vertices and lots of edges. Due to the number of elements involved and their structure the built-in algorithms available (i.e. mxHierarchicalLayout used for the shown image ) are not working as expected, causing the majority of…
Ugo Delle Donne
  • 183
  • 1
  • 6
1
vote
1 answer

Formatting JGraphX edges

I'm using the JGraphX mxCompactTreeLayout which by default gives me the layout as shown by (A) on the image below. I would like to know if it's possible to achieve what's shown by (B) with JGraphX. The reason for such requirement is that the graph…
ntombela
  • 1,357
  • 2
  • 19
  • 31
1
vote
1 answer

Jgraphx styles applied to circleLayout

I'm using JGraphX to draw a graph,using mxCircleLayout as basic representation, but I want to change some behavior. For example I want the EDGESTYLE_TOPTOBOTTOM, so before build mxGraphComponent I define a new edge style: ' JGraphXAdapter…
Fabrizio R.
  • 117
  • 1
  • 14
1
vote
1 answer

GetEdgeStyle return null JGraphX

I am creating different type of Edges by changing the DefaultEdgeStyle. Each style depends on the button clicked in the UI and the edges are being added by dragging from one vertex to another and not the insert edge method. My problem is that when I…
danivare
  • 91
  • 1
  • 1
  • 3
1
vote
1 answer

drag and drop a group of cells in jGraphX graph editor

I am using jGraphX for my application. In jgraphX graph editor program drag and drop of icon from editor palette, it inserts single cell to the graph component. eg. If I drag and dropped square icon it inserts square cell in graph But I need to…
lekshmi
  • 191
  • 1
  • 1
  • 6
1
vote
0 answers

Difference between 2 labelled graphs

Does there exist a pre-defined function in jgraphx or any other such Java based visualization library that takes-in 2 labelled graphs as input and outputs/highlights the set of nodes which differ between these 2 input graphs?
1
vote
1 answer

How can you answer a mouse event in jGraphx?

Using jGraphx, I've been able to build a simple diagram that reflects the arquitecture of a program. This graph is going to be read-only, i.e., the user can change the positions of the vertexes, but nothing else (BTW, I have set editable cells and…
Baltasarq
  • 12,014
  • 3
  • 38
  • 57
1
vote
1 answer

Vertex renderered as JComponent

I am currently trying to migrate a JGraph 5 application to JGraphX. I have vertex renderers implemented as nested JComponent with complex layout. Using the mxStylesheet is the only I found so far to customize the vertext rendering. Is there any…
1
vote
1 answer

Rotate an edge label in JgraphX

I have an edge which is vertical and I want to rotate the edge-label accordingly. For example replace the "helloworld.java" drawing part with: try { Object v1 = graph.insertVertex(parent, "1", "TopLeft", 20, 20, 80, 80); Object v3 =…
Nieke Aerts
  • 209
  • 2
  • 11
1
vote
1 answer

How to set design rules in JGraphX graph editor?

In my graph editor program i have created a blocks(mxcells) with input and output port, It looks like I want to set design rules as, While creating edge between ports. Out put port should connected to input port only. Input port should not…
Leks
  • 77
  • 11
1
vote
2 answers

How to create different edge style for specific cells in JGraphX?

In my graph I'm using "EntityRelation" edge style. In entity Relation Edge Style the edges comes out from left and right side of the mxcell only. Couldn't create top down edge using this edge style. I have set default edge style as "entity Relation…
Leks
  • 77
  • 11
1
vote
0 answers

How can I draw a graph using JGraphX without having to assign coordinates

import javax.swing.JFrame; import com.mxgraph.swing.mxGraphComponent; import com.mxgraph.view.mxGraph; import com.mxgraph.view.*; public class HelloWorldMX extends JFrame { private static…
span
  • 75
  • 6