guides on ruler not displaying properly [message #182844] |
Sun, 29 May 2005 15:52 |
Eclipse User |
|
|
|
Originally posted by: spam.boeckling.net
This is a multi-part message in MIME format.
--------------050605040303060005000409
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
Hello,
I've got a problem with the look of the guides on my GEF ruler. When I
create one, the dotted line goes correctly over the whole editor area,
indicating the horizontal or vertical position of the guide. But as soon
as I let go of it (mouse button released), it looks like in the attached
image. I've been trying to figure out why several days, with no
success. However, the snap-to behaviour works as expected! If anyone has
an idea why it does what it does, i'd be most thankful.
Regards,
Michael B
|
|
|
|
Re: guides on ruler not displaying properly [message #184811 is a reply to message #182844] |
Fri, 17 June 2005 17:13 |
Eclipse User |
|
|
|
Originally posted by: DannyDittmann.web.de
Hello!
I have no solution for your problem ;-)
but would ask you about how you have implemented these rulers and guides.
I would be very happy if you could give me some code examles or something!
Because I don?t know how it work and I could not find any documentation.
Thx
"Michael B
|
|
|
Re: guides on ruler not displaying properly [message #184999 is a reply to message #184811] |
Tue, 21 June 2005 15:00 |
Eclipse User |
|
|
|
Originally posted by: spam.boeckling.net
Hi,
as of now I was unable to find a solution (but then, I tried only for a
few hours before I got frustrated). The hints that Pratik gave me seemed
to reveal no remarkable abnormality in my code. The funny thing is that
it used to work some time ago... :-(
Sorry, but I can't help you (yet). Should you find a solution before I
do, please tell me about it!
Regards,
Michael Böckling
> Hello!
>
> I have no solution for your problem ;-)
> but would ask you about how you have implemented these rulers and guides.
> I would be very happy if you could give me some code examles or something!
> Because I don?t know how it work and I could not find any documentation.
>
> Thx
>
>
> "Michael Böckling" <spam@boeckling.net> schrieb im Newsbeitrag
> news:d7coor$6no$1@news.eclipse.org...
>
>>Hello,
>>
>>I've got a problem with the look of the guides on my GEF ruler. When I
>>create one, the dotted line goes correctly over the whole editor area,
>>indicating the horizontal or vertical position of the guide. But as soon
>>as I let go of it (mouse button released), it looks like in the attached
>> image. I've been trying to figure out why several days, with no
>>success. However, the snap-to behaviour works as expected! If anyone has
>>an idea why it does what it does, i'd be most thankful.
>>
>>Regards,
>>Michael Böckling
>>
>
>
>
> ------------------------------------------------------------ ----------------
> ----
>
>
>
>
>
|
|
|
Re: guides on ruler not displaying properly [message #185006 is a reply to message #184999] |
Tue, 21 June 2005 15:08 |
Eclipse User |
|
|
|
Originally posted by: spam.boeckling.net
Oops, Sorry... *g*
I just realized I answered to a question that was never asked. I just
adapted the sample code from the logic example and stuffed it into my app.
The most important part is to set the right properties to the
graphicalViewer, like this:
getGraphicalViewer().setProperty(RulerProvider.PROPERTY_HORI ZONTAL_RULER,
this.horizontalRuler );
getGraphicalViewer().setProperty(
RulerProvider.PROPERTY_VERTICAL_RULER,this.verticalRuler );
getGraphicalViewer().setProperty(RulerProvider.PROPERTY_RULE R_VISIBILITY,
new Boolean( true ) );
(hint: horizontalRuler / verticalRuler are instances of RulerProvider)
Additionally, in the method createGraphicalViewer(), you have to use a
RulerComposite as argument, like this:
protected void createGraphicalViewer( Composite parent )
{
this.rulerComp = new MyRulerComposite( parent, SWT.NONE,
getActionRegistry() );
super.createGraphicalViewer( this.rulerComp );
this.rulerComp.setGraphicalViewer( ( ScrollingGraphicalViewer )
getGraphicalViewer() );
}
That should get you started, you'll sure find the rest by searching this
newsgroup.
Regards,
Michael Böckling
> Hi,
>
> as of now I was unable to find a solution (but then, I tried only for a
> few hours before I got frustrated). The hints that Pratik gave me seemed
> to reveal no remarkable abnormality in my code. The funny thing is that
> it used to work some time ago... :-(
> Sorry, but I can't help you (yet). Should you find a solution before I
> do, please tell me about it!
>
> Regards,
> Michael Böckling
>
>
>
>>Hello!
>>
>>I have no solution for your problem ;-)
>>but would ask you about how you have implemented these rulers and guides.
>>I would be very happy if you could give me some code examles or something!
>>Because I don?t know how it work and I could not find any documentation.
>>
>>Thx
>>
>>
>>"Michael Böckling" <spam@boeckling.net> schrieb im Newsbeitrag
>>news:d7coor$6no$1@news.eclipse.org...
>>
>>
>>>Hello,
>>>
>>>I've got a problem with the look of the guides on my GEF ruler. When I
>>>create one, the dotted line goes correctly over the whole editor area,
>>>indicating the horizontal or vertical position of the guide. But as soon
>>>as I let go of it (mouse button released), it looks like in the attached
>>> image. I've been trying to figure out why several days, with no
>>>success. However, the snap-to behaviour works as expected! If anyone has
>>>an idea why it does what it does, i'd be most thankful.
>>>
>>>Regards,
>>>Michael Böckling
>>>
>>
>>
>>
>> ------------------------------------------------------------ ----------------
>>----
>>
>>
>>
>>
>>
|
|
|
Re: guides on ruler not displaying properly [message #185065 is a reply to message #184999] |
Wed, 22 June 2005 07:54 |
Eclipse User |
|
|
|
Originally posted by: dannydittmann.web.de
Hi again!
The problem with the wrong displaying of the rulers occures when I use
*ScalableRootEditPart* instead of *ScalableFreeformRootEditPart* as the
Root Editpart in the *configureGraphicalViewer()* method.
So maybe you could solve the problem by changing this... but...
in my Application I use a Image on a Label as the Background figure.
And when I use the *ScalableFreeformRootEditPart* it displays not the whole
Image.
Can I set any constraints to this *ScalableFreeformRootEditPart* to solve
my problem???
Thx for help!!
Regards,
Danny
|
|
|
Re: guides on ruler not displaying properly [message #185073 is a reply to message #185065] |
Wed, 22 June 2005 08:34 |
Eclipse User |
|
|
|
Originally posted by: dannydittmann.web.de
Yeah,
I have found the solution in the IBM Redbook about GEF and EMF...
I have to use a ImageFigure as the figure that implement FreeformFigure.
Hehe, itŽs better to read before post...
Regards,
Danny
|
|
|
Powered by
FUDForum. Page generated in 0.03955 seconds