utilities
Class GraphLayout

java.lang.Object
  |
  +--utilities.GraphLayout
All Implemented Interfaces:
ConfiguredObject, java.awt.LayoutManager, java.awt.LayoutManager2

public class GraphLayout
extends java.lang.Object
implements java.awt.LayoutManager2, ConfiguredObject


Constructor Summary
GraphLayout()
           
GraphLayout(int r, int c)
           
GraphLayout(int r, int c, java.lang.String savename, javax.swing.JTextArea txt)
           
GraphLayout(java.lang.String n, javax.swing.JTextArea txt)
           
 
Method Summary
 void addLayoutComponent(java.awt.Component comp, java.lang.Object constraints)
           
 void addLayoutComponent(java.lang.String name, java.awt.Component component)
           
 void addMenuItem(javax.swing.JMenuItem item)
           
 boolean findConflict(java.awt.Component c, java.awt.Rectangle location)
           
 java.awt.Component findNode(java.awt.Point p)
           
 java.util.Vector findNodes(java.awt.Point p)
           
 java.awt.Component getComponent(GraphNode n)
           
 float getLayoutAlignmentX(java.awt.Container target)
           
 float getLayoutAlignmentY(java.awt.Container target)
           
 java.awt.Point getLocationForLine(GraphNode n, GraphNode src)
           
 GraphNode getNode(java.awt.Component c)
           
 java.awt.Component getSelected()
           
 javax.swing.JTextArea getText()
           
 void invalidateLayout(java.awt.Container target)
           
 void layoutContainer(java.awt.Container parent)
           
 java.awt.Dimension maximumLayoutSize(java.awt.Container target)
           
 java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
           
 void placeNodes()
           
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
           
 void removeLayoutComponent(java.awt.Component component)
           
 void resetNodePlacing()
           
 void saveCfg()
          saves the information in this object to the proper location in the CfgManager.
 void setRecursivePlacement(boolean b)
           
 void setSave(boolean b)
           
 void setSaveFile(java.lang.String s)
           
 void setSelected(java.awt.Component c)
           
 void setSpacing(int hspace, int vspace, int hspace2, int vspace2, int hmargin, int vmargin)
           
 void updateCfg()
          updates the information in this object with information currently in the CfgManager.
 boolean willHandleRecursivePlacement()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphLayout

public GraphLayout(int r,
                   int c,
                   java.lang.String savename,
                   javax.swing.JTextArea txt)

GraphLayout

public GraphLayout(int r,
                   int c)

GraphLayout

public GraphLayout(java.lang.String n,
                   javax.swing.JTextArea txt)

GraphLayout

public GraphLayout()
Method Detail

setSave

public void setSave(boolean b)

setRecursivePlacement

public void setRecursivePlacement(boolean b)

willHandleRecursivePlacement

public boolean willHandleRecursivePlacement()

setSaveFile

public void setSaveFile(java.lang.String s)

setSpacing

public void setSpacing(int hspace,
                       int vspace,
                       int hspace2,
                       int vspace2,
                       int hmargin,
                       int vmargin)

addLayoutComponent

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

removeLayoutComponent

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

preferredLayoutSize

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

minimumLayoutSize

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

layoutContainer

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

addLayoutComponent

public void addLayoutComponent(java.awt.Component comp,
                               java.lang.Object constraints)
Specified by:
addLayoutComponent in interface java.awt.LayoutManager2

maximumLayoutSize

public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
Specified by:
maximumLayoutSize in interface java.awt.LayoutManager2

getLayoutAlignmentX

public float getLayoutAlignmentX(java.awt.Container target)
Specified by:
getLayoutAlignmentX in interface java.awt.LayoutManager2

getLayoutAlignmentY

public float getLayoutAlignmentY(java.awt.Container target)
Specified by:
getLayoutAlignmentY in interface java.awt.LayoutManager2

invalidateLayout

public void invalidateLayout(java.awt.Container target)
Specified by:
invalidateLayout in interface java.awt.LayoutManager2

findConflict

public boolean findConflict(java.awt.Component c,
                            java.awt.Rectangle location)

findNodes

public java.util.Vector findNodes(java.awt.Point p)

findNode

public java.awt.Component findNode(java.awt.Point p)

getText

public javax.swing.JTextArea getText()

addMenuItem

public void addMenuItem(javax.swing.JMenuItem item)

getSelected

public java.awt.Component getSelected()

setSelected

public void setSelected(java.awt.Component c)

getNode

public GraphNode getNode(java.awt.Component c)

getComponent

public java.awt.Component getComponent(GraphNode n)

getLocationForLine

public java.awt.Point getLocationForLine(GraphNode n,
                                         GraphNode src)

resetNodePlacing

public void resetNodePlacing()

placeNodes

public void placeNodes()

updateCfg

public void updateCfg()
Description copied from interface: ConfiguredObject
updates the information in this object with information currently in the CfgManager.
Specified by:
updateCfg in interface ConfiguredObject

saveCfg

public void saveCfg()
Description copied from interface: ConfiguredObject
saves the information in this object to the proper location in the CfgManager.
Specified by:
saveCfg in interface ConfiguredObject