Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Design a flow chart with moveable drawing object

Posted on 1998-11-30
Medium Priority
Last Modified: 2012-06-27

I would greatly appreciated if you could share your ideas about writing the program as described in its specification below.

I just like to have some keys word, concepts that point me to the direction.  I was puzzling me is how to move the object around.

These are some of my initial ideas:
1) Draw object
2) When mouse click down , notify the location
3) if the location match the location of the drawing object
then, if mouse release, update the new location.
4) Draw the object at the new location and erase the old location.

Thank very much for your attention.


The aim is to build a system which allows the user to draw, and edit a graph
(such as a flowchart).  A graph consists of nodes and edges.  Each edge joins
two nodes.
Assume that edges are straight lines, and that the same two nodes cannot have
more than one edge joining them.  The basic operations are adding and deleting
adding and deleting edges, and moving nodes around.

Extras for nodes.  The user should have a choice of shape to represent a node:
e.g. a little circle, little square etc.  It should be possible to change the
shapes of existing
nodes.  Also each node can have a small text-label displayed underneath.  In
addition, it should be possible to attach a longer text comment to a node:
this will be too
small for direct display, but the user should have an option to display this
in a separate window or pop-up box.

Extras for edges.  Similar features as for nodes: small label displayed
half-way along the edge, longer text comment displayable on request.  Also
there should be a
choice of style for edges: plain line, line with arrow-head at one end, or at
both ends; of course it should be possible to change styles later.

Moving.  It should be possible to move a node around: if there are any edges
which have one end at that node, they should "follow" the node as it moves
(while their
other ends remain fixed).

Multi-selections and regions.  It should be possible to move several nodes at
once.  The nodes to be moved can be selected in two ways (aim to provide both
The first way is by multi-selection: select nodes by clicking (perhaps with
the shift-key down, to distinguish this from selecting single nodes); the
selected nodes should be
highlighted somehow; clicking on a selected node (still with shift down)
should unselect it.  The second way is by regions: use the mouse to drag out a
rectangular area:
nodes within this area are selected.  Whichever selection method has been
used, a subsequent move operation will apply to all the selected nodes.  Also,
other operations
should be applicable to selections: e.g. delete all selected nodes, or change
shape of all selected nodes to small square.

Modes.  This applies to the node-shapes and edge-shapes: the current mode
determines the shapes of nodes and edges which get created.  There should be a
facility to
change modes.

Shrink/grow.  Drag out a rectangular area.  Now drag out a second such area.
The first area gets "resized" to fit the second.  This means that all nodes in
the first area
get moved: this will, for example, bring them closer together if the second
area is smaller than the first.

Initial, minimal system.  The first stage can be produced jointly by the
group.  Extensions are to be added to it separately by individual group
members.  The first stage
should allow just creating nodes, and creating edges between nodes.  The other
features can be worked on separately:

deleting nodes
moving nodes
adding/deleting arrow-heads
load/save work from/to file
changing node-shapes
modes for current node/edge shape
small labels for nodes/edges
large text comments for nodes/edges
region selection
moving a multi-selection or region
other operations on multi-selection or region
Question by:ninh
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 16

Expert Comment

ID: 1228457

too much text for reading and 50 points ... :-) i don't think that anobody will be interested ... (sorry - but your problem is not in designeing - it's just hard work to implementat everything )

so goto your JDK directory (if you don't have one - download it from www.javasoft.com) goto the demo/GraphLayout/ subdirectory - there is an example that maybe will be usefull for you - look at the working applets first ...
if you find this suggestion usefull, i can post it as an answer (so i'll get the points :)

hope this helps
LVL 16

Expert Comment

ID: 1228458
oh, oh, oh - too much typos there ... :(

if you don't have this example, i can post it here or send it to you as e-mail attachment ... it's only 11K .java file ...

Author Comment

ID: 1228459
Hello heyhey,

That would be great.  Are you going to post the example in the jdk.. ?? Or is that a different example.

My email is ee9553@mailexcite.com

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 16

Expert Comment

ID: 1228460
hi ninh,
sorry - i don't have some other examples ...
but you can check this URL for a freeware program
LVL 16

Expert Comment

ID: 1228461
hello, ninh
if the information I've posted here helped you, I can post an answer . ;-)

Author Comment

ID: 1228462
Hello Hey hey,

Thank you so much for your information.As a way to say thank you..more points.  However, the dead line to hand in the project is way way paaased.  

Oppp..This should be a very good example to see how it is implemented.  

Many thanks


Author Comment

ID: 1228463
One more thing, I have found a API package created from awt that is quite good since it allows object to be move.
Have you heard something called "subartic".  I have manage to download the software but I lost the book mark.  I will post it when I receive the CD from my office.

LVL 16

Accepted Solution

heyhey_ earned 1400 total points
ID: 1228464
>> Thank you so much for your information.As a way to say thank you..more points.

So ...  I'm postinhg an answer.

P.S. I'm still interested in "subartic" URL.

Author Comment

ID: 1228465

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question