Best practice for drag and drop shapes


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Best practice for drag and drop shapes

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Posts
    2

    Question Best practice for drag and drop shapes

    I'm looking at creating a (simple) gui that allows users to highlight and drag connected shapes around a canvas - much like MS Visio or Rational Rose.

    I'm fairly new to GUIs, but I would have thought that this was something that was fairly common. The only way I can see of doing it seems rather primitive, ie the Java 2D API using custom code for basically everything from drawing the shapes, to determining which shape should highlighted and moved.

    Are there other ways of doing this? Is there a "best practice"?

    Thanks,
    Stephen.

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    Yes, its a common problem, and I think what you describe is the "best practice", if
    you don't want to pay for some fancy software package. When you describe it, it
    may look like a lot of coding, but it isn't.
    eschew obfuscation

  3. #3
    Join Date
    Aug 2005
    Posts
    2

    Smile

    You're right - it wasn't much work.

    I managed to get a "proof of concept" gui with movable boxes and connected lines up and running in well under a day.

    Thanks,
    Stephen.

Similar Threads

  1. Problem with Drag and Drop
    By Jim Pragit in forum .NET
    Replies: 5
    Last Post: 08-10-2005, 08:16 AM
  2. How to link diff drop down menus
    By kalpana in forum Architecture and Design
    Replies: 0
    Last Post: 03-24-2003, 02:39 AM
  3. Drag and Drop Problem
    By Xin Li in forum .NET
    Replies: 0
    Last Post: 03-13-2002, 06:03 AM
  4. DIV's and drop down menus (SELECT)
    By Randy in forum Web
    Replies: 2
    Last Post: 12-21-2001, 10:10 AM
  5. DROP TABLE @VariableName
    By John C. Gunvaldson in forum Database
    Replies: 4
    Last Post: 10-19-2000, 01:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center