Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Create new lanes (Read 15604 times)
PKS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Feb 2nd, 2008
Create new lanes
Feb 2nd, 2008 at 12:09pm
Print Post  
Hi,
How can i create new lanes in lane diagram?
Can you you give me sample code for that?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create new lanes
Reply #1 - Feb 3rd, 2008 at 7:20am
Print Post  
Hi,

The lanes in the Demo sample are implemented by means of locked background boxes. Adding a new lane would look like:

Box lane = fc.createBox(0, laneCount * laneHeight, fc.getDocBounds().getWidth(), laneHeight);
laneCount = laneCount + 1;
lane.setLocked(true);
lane.setZIndex(0);

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PKS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Feb 2nd, 2008
Re: Create new lanes
Reply #2 - Feb 6th, 2008 at 12:20pm
Print Post  
Hi,

  Thank you very much.
Now i can create the new Lanes. Actualy i would like to save this into .xml file, is it possible? Can you explain the process?

Thanks in advance. Smiley
Shanmugasundaram.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create new lanes
Reply #3 - Feb 6th, 2008 at 2:14pm
Print Post  
Hi,

Saving to XML looks like this

File file = new File("C:\\fc.xml");
XmlWriter xw = new XmlWriter(fc);
xw.write(file);

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PKS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Feb 2nd, 2008
Re: Create new lanes
Reply #4 - Feb 19th, 2008 at 8:13am
Print Post  
Thanks for your help.

Now i would like to create shapebox with lane diagram, and i would like to add the shaps to lanes from that shapebox. Are these two are in two applets or possible to have these in a single applet.

Can you explain this and how can i create the shape list box with array of list?

Thanks in advance. Smiley
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create new lanes
Reply #5 - Feb 19th, 2008 at 1:25pm
Print Post  
Hi,

The FlowChart and ShapeListBox applets are in the same .jar file, you can see them both loaded in this page:
http://www.mind-fusion.com/jdiagram/ShapeListBox.html

You could run the ShapeDesigner, delete the shapes you don't need and save the rest as a shape library. Then set the ShapeListBox' ShapeLibraryLocation PARAM value to the URL of your shape library file.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PKS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Feb 2nd, 2008
Re: Create new lanes
Reply #6 - Feb 19th, 2008 at 3:57pm
Print Post  
Hi,

Thanks for your reply.

I am having :
1.Lane diagram in one JScrollPane
2.Some rectangle boxes in another JScrollPane.

Here i would like to drag a shap from second JScrollPane and drop it into the Lane JScrollPane(first JScrollPane).

Can you give me the solution for this?
Also i need sample code.

Thanks in advance.  Smiley
Shanmugasundaram.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create new lanes
Reply #7 - Feb 19th, 2008 at 5:02pm
Print Post  
Hi,

Do you need to drag boxes from a FlowChart to another FlowChart?

Stoyan
  
Back to top
 
IP Logged
 
PKS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Feb 2nd, 2008
Re: Create new lanes
Reply #8 - Feb 19th, 2008 at 7:54pm
Print Post  
Hi,
Yes, i need to drag boxes from a FlowChart to another FlowChart.

Thanks in advance. Smiley
PKS.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create new lanes
Reply #9 - Feb 20th, 2008 at 2:24pm
Print Post  
Hi,

Our developer is going to create a drag-and-drop sample for you, and we'll post it here tomorrow.

Stoyan
  
Back to top
 
IP Logged
 
PKS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Feb 2nd, 2008
Re: Create new lanes
Reply #10 - Feb 20th, 2008 at 2:51pm
Print Post  
Hi,

Thanks for yor kind response. Wink

I am awaiting for your sample.

Regards,

PKS
« Last Edit: Feb 21st, 2008 at 6:54am by PKS »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create new lanes
Reply #11 - Feb 22nd, 2008 at 8:38am
Print Post  
Hi,

This sample shows how to implement drag-and-drop between two flowcharts:
https://mindfusion.org/_samples/jdragdrop.zip

Select and move a box from the left flowchart. This works as usual, but once the mouse leaves the visible area of the control, there is a drag-and-drop operation started from the ItemModifying event handler. Drop over the right-hand flowchart, and the sample creates a box with the same shape as the one you started dragging.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PKS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Feb 2nd, 2008
Re: Create new lanes
Reply #12 - Feb 24th, 2008 at 9:09pm
Print Post  
Hi,

Thanks a lot Smiley, It seems good and works fine.

I need one more help for the boxes inside the lane should move only horizontally. Can you give me details for this.

Thanks in advance.

Regards,
PKS.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Create new lanes
Reply #13 - Feb 25th, 2008 at 6:36am
Print Post  
Hi,

box.getConstraints().setMoveDirection(DirectionConstraint.Horizontal);

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
PKS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Feb 2nd, 2008
Re: Create new lanes
Reply #14 - Feb 28th, 2008 at 8:48am
Print Post  
Hi,
Thank you very much.
How can i get the box index or box id (only rectangle boxes) from the flowChart.

Regards,
PKS
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint