Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2004

Tip: Looking for answers? Try searching our database.

Rubberband source code?

Thread view: 
Ramon - 21 Dec 2004 15:21 GMT
I have been looking all over the Internet for this.

Can someone please provide or point to some sample
source code implementing the classical rubberband
rectangular selection??

In fact, since this seems so hard to find, I am
willing to compromise.  I only need to capture the
two endpoints: where the user originally clicked
and where the mouse was released.  That's all I need
for my prototype, and I can worry about the visual
feedback (the actual XOR rubberband) later.
I very, very much appreciate any help.

-Ramon F Herrera
Robert Metzger - 21 Dec 2004 15:47 GMT
>I have been looking all over the Internet for this.
>
[quoted text clipped - 9 lines]
>feedback (the actual XOR rubberband) later.
>I very, very much appreciate any help.

how about a MouseInputListener which makes appropriate
use of mousePressed(), mouseReleased(), and mouseClicked()
and getPoint()?
Signature

Robert Metzger          
Hewlett-Packard Company
High Performance Computing Division

Ramon - 21 Dec 2004 21:20 GMT
Thanks a lot, Robert.  That's exactly what I needed.

There is one issue with all those  Java classes, interfaces,
packages, etc. in which the problem is NOT finding a needle in the
proverbial haystack, but determining whether you are looking in the
right haystack at all. :-)

-Ramon
Andrei Kouznetsov - 21 Dec 2004 23:30 GMT
> Can someone please provide or point to some sample
> source code implementing the classical rubberband
> rectangular selection??

see http://jgui.imagero.com/examples/ImagePanel/

Signature

Andrei Kouznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities

Remi Bastide - 28 Dec 2004 10:39 GMT
>I have been looking all over the Internet for this.
>
>Can someone please provide or point to some sample
>source code implementing the classical rubberband
>rectangular selection??

see:
http://liihs.univ-tlse1.fr/~bastide/Teaching/java/PolyLine/Default.html
and:
http://liihs.univ-tlse1.fr/~bastide/Teaching/java/PolyLine/solutions.html
two different solutions, meant to exemplify the "state" design
pattern.

>In fact, since this seems so hard to find, I am
>willing to compromise.  I only need to capture the
[quoted text clipped - 5 lines]
>
>-Ramon F Herrera


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.