Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Side effects caused by setPen?? (Read 2512 times)
RickSalut
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Location: CANADA
Joined: Dec 10th, 2014
Side effects caused by setPen??
Dec 10th, 2014 at 7:06pm
Print Post  
Hi,
I'm quite new to jDiagram and I'm experiencing an issue that I cannot find any information on this website so I'm trying the forum.

When I programmatically change the Pen attributes (color, width, etc...) of a ShapeNode, it sometimes (not always) changes the Pen of the attached links as well.

Do any of you guys have had the same problem before?

Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Side effects caused by setPen??
Reply #1 - Dec 10th, 2014 at 8:02pm
Print Post  
Hi,

Are you assigning a new Pen instance to the node? setPen does not clone its argument, so I imagine you might see similar problems if you use some shared / static Pen object, change its attributes and assign it to nodes and links. Then you'd end up with items drawing themselves with same pen.

If it's a different problem, please attach a test Java class demonstrating it.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint