Diagram size seems ignored [message #719374] |
Fri, 26 August 2011 16:52  |
Eclipse User |
|
|
|
The Diagram size, which is harcoded in the PeServiceImpl.createDiagram() method at 1000x1000, can be change afterwards, say diagram.getGraphicsAlgorithm().setWidth(400);
This value is correctly assigned and saved, but seems ignored by the editor, both regarding the painted background color/grid and the objects placement: actually, the available diagram size seems infinite (though, judging by the scroll bars behaviour, the editor seems to have some "active diagram" concept, the rectangle that covers all visible objects)
Should I fill a bug?
|
|
|
Re: Diagram size seems ignored [message #719851 is a reply to message #719374] |
Mon, 29 August 2011 04:20   |
Eclipse User |
|
|
|
Hm, the diagram is by default unrestricted in size, that's a general
assumtion throughout Graphiti. The bug would rather be that the attributes
exist at Diagram, but it was quite convenient to define Diagram as a
subclass of ContainerShape. So, maybe the dimensions of the diagram should
not be set at all and there should be some docu describing that.
What do you think?
Michael
"Hernan" schrieb im Newsbeitrag news:j390d9$d31$1@news.eclipse.org...
The Diagram size, which is harcoded in the PeServiceImpl.createDiagram()
method at 1000x1000, can be change afterwards, say
diagram.getGraphicsAlgorithm().setWidth(400);
This value is correctly assigned and saved, but seems ignored by the editor,
both regarding the painted background color/grid and the objects placement:
actually, the available diagram size seems infinite (though, judging by the
scroll bars behaviour, the editor seems to have some "active diagram"
concept, the rectangle that covers all visible objects)
Should I fill a bug?
|
|
|
|
Re: Diagram size seems ignored [message #720241 is a reply to message #719949] |
Tue, 30 August 2011 03:58  |
Eclipse User |
|
|
|
This is mainly a lower level concept provided by GEF called viewports. Of
course there are some extensions to this by Graphiti...
Michael
"Hernan" schrieb im Newsbeitrag news:j3g7gg$2g1$1@news.eclipse.org...
Well, I'm not sure. I had thought that the diagram was just another
rectangle, and I wanted to place (programatically) some
special objects near its borders - and give the user the ability to resize
the diagram. I think I'm ok with the concept of an unrestricted diagram
area - as long as it's documented somewhere.
Do you recall how the graphical editor knows when it needs to display scroll
bars? Has the diagram some (internal?) notion of "active rectangular area"
(occupied by objects), or it's a lower level (GEF, Draw2D) feature?
|
|
|
Powered by
FUDForum. Page generated in 0.07679 seconds