If I have a rectange with a long text label \ne. g.

\n

"abcdefg hijklmnop",\nis it possible to break the label if the rectangle is resized to a smaller size to

\n

abcdefg

\n

hijklmnop

\n

?

\n

Or do I have to do it on my own like in the labels.hml exmaple.

asked 16 Mar '11, 06:31

MasterG's gravatar image

MasterG
355
accept rate: 0%

edited 16 Mar '11, 07:30

David's gravatar image

David ♦♦
4.8k624


Check out the wrapping.html example.

link

answered 16 Mar '11, 06:35

Gaudenz's gravatar image

Gaudenz ♦♦
9.9k127
accept rate: 38%

But this is not possible in JGraphX? Only in the javascript library?

(22 Mar '11, 02:20) eisbaw

Use "whiteSpace=wrap" in Java.

(22 Mar '11, 02:23) Gaudenz ♦♦

Thx, Gaudenz. Just for reference: \nObject v1 = graph.insertVertex(parent, null, "Hello again", 20, 20, 80, 30, "strokeColor=red;fillColor=red;whiteSpace=wrap");

(22 Mar '11, 13:26) eisbaw
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:

×452
×64
×8
×1

Asked: 16 Mar '11, 06:31

Seen: 1,728 times

Last updated: 22 Mar '11, 13:26

powered by BitNami OSQA