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 / April 2004

Tip: Looking for answers? Try searching our database.

Simulated Mouse Drags

Thread view: 
Mike Whittemore - 20 Apr 2004 04:34 GMT
Sun's Swing tutorial section titled "How to Use Scroll Panes" states this
about dragging and autoscrolls:

"Setting the autoscrolls property to true makes the component fire
synthetic mouse-dragged events even when the mouse isn't moving (because it
stopped, mid-drag, outside the component)."

I'd like to duplicate this behavior, but instead of the events being
triggered by mouse dragging, have them triggered by mouse moving. Any ideas
on how to do this? (Simply calling mouseDragged() from mouseMoved() does
not duplicate the behavior)

Thanks,

Mike
ak - 20 Apr 2004 07:00 GMT
> Sun's Swing tutorial section titled "How to Use Scroll Panes" states this
> about dragging and autoscrolls:
>
> "Setting the autoscrolls property to true makes the component fire
> synthetic mouse-dragged events even when the mouse isn't moving (because it
> stopped, mid-drag, outside the component)."

"An autoscrolling gesture is initiated by the user by keeping the drag
cursor motionless with a border region of the Component, referred to as the
"autoscrolling region", for a predefined period of time, this will result in
repeated scroll requests to the Component until the drag Cursor resumes its
motion."

"public boolean getAutoscrolls()
Returns true if this component automatically scrolls its contents when
dragged (when contained in a component that supports scrolling, like
JViewport)."

> I'd like to duplicate this behavior, but instead of the events being
> triggered by mouse dragging, have them triggered by mouse moving. Any ideas
> on how to do this? (Simply calling mouseDragged() from mouseMoved() does
> not duplicate the behavior)

where is your example?

--

____________

http://reader.imagero.com the best java image reader.


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.