freemind.view.mindmapview
Class MindMapLayout

java.lang.Object
  extended byfreemind.view.mindmapview.MindMapLayout
All Implemented Interfaces:
java.awt.LayoutManager

public class MindMapLayout
extends java.lang.Object
implements java.awt.LayoutManager

This class will Layout the Nodes and Edges of an MapView.


Field Summary
static int MINIMAL_LEAF_WIDTH
           
static int MINIMAL_WIDTH
           
 
Constructor Summary
MindMapLayout(MapView map)
           
 
Method Summary
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
           
protected  int getShiftDown(NodeView node)
           
protected  int getShiftUp(NodeView node)
           
 void layout(boolean holdSelected)
          This funcion resizes the map and do the layout.
 void layoutContainer(java.awt.Container parent)
           
 java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
           
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
           
 void removeLayoutComponent(java.awt.Component comp)
           
protected  void updateTreeGeometry(NodeView node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINIMAL_LEAF_WIDTH

public static final int MINIMAL_LEAF_WIDTH
See Also:
Constant Field Values

MINIMAL_WIDTH

public static final int MINIMAL_WIDTH
See Also:
Constant Field Values
Constructor Detail

MindMapLayout

public MindMapLayout(MapView map)
Method Detail

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
Specified by:
addLayoutComponent in interface java.awt.LayoutManager

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Specified by:
removeLayoutComponent in interface java.awt.LayoutManager

layoutContainer

public void layoutContainer(java.awt.Container parent)
Specified by:
layoutContainer in interface java.awt.LayoutManager

layout

public void layout(boolean holdSelected)
This funcion resizes the map and do the layout. All tree heights, widths and shifts should be already calculated.


getShiftUp

protected int getShiftUp(NodeView node)

getShiftDown

protected int getShiftDown(NodeView node)

updateTreeGeometry

protected void updateTreeGeometry(NodeView node)

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
Specified by:
minimumLayoutSize in interface java.awt.LayoutManager

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Specified by:
preferredLayoutSize in interface java.awt.LayoutManager