Mind Map Demo

Demonstrates how to implement a basic, yet powerful mind map application using yFiles for Java. Import from and export to FreeMind's native XML format is supported. The design follows the suggestions of Tony Buzan, the inventor of mind maps.

User Interaction

Adding items
Either move the mouse over an existing item and click the green plus symbol of the overlay controls, or select an existing item and type INSERT to add a child item and ENTER to add a sibling item.
Deleting items
Either move the mouse over an existing item and click the red minus symbol of the overlay controls, or select an existing item and type DELETE or BACKSPACE to remove the selected item and all of its children.
Expanding and collapsing items
Either click on the blue arrow symbol below an item with children or select an item with children and type NUMPAD - to collapse the item or NUMPAD + to expand the previously collapsed item.
Creating cross-references
Either move the mouse over an existing item and click the light blue arrow symbol or select an existing item, then press and hold SHIFT and click on another item or move the mouse over an existing item, press and hold SHIFT, then drag the mouse to another item.
Editing text
Either double-click an existing item or select an existing item and type F2. Text for cross-references may be added/edited the same way.
Changing colors
Move the mouse over an existing item and click the multi-colored symbol.
Changing icons
Move the mouse over an existing item and click the smiley symbol. Choosing the crossed out box removes a previously selected icon.
Changing the mind map structure
Dragging an existing item close to another item will reassign it to a new parent item. Dragging an existing item away from all other items will delete it once the mouse is released.
Loading and Saving mind maps
Mind maps may be loaded from and saved as GraphML and FreeMind's native XML format.
Class Description
demo.view.mindmap.MindMapDemo Manipulate or create completely new, nice looking mind maps.
demo.view.mindmap.CollapseButton Hides or unhides children of an item.
demo.view.mindmap.FreeMindIOHandler Provides methods to import and export FreeMind documents. It is tested with FreeMind 0.9.0 and Freeplane 1.2.0. It should work for other versions, too, though.
demo.view.mindmap.HoverButtonThis class provides button functionality to manipulate the mind map.
demo.view.mindmap.KeyboardHandlingThis class provides several actions for keyboard interaction and a method to register the actions
demo.view.mindmap.LayoutUtil Provides utility methods for automatically arranging a mind map.
demo.view.mindmap.MindMapUtilThis class provides static methods to manipulate the mind map
demo.view.mindmap.MindMapRenderer Renders the elements of a mind map in a specific order. This specific rendering order is
  1. normal edges,
  2. nodes,
  3. cross-reference edges, and
  4. node labels
demo.view.mindmap.MoveNodeMode Handles mouse dragged events to rearrange the mind map.

Running the Demos

From Within an IDE

Set <yFilesDir>/src as your source directory. Then add <yFilesDir>/lib/y.jar and the source folder <yFilesDir>/src to your classpath. Now you should be ready to compile and run all executable demo classes.

With Ant

First make sure you have the build tool Ant installed on your system. Now you can use the demo build script build.xml located in <yFilesDir>/src/demo to launch each demo by specifying its simple class name as a target. Alternatively, launch the interactive demo driver by specifying run as target to conveniently access all demos.