Hi all. I need to get the existing style keys for a cell to check whether a style is given or not. Therefore I tried the following mxUtils method: getStylenames(String style). If I have a style like

I expected an array like [line,endArrow,strokeWidth,fontSize,strokeColor,fontColor,movable] but got [line]. Maybe I misunderstood the functionality of this method or is it a bug? I searched the mxUtils class for another solution to get the style-keys of a given cell but didn't found someone. By the way, I use jgraphx

asked 30 Jan '12, 22:41

Hardie82's gravatar image

accept rate: 7%

Stylenames are the parts of a style with no equal sign. To get the keys instead, you'll have to parse the string.


answered 31 Jan '12, 06:06

Gaudenz's gravatar image

accept rate: 39%

In the mxUtils class I found methods like isTrue(Map<String, Object> dict, String key) etc. This would be nice to get a value of a specific style element. But I miss a method to convert a style string of a cell to a map. I use version of jgraphx. Is there any method, that handle this? Otherwise it would be nice if it will be implement in a further version.


answered 27 Jul '12, 03:32

Hardie82's gravatar image

accept rate: 7%

Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: 30 Jan '12, 22:41

Seen: 2,184 times

Last updated: 27 Jul '12, 03:32