Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Diagram size seems ignored
Diagram size seems ignored [message #719374] Fri, 26 August 2011 16:52 Go to next message
Hernan Gonzalez is currently offline Hernan Gonzalez
Messages: 180
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
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 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1577
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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 #719949 is a reply to message #719851] Mon, 29 August 2011 10:36 Go to previous messageGo to next message
Hernan Gonzalez is currently offline Hernan Gonzalez
Messages: 180
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
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?
Re: Diagram size seems ignored [message #720241 is a reply to message #719949] Tue, 30 August 2011 03:58 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1577
Registered: July 2009
Location: Walldorf, Germany
Senior Member
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?
Previous Topic:Installing graphiti together with the plugin
Next Topic:DiagrammEditor with XML Domain Model
Goto Forum:
  


Current Time: Wed Jul 30 17:27:18 EDT 2014

Powered by FUDForum. Page generated in 0.14303 seconds