Various grid-related questions [message #60569] |
Sun, 08 October 2006 08:43  |
Eclipse User |
|
|
|
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 #80919 is a reply to message #60590] |
Sun, 26 November 2006 10:44  |
Eclipse User |
|
|
|
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.
*
*
|
|
|
Powered by
FUDForum. Page generated in 0.03778 seconds