Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Scrollbars not update when moving element off screen
Scrollbars not update when moving element off screen [message #530407] Thu, 29 April 2010 15:13 Go to next message
Matthew Dickie is currently offline Matthew DickieFriend
Messages: 56
Registered: July 2009
Member
Hi all,

In my editor, when I move or resize an element off the currently
displayed screen to the right or bottom, the scrollbars are not updated,
and it is not possible to see the element at its new position.

I notice that this does not seem to be a problem in the examples which
update the scrollbars even as the element is being dragged prior to the
actual drop.

How can I solve this?

Unlike the examples, I use a ScalableRootEditPart instead of a
ScalableFreeformRootEditPart, as my model does not allow negative
co-ordinates. I wonder if this is the source of the problem?

Thanks in advance...

Matt D.
Re: Scrollbars not update when moving element off screen [message #530501 is a reply to message #530407] Thu, 29 April 2010 20:07 Go to previous messageGo to next message
h1055071 is currently offline h1055071Friend
Messages: 335
Registered: July 2009
Senior Member
On 29/04/2010 16:13, Matthew Dickie wrote:
> Hi all,
>
> In my editor, when I move or resize an element off the currently
> displayed screen to the right or bottom, the scrollbars are not updated,
> and it is not possible to see the element at its new position.
>
> I notice that this does not seem to be a problem in the examples which
> update the scrollbars even as the element is being dragged prior to the
> actual drop.
>
> How can I solve this?
>
> Unlike the examples, I use a ScalableRootEditPart instead of a
> ScalableFreeformRootEditPart, as my model does not allow negative
> co-ordinates. I wonder if this is the source of the problem?
>
> Thanks in advance...
>
> Matt D.

What figure do you use? Maybe you need a FreeformLayer?
Re: Scrollbars not update when moving element off screen [message #530596 is a reply to message #530501] Fri, 30 April 2010 09:22 Go to previous messageGo to next message
Matthew Dickie is currently offline Matthew DickieFriend
Messages: 56
Registered: July 2009
Member
On 29/04/2010 21:07, Phillipus wrote:
>
> What figure do you use? Maybe you need a FreeformLayer?

Hi Phil,

I use a ScalableRootEditPart. The figure used then would be the one
created by the createFigure() method of this class, which then uses
createLayers(). Should I create a subclass and override this to add a
FreeformLayer?

The API for anything Freeform suggests that this is for situations where
objects can have negative X and Y co-ordinates. I don't want this.

ScalableRootEditPart does use a Viewport, and when I move objects, the
method Viewport.readjustScrollBars() is called, but the values never
change. I'm now investigating why that is. I may try using a
FreeformLayer though. Where would I do this?
Re: Scrollbars not update when moving element off screen [message #530601 is a reply to message #530596] Fri, 30 April 2010 09:46 Go to previous messageGo to next message
Matthew Dickie is currently offline Matthew DickieFriend
Messages: 56
Registered: July 2009
Member
Funnily enough, if I comment out the line where I use a
ScalableRootEditPart to use a ScalableFreeformRootEditPart instead, none
of my model objects appear. I'm not sure why that is.

// viewer.setRootEditPart(new ScalableRootEditPart());
viewer.setRootEditPart(new ScalableFreeformRootEditPart());
Re: Scrollbars not update when moving element off screen [message #530825 is a reply to message #530596] Sat, 01 May 2010 11:29 Go to previous messageGo to next message
h1055071 is currently offline h1055071Friend
Messages: 335
Registered: July 2009
Senior Member
On 30/04/2010 10:22, Matthew Dickie wrote:
> On 29/04/2010 21:07, Phillipus wrote:
>>
>> What figure do you use? Maybe you need a FreeformLayer?
>
> Hi Phil,
>
> I use a ScalableRootEditPart. The figure used then would be the one
> created by the createFigure() method of this class, which then uses
> createLayers(). Should I create a subclass and override this to add a
> FreeformLayer?
>
> The API for anything Freeform suggests that this is for situations where
> objects can have negative X and Y co-ordinates. I don't want this.
>
> ScalableRootEditPart does use a Viewport, and when I move objects, the
> method Viewport.readjustScrollBars() is called, but the values never
> change. I'm now investigating why that is. I may try using a
> FreeformLayer though. Where would I do this?
>

Actually, I mean the figure of your root diagram model Edit Part, the
one that represents the root of you model, the diagram.
Re: Scrollbars not update when moving element off screen [message #531236 is a reply to message #530825] Tue, 04 May 2010 09:44 Go to previous message
Matthew Dickie is currently offline Matthew DickieFriend
Messages: 56
Registered: July 2009
Member
On 01/05/2010 12:29, Phillipus wrote:
> On 30/04/2010 10:22, Matthew Dickie wrote:
>> On 29/04/2010 21:07, Phillipus wrote:
>>>
>>> What figure do you use? Maybe you need a FreeformLayer?
>>

>
> Actually, I mean the figure of your root diagram model Edit Part, the
> one that represents the root of you model, the diagram.
>

The root object of my model used to extend Layer. I changed it to extend
FreeformLayer instead, but that didn't fix it.
Previous Topic:Drag and Drop of more than one element
Next Topic:Loading diagrams
Goto Forum:
  


Current Time: Sat Dec 20 12:17:00 GMT 2014

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

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