Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Draw2d: figure does not repaint during drag&drop
Draw2d: figure does not repaint during drag&drop [message #141471] Mon, 05 July 2004 10:36 Go to next message
Eclipse UserFriend
Originally posted by: yuraukar.hotmail.com

I am trying to implement a simple drag&drop
using Draw2D. I have attached a DropTarget
to the FigureCanvas and attached a DropListener
to get dragOver events.

What I try to accomplish is that the figure
currently below the cursor is highlighted to
show some feedback. This is supposed to be done
using
// find figure using findFigureAt
...
// highlight figure
fig.setBackgroundColor( ColorConstants.green );
fig.repaint();

For some unknown reason, repaint does not happen while
dragging occurs, only after the mouse button is released.

I should probably add, that the drag source is in another
shell window than the target.

Any help is appreciated.

Yuraukar
Re: Draw2d: figure does not repaint during drag&drop [message #141505 is a reply to message #141471] Mon, 05 July 2004 12:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: yuraukar.hotmail.com

Does not seem to depend on the separate shell.
Same is true if drag source is the FigureCanvas
itself.

Hope for help...

Yuraukar

Yuraukar wrote:
> I am trying to implement a simple drag&drop
> using Draw2D. I have attached a DropTarget
> to the FigureCanvas and attached a DropListener
> to get dragOver events.
>
> What I try to accomplish is that the figure
> currently below the cursor is highlighted to
> show some feedback. This is supposed to be done
> using
> // find figure using findFigureAt
> ...
> // highlight figure
> fig.setBackgroundColor( ColorConstants.green );
> fig.repaint();
>
> For some unknown reason, repaint does not happen while
> dragging occurs, only after the mouse button is released.
>
> I should probably add, that the drag source is in another
> shell window than the target.
>
> Any help is appreciated.
>
> Yuraukar
Re: Draw2d: figure does not repaint during drag&drop [message #141527 is a reply to message #141505] Mon, 05 July 2004 14:10 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

In GraphicalViewerImpl, their is a method called flush() which forces the
paint to occur. We call this method during DragOver events. You'll have to
do something similar.

"Yuraukar" <yuraukar@hotmail.com> wrote in message
news:ccbgof$ic6$1@eclipse.org...
> Does not seem to depend on the separate shell.
> Same is true if drag source is the FigureCanvas
> itself.
>
> Hope for help...
>
> Yuraukar
>
> Yuraukar wrote:
> > I am trying to implement a simple drag&drop
> > using Draw2D. I have attached a DropTarget
> > to the FigureCanvas and attached a DropListener
> > to get dragOver events.
> >
> > What I try to accomplish is that the figure
> > currently below the cursor is highlighted to
> > show some feedback. This is supposed to be done
> > using
> > // find figure using findFigureAt
> > ...
> > // highlight figure
> > fig.setBackgroundColor( ColorConstants.green );
> > fig.repaint();
> >
> > For some unknown reason, repaint does not happen while
> > dragging occurs, only after the mouse button is released.
> >
> > I should probably add, that the drag source is in another
> > shell window than the target.
> >
> > Any help is appreciated.
> >
> > Yuraukar
Previous Topic:call a method from a palette's button
Next Topic:Move figure when using DelegatingLayout
Goto Forum:
  


Current Time: Thu Apr 25 08:21:51 GMT 2024

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

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

Back to the top