Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2758
| From | "L I M" <l.i.m@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Problem with overlapp |
| Message-ID | <1195062261.615584.187620@i13g2000prf.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <7b336f1df125e@uwe> |
| Date | 2011-04-27 15:40 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui On Nov 14, 7:49 am, "Andrew Thompson" <u32984@uwe> wrote: > Chanchal wrote: > >Hi, > > Hi. > > That was almost an excellent SSCCE you posted, but if you > make some trivial changes, it is possible to post just a single > (.java) file that helps people see it easier. > > The way you would do that is (the same way I just > did to see the code run as Test.java) > - Move all the imports to the 'top' > - demote the 'public class Line' to 'class Line' > - ..that's about it, actually. > > The thing is - it is easier for you to do that before posting, > than for two other people to do it while before seeing the > problem. > > >When the program is run, two lines are drawn. First one, Orange in > >color and has a green border. Sencond line is a blue one with red > >border. the borders are opverlapping. > > >My issue is that when i move mouse pointer over the part of the blue > >line which is overlapping with the green border, the events are not > >getting fired. > > I am not entirely sure I understand. But I will take a shot. > > If you mean that 'the bottom component' is not getting events > when the mouse passes over the 'top component' then I think > that makes sense. > > The top component is 'consuming' the events before they > reach the bottom component. > > >Kindly advice on how to overcome this problem > > I am not sure that you are following the correct strategy here. > > If I were the user about to drag either of those components, I > would expect the 'top one' to be dragged whenever the pointer > is within its bounds. Why would I want the bottom one to > get the events? Unless, if you've tried running the code, the user is given an impression that the lines are indeed non-overlapping, only the rectagle borders are. Simply put it, the drawings of the rectagle borders had not covered that part of the blue line, since the rectangle is transparent. But the event is still consumed by the rectangle instead of the line underneath it, since the rectangular object is still on top of that line. > If need be, I might even drag the top one out of the way > for the moment, just to get at the bottom one. > > I suggest instead that you draw an 'animated outline' of the > bounds of the 'selected' line - then I think it would be fairly > intuitive for the user. Also, a way to 'reorder' the layering > might be handy. > > What is this all for, by the way? I can think of a number of > interesting types of things you might do with this, but what > is this one used for? > > -- > Andrew Thompsonhttp://www.athompson.info/andrew/ > > Message posted via JavaKB.comhttp://www.javakb.com/Uwe/Forums.aspx/java-gui/200711/1 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Problem with overlapp "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: Problem with overlapp "L I M" <l.i.m@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
Re: Problem with overlapp "A. Bolmarcich" <a..bolmarcich@THRWHITE.remove-dii-this> - 2011-04-27 15:40 +0000
csiph-web