Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic how to fix size (Read 3709 times)
superNova
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Aug 5th, 2011
how to fix size
Nov 5th, 2011 at 11:40am
Print Post  
I am creating three nodes and one by one , each of them are attaching in other. The problem is all these nodes are present or displayed  at Diagram's object. but size of Diagram's object  is not getting fix. Even i tried setsize option for DiagramView's object therefore extra large space are adding on view.
Diagrams' object - DiagramView's Object - Scrpane object

I tried to set size for all Object.
could u please guide me .
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to fix size
Reply #1 - Nov 7th, 2011 at 7:00am
Print Post  
I couldn't understand what you need exactly. If you must set a specific diagram size, call the setBounds method. The size should be specified in your current MeasureUnit units. If you need to make the diagram big enough to contain all nodes, call the resizeToFitItems method. If you want the DiagramView to be just as big as the Diagram, call its docToDevice method to find the corresponding size in pixels.

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


I love YaBB 1G - SP1!

Posts: 23
Joined: Aug 5th, 2011
Re: how to fix size
Reply #2 - Nov 10th, 2011 at 6:34am
Print Post  
i tried fittoresize option in Diagram's object but still size is not gettin fix. Actully  I create a Parent Node then i created child node and i attached this on parent node.But where the parent node is  getting fix so this is Diagram's object . So i m talking about this background and the problem is parent & child nodes's size  are fixing quite perfect but where the parent node has generated so this background ( usually where i can see text "Jdiagram trial version " ) has extra large space in horizontal or vertical area. i fixed size of jscrolpane and all those object but didnt get solution please help ..

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to fix size
Reply #3 - Nov 10th, 2011 at 8:37am
Print Post  
I'm afraid I still cannot understand you. If you need the node borders to lie exactly at the edge of the diagram after calling resizeToFitItems, note that this method leaves some space for selection handles, so you might have to set their size temporarily to 0:

diagram.setAdjustmentHandlesSize(0);
diagram.resizeToFitItems(0);
diagram.setAdjustmentHandlesSize(2);

If you have a different problem, perhaps you should email a sample project that demonstrates it to support@mindfusion.eu.

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