Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problems using Custom Shape Library (Read 3761 times)
sutek99
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Jan 15th, 2008
Problems using Custom Shape Library
Jan 15th, 2008 at 2:57pm
Print Post  
Good Morning,

I'm evaluating NetDiagram for potential use in a development project and am running into issues getting custom shape libraries to work.

First of all, every time I try to load a library I get an error and the applet fails to load. I use this code to show the library:

MindFusion.setInnerHtml('jDialogShapeListApplet', '<applet id="ShapeListBoxId" name="ShapeListBoxId" code="com/mindfusion/jdiagram/ShapeListBoxApplet.class" archive="/JDiagram.jar" width="200px" height="300px" mayscript=""><param name="AllowRename" value="false"><param name="AllowRemove" value="false"><param name="DefaultBoxSize" value="20 20"><param name="IconMargin" value="5 5"><param name="IconSize" value="32 32"><param name="ShapeFillColor" value="#ff00ffff"><param name="ShapeLibraryLocation" value="http://localhost:64701/Threats.shl"></applet>');

This works fine if I omit the ShapeLibraryLocation parameter (showing all shapes) but any time I use that parameter (even if the custom library is nothing but a copy of the default library) I get the following error in the Java console:


java.lang.NullPointerException

at com.mindfusion.jdiagram.Shape.a(Unknown Source)

at com.mindfusion.jdiagram.Box.O(Unknown Source)

at com.mindfusion.jdiagram.Box.setShape(Unknown Source)

at com.mindfusion.jdiagram.ShapeListBox.a(Unknown Source)

at com.mindfusion.jdiagram.ShapeListBox.addShapes(Unknown Source)

at com.mindfusion.jdiagram.ShapeListBox.setShapes(Unknown Source)

at com.mindfusion.jdiagram.ShapeListBoxApplet.init(Unknown Source)

at sun.applet.AppletPanel.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)


I've tried both the full URL to the .shl file and also a relative path and both show the same error.

My second issue is that I'm having problems changing the color of shapes in a library. I'd like to have a library with a couple different colored shapes and can't figure out if this is possible or how to do it.

Any help here would be appreciated.

-Jeff

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problems using Custom Shape Library
Reply #1 - Jan 15th, 2008 at 5:14pm
Print Post  
Good Morning,

Please email the shape library file to support@mindfusion.eu.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problems using Custom Shape Library
Reply #2 - Jan 15th, 2008 at 5:34pm
Print Post  
The file was filtered, please send it again zipped, and it might be better to rename it to something other than "threats" 8)

Symantec Mail Security replaced Threats.shl with this text message.  The original file contained a filtering violation and was quarantined.

ID:RMDEX1::SYQ17ac7a962

Thanks,
Stoyan

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problems using Custom Shape Library
Reply #3 - Jan 16th, 2008 at 7:31am
Print Post  
That problem happens because there is a RoundRectangleElement in one of the custom shape definitions in 'threats.shl'. We have recently added RoundRectangleElement to our Windows Forms control as a possible building block in shape definitions, but the latest NetDiagram version does not support it. Now this version should work fine:

https://mindfusion.org/_temp/RoundRect.zip

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint