Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Mouse resize listener


I like Steve's suggestion best (it should do exactly what you want), but do look at Tracker so that you know what it is for next time.    :)
Have fun,
Carolyn



Steve Northover/Ottawa/IBM@IBMCA
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

11/25/2004 01:26 PM

Please respond to
platform-swt-dev

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
Re: [platform-swt-dev] Mouse resize listener






1) You could try setting a flag and defering the resize work using Display.asyncExec().  When you get a resize, if the flag is set, just return.  This should cause the resize work only when the UI is idle.

2) That's new for 3.1.



Brian Al Saadi <brian.alsaadi@xxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

11/25/2004 01:15 PM

Please respond to
platform-swt-dev

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
Re: [platform-swt-dev] Mouse resize listener







Thanks Steve

1. So I wonder is there a work around to what I wanna do. Meaning
getting the last resize event only ..
2. Also I read somewhere that there is a setMinimumSize() method for
the shell. But I couldnt find it in version 3.0.1
please advise to where I can find this method

Thank you


On Thu, 25 Nov 2004 11:59:14 -0500, Steve Northover
<steve_northover@xxxxxxxxxx> wrote:
>  
> This won't work because you only get mouse events in the client area.  When
> you double click, Windows maximizes your shell and leaves an outstanding
> mouse up that your application sees.
>  
>  
>  
>  
>  Brian Al Saadi <brian.alsaadi@xxxxxxxxx>
> Sent by: platform-swt-dev-admin@xxxxxxxxxxx
>
> 11/25/2004 10:31 AM
>  
> Please respond to
>  platform-swt-dev
>  
>  
> To platform-swt-dev@xxxxxxxxxxx
>  
> cc
>  
> Subject [platform-swt-dev] Mouse resize listener
>  
>  
>  
>  
>  
>
>
> Hello
>  
>  Im trying to catch a resize event of my application. The problem is
>  that I get many resize events while I only need the last one, i.e the
>  last event fired when my mouse is up. So I tried having a global
>  boolean variable that is set to true when I get a control resize
>  event. Also I have a MouseListener
>  
>  <code>
>  shell.addMouseListener(new MouseAdapter(){
>  
>                                                                     public
> void mouseUp(MouseEvent me)
>                                                                     {
>                                                                            
>         System.out.println("mouseUp");
>                                                                            
>         if(resizing)
>                                                                            
>         {
>                                                                            
>                          resizing = false;
>                                                                            
>                          System.out.println("Do the magic");
>                                                                            
>         }
>                                                                     }
>                                                    });
>  </code>
>  
>  The problem is that the "mouseUp" sentence is not written to the
>  screen when I drag the border and release the mouse. But when I double
>  click on the title bar of the shell I get the MouseUp event...
>  
>  Any suggestions
>  
>  Thanks
>  Brian
>  _______________________________________________
>  platform-swt-dev mailing list
>  platform-swt-dev@xxxxxxxxxxx
>  http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>  
>
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top