mihosoft.eu
Programming, Art, Linux, Free Software…
mihosoft.eu
Navigation
  • Home
  • VRL-Studio
  • SonoAir
  • Monochrome Wars
  • About
  • Impressum
  • Datenschutz
You are here: Home › Featured › Draggable Nodes With Just One Method Call!

Draggable Nodes With Just One Method Call!

February 27, 2013 | Filed under: Featured, JavaFX, Uncategorized

How do you make nodes draggable? If you search for draggable nodes you will find lots of code samples. But most of them don’t consider transformations. Transformations can be applied to nodes to scale them down etc. This is an important feature of JavaFX that unfortunately is not considered by many developers.

Don’t waste so much of JavaFX’s potential!

When I developed the window control I wanted to create draggable nodes that can also be dragged if the node or its parent was scaled. To simplify things, I added a class called MouseControlUtil to the JFXtras. It provides the method

MouseControlUtil.makeDraggable(final Node n);

This is all you need to do to make nodes draggable. Pretty cool, huh?

In the video tutorial I show a sample project that demonstrates how to create lots of draggable rectangles inside of a window control that contains scalable content. We’ll discuss what happens with the mouse pointer if you don’t consider transformations.

Sample project: MakeNodesDraggable01.

What features would you like to see in the future?

Do you need rotation support? What about 3D user interfaces? Tell me your ideas!

Did you like this article? Share it with your friends!

Tweet

Written by admin

Visit my Website Follow me on Twitter

4 Responses to "Draggable Nodes With Just One Method Call!"

  1. Java desktop links of the week, March 4 | Jonathan Giles says:
    March 3, 2013 at 21:44

    […] mihosoft has a blog up about making it possible to easily drag nodes in a JavaFX application. […]

  2. Mircea says:
    March 4, 2013 at 22:11

    Wow wow wow. I didn’t know. Thank you so much.

  3. TBM says:
    May 19, 2013 at 13:26

    Nice

  4. amine says:
    December 9, 2013 at 09:46

    thank you so much!

Comments are closed.

Pages

  • About
  • Datenschutz
  • Impressum
  • Seminar 2019

Categories

  • 3D Printing
  • Any-Key
  • Art
  • C/C++
  • Devoxx
  • Digital Painting
  • Featured
  • IoT
  • Java
  • JavaFX
  • Javakurs 2015
  • JavaOne
  • Linux
  • Linux on Apple Hardware
  • Linux: Daily Usage Tips
  • Mobile Apps
  • Mobile Devices
  • Programming Languages
  • Repair Things
  • Science
  • Sonos
  • Teaching
  • Uncategorized
  • Virtual Reality
  • VRL

Tags

3D 3D Printing 3d visualization AirSonos Apple Music Devoxx Devoxx 2013 gradle graph iOS Java Java 8 JavaFX JavaFX 8 JavaOne JavaOne 2013 jdk9 JFXtras JInternalFrame Linux MacBook MDI mobile apps OpenDive OpenJDK OpenJFX Open Source Performance scientific visualization SonoAir Sonos Ultimaker Virtual Reality Virtual World visual programming VPlot VRL VRL-Studio VWorkflows window control Window Node Window System workflow workflows X11

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

JavaOne Rockstar

JavaOne Rockstar
Follow @mihosoft

Recent Posts

  • Native JDK9 Application Bundles
  • Running C code from Java via VTCC
  • SonoAir finally supports macOS High Sierra!
  • JavaOne 2017 Community Keynote Artwork
  • The JGrounds App: better teaching apps for Java 9 [BOF5047]

Recent Comments

  • ¿Ventanas completamente personalizadas de JavaFX? - Fallosweb.com on VFXWindows
  • JavaFX entirely customized windows? – w3toppers.com on VFXWindows
  • Volel Mondesir on Adding Custom Icons to JFXtras Window Control (VFXWindows)
  • Volel Mondesir on Adding Custom Icons to JFXtras Window Control (VFXWindows)
  • Switching between different JDK versions in Windows - ErrorsFixing on JSelect: switch between different JDK versions

Archives

  • February 2018
  • October 2017
  • September 2017
  • February 2017
  • June 2016
  • May 2016
  • November 2015
  • September 2015
  • July 2015
  • March 2015
  • September 2014
  • March 2014
  • February 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • November 2010
  • February 2010
  • November 2009
  • October 2009
  • February 2009
  • August 2008
  • May 2008
  • April 2008
  • March 2008
Privacy & Cookies: this site uses cookies. By continuing to use this website, you agree to their use.
To find out more, see here: Impressum & Datenschutz

© 2025 mihosoft.eu