Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Various grid-related questions
Various grid-related questions [message #60569] Sun, 08 October 2006 08:43 Go to next message
Eclipse UserFriend
Originally posted by: mail.volker-wegert.de

Hi,

I've got a few questions regarding the grid function of the generated editor:

- How can I determine the grid spacing from within my editor classes?

- Is it possible to set the grid spacing to a fixed value that can not be
changed by the user?

- Is it possible to use a non-quadratic grid?

- I've got some strange offsets when moving a rectangular part inside a
compartment, e. g. if I move the part to the top left corner of the
compartment, I get a position of (-5, -6) instead of (0, 0) - where do
these values come from? Furthermore, the part doesn't stay in the top left
corner but is moved a little down and right automatically - presumably to
enforce this offset? (Problem for is: The part is no longer aligned to the
grid now...)

Thanks in advance
Volker

--
* Volker Wegert * http://www.volker-wegert.de/contact *
* "Nicht die Zeit entwertet die Welt. Die Eile ist es." (Peter Kafka)
*
*
Re: Various grid-related questions [message #60590 is a reply to message #60569] Mon, 09 October 2006 07:51 Go to previous messageGo to next message
Eclipse UserFriend
Take a look at DiagramRootEditPart#setGridSpacing and
RulerGridPropertySection, that should help with first 3 questions.

Artem

"Volker Wegert" <mail@volker-wegert.de> wrote in message
news:874pufgeq7.fsf@sinclair.home.volker-wegert.de...
> Hi,
>
> I've got a few questions regarding the grid function of the generated
> editor:
>
> - How can I determine the grid spacing from within my editor classes?
>
> - Is it possible to set the grid spacing to a fixed value that can not be
> changed by the user?
>
> - Is it possible to use a non-quadratic grid?
>
> - I've got some strange offsets when moving a rectangular part inside a
> compartment, e. g. if I move the part to the top left corner of the
> compartment, I get a position of (-5, -6) instead of (0, 0) - where do
> these values come from? Furthermore, the part doesn't stay in the top
> left
> corner but is moved a little down and right automatically - presumably
> to
> enforce this offset? (Problem for is: The part is no longer aligned to
> the
> grid now...)
>
> Thanks in advance
> Volker
>
> --
> * Volker Wegert * http://www.volker-wegert.de/contact *
> * "Nicht die Zeit entwertet die Welt. Die Eile ist es." (Peter Kafka)
> *
> *
Re: Various grid-related questions [message #80919 is a reply to message #60590] Sun, 26 November 2006 10:44 Go to previous message
Eclipse UserFriend
Originally posted by: mail.volker-wegert.de

Hi!

"Artem Tikhomirov" <artem.tikhomirov@borland.com> writes:
> Take a look at DiagramRootEditPart#setGridSpacing and
> RulerGridPropertySection, that should help with first 3 questions.

Thanks a lot!

>> I've got some strange offsets when moving a rectangular part inside a
>> compartment, e. g. if I move the part to the top left corner of the
>> compartment, I get a position of (-5, -6) instead of (0, 0) - where do
>> these values come from? Furthermore, the part doesn't stay in the top left
>> corner but is moved a little down and right automatically - presumably to
>> enforce this offset? (Problem for is: The part is no longer aligned to the
>> grid now...)

JFTR (or rather for the search engine): I solved that by adding
result.getScrollPane().setBorder(new MarginBorder(0, 0, 0, 0));
to the CompartmentEditPart method createFigure().

Volker

--
* Volker Wegert * http://www.volker-wegert.de/contact *
* Baden alleine genügt nicht - man muß auch mal das Wasser wechseln.
*
*
Previous Topic:Text to Graph editor
Next Topic:embed GMF generated editor into other plugin
Goto Forum:
  


Current Time: Sun Jun 08 17:23:48 EDT 2025

Powered by FUDForum. Page generated in 0.03778 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top