I am using Graph Editor in Jgraph and I have multiple arrows in my graph, like ARROW_DIAMOND, ARROW_OVAL and also some custom shaped arrows as well. Can I identify the arrow type when a new edge is drawn?

asked 11 Sep '12, 05:18

tdeshan's gravatar image

tdeshan
236
accept rate: 0%


In mxGraphView there's a method getEdgeStyle which is used to get the edge style.

You may also want to take a look at mxConstants.java, e. g.:

/**
 * Defines the key for the startArrow style.
 * Possible values are all constants in this
 * class that start with ARROW_.
 * See STYLE_ENDARROW.
 * This style is supported in the mxConnector shape.
 */
public static String STYLE_STARTARROW = "startArrow";

/**
 * Defines the key for the endArrow style.
 * Possible values are all constants in this
 * class that start with ARROW_. This style is
 * supported in the <code>mxConnector</code> shape.
 */
public static String STYLE_ENDARROW = "endArrow";
link

answered 11 Sep '12, 05:37

Lofi's gravatar image

Lofi
1.0k1221
accept rate: 37%

edited 11 Sep '12, 05:38

Thanks Lofi, this works!

(16 Sep '12, 23:41) tdeshan
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×100
×2

Asked: 11 Sep '12, 05:18

Seen: 944 times

Last updated: 16 Sep '12, 23:41