Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » MouseDown events on composite causing freezing?
MouseDown events on composite causing freezing? [message #1048784] Thu, 25 April 2013 00:22 Go to next message
Justin Unterreiner is currently offline Justin Unterreiner
Messages: 10
Registered: August 2012
Junior Member
I'm working on a component used for scheduling that will work similar to that of the scheduler in uTorrent (see screenshot below). In the current implementation, I have a grid layout and each cell is a composite that has a mouse listener for a click event. The click event handles the toggling of the color of the cell.

I would like to allow the user to click and continue to drag their mouse so they can easily select adjacent cells. I tried to implement this by adding a mouseEnter event to the cells that would check the MouseEvent's button flag to see if a mouse button was pressed.

The problem is that after a mouse down event occurs on a cell (or any composite) the mouseEnter/Exit events will not fire as long as the mouse button remains down. (Strangely enough the hover and move events will continue to work while the button is down).

I've attached a simple Main.java file showing this issue; you can see the mouseEnter/Exit events work until you hold down a mouse button, then they will not fire as you move the mouse across the composites.

Perhaps I shouldn't be using composites for the cells? Ideas or thoughts are appreciated.

index.php/fa/14503/0/
icon3.gif  Re: MouseDown events on composite causing freezing? [message #1053707 is a reply to message #1048784] Tue, 07 May 2013 10:39 Go to previous messageGo to next message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?

why not one canvas and draw the whole thing?
and use the hover and move events to capture the position and redraw the cells as required.....


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay

[Updated on: Wed, 08 May 2013 10:48]

Report message to a moderator

Re: MouseDown events on composite causing freezing? [message #1055135 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous messageGo to next message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055236 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous messageGo to next message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055260 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous messageGo to next message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055301 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous messageGo to next message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055326 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...

---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055367 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055368 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055432 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055433 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055434 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055501 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055503 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055504 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055571 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055572 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055573 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055643 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055644 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055645 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055717 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055718 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055719 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055790 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055791 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055792 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055868 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055869 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055870 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055946 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055947 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1055948 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1056025 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1056026 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1056027 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1056106 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1056107 is a reply to message #1053707] Wed, 08 May 2013 10:21 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?


and use the hover and move events to capture the position and redraw the cells as required......

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1056108 is a reply to message #1053707] Wed, 08 May 2013 10:29 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
Serious bug in forum,the above post after editing is not showing up...
--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: MouseDown events on composite causing freezing? [message #1056191 is a reply to message #1053707] Wed, 08 May 2013 10:15 Go to previous message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
First of all -is each cell a composite?

why?


why not one canvas and draw the whole thing?

and use the hover and move events to capture the position and redraw the cells as required...

--
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Previous Topic:Sync Horizontal Scrolling across two tables
Next Topic:Reading pixel color on SWT canvas at mouse pointer
Goto Forum:
  


Current Time: Tue Sep 30 14:02:49 GMT 2014

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

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