Draw2d: figure does not repaint during drag&drop [message #141471] |
Mon, 05 July 2004 10:36 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03050 seconds