I've got an an application wherein I will be provided with an unordered collection of items (objects that can basically be represented as rectangles) and need to put them into a larger rectangular shape (a cluster) based off of their physical location. There may be more than one cluster of items, and some items may be in a cluster by themselves.
Each item knows which item is to its right (if any) and which item is below it (if any). Thus the items could be placed in a Directed Graph
and traversed.
How can I display all of the items graphically? If I put the items in a Graph
, how should I traverse it?