Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic FlowChart.SetDefaultBox? (Read 3324 times)
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
FlowChart.SetDefaultBox?
Jun 6th, 2007 at 5:34am
Print Post  
Hi,

The Flowchart class (I am working currently in the applet domain) has a SetDefaultShape method.

It would have been nice if we had a similar method to set a default Box. Then, we could have our custom box for example PoolBox, which could encapsulate the behavior of a pool (whatever that is supposed to do).

The poolbox could also implement some custom interface of ours, and the contaner of the flowchart could assume this contract being implemented by the pool box.

The problem now is, the flowchart creates a Box class internally on the click, drag and leave action and this box cannot be later converted to a custom class instance. So, the defaultBox method was what I could think of to create custom boxes within the flowchart.

Would such a thing be possible?

Thanks,
Praveeen
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: FlowChart.SetDefaultBox?
Reply #1 - Jun 6th, 2007 at 6:40am
Print Post  
Hi Praveeen,

We are just releasing a similar feature with the Windows Forms version of the control, check the IconNodes.zip sample here:

http://mindfusion.org/cgi/Forum/YaBB.pl?board=fcnet_disc;action=display;num=1178...

I guess it will find its way into the Web Forms version in the following 2-3 months. Our developers are currently changing the NetDiagram project so that it uses the shared MindFusion.Diagramming.dll mentioned in the topic above. That will bring custom types support to the NetDiagram server control, along with support for all import/export components available in the WinForms version. We will port these changes to Java, and will need to change the XML format used to transfer the diagram between the client and the server so that custom types are supported too.

Until that's ready, you could handle the BoxCreated event and replace the box drawn by a user with an instance of your node class. However, the custom object will be replaced with a Box when the diagram is submitted to the server, since only the standard types are supported by the current diagram XML format.

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