de.uni_paderborn.fujaba.layout
Class AbstractLayouter

java.lang.Object
  extended byde.uni_paderborn.fujaba.layout.AbstractLayouter
Direct Known Subclasses:
ClassdiagramLayouter, ControlFlowLayout, SpringEmbedderLayout, TreeLayout

public abstract class AbstractLayouter
extends java.lang.Object

Class 'AbstractLayouter' specified in class diagram 'TreeLayout.java diagram'.

Version:
$Revision: 1.31 $
Author:
$Author: creckord $

Constructor Summary
protected AbstractLayouter()
          Constructor of Class AbstractLayouter
 
Method Summary
protected  boolean checkVisited(java.lang.Object tocheckObject)
          This method returns TRUE if a Object already is set as visited, the behavior of the method depends on the var lastCondition
protected  FSAObject getChild(FSABend itemGrab)
          Function searches for Child of a father class, connected by a grab
 javax.swing.JFrame getFrame(FSAObject canvas)
          Returns the frame where the wait cursor have to be set.
protected  FSAObject getFromToFrame(FSABendLine myLine, int what)
          Function returns the frame at the one side of a Frame depending on the what-Parameter
 int getHorizDist()
          Get the horizDist attribute of the AbstractLayouter object
protected  int getLeft(int pos, java.util.Vector rowDepths)
          Function is responsible for the rowDepths vector, it returns the value of Element at position in the vector, if the size of the array is smaller as the requested element, the function adds one element and returns 0.
protected  int getPreferredLen(FSABendLine myLine)
          Function returns the preferred length of a given DisLine
 double getPresetAdjustment()
          Get the presetAdjustment attribute of the AbstractLayouter object
 MrLayout getRevMyLayouter()
          Get the revMyLayouter attribute of the AbstractLayouter object
 int getVertDist()
          Get the vertDist attribute of the AbstractLayouter object
protected  void innerLayout(FSAContainer currentClass)
          No comment provided by developer, please add a comment to improve documentation.
protected  boolean isLastCondition()
          Get the lastCondition attribute of the AbstractLayouter object
 void refreshOptions()
          Function refreshes the function settings for the AbstractLayouter
abstract  void reLayout(FSAContainer currentCanvas)
          This function needs to be implemented in the child-classes.
 void removeYou()
          No comment provided by developer, please add a comment to improve documentation.
protected  FSAObject searchStart(FSAContainer searchCanvas, boolean withVisited)
          searchStart searches for DisFrame on the searchCanvas, from which the reLayouter can start.
 int setHorizDist(int horizDist)
          Sets the horizDist attribute of the AbstractLayouter object
protected  boolean setLastCondition(boolean lastCondition)
          Sets the lastCondition attribute of the AbstractLayouter object
protected  void setLeft(int left, int pos, java.util.Vector rowDepths)
          Function set value at pos in vector rowDepths
 void setPresetAdjustment(double presetAdjustment)
          Sets the presetAdjustment attribute of the AbstractLayouter object
 void setRevMyLayouter(MrLayout revMyLayouter)
          Sets the revMyLayouter attribute of the AbstractLayouter object
 int setVertDist(int vertDist)
          Sets the vertDist attribute of the AbstractLayouter object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLayouter

protected AbstractLayouter()
Constructor of Class AbstractLayouter

Method Detail

isLastCondition

protected boolean isLastCondition()
Get the lastCondition attribute of the AbstractLayouter object

Returns:
The lastCondition value

setLastCondition

protected boolean setLastCondition(boolean lastCondition)
Sets the lastCondition attribute of the AbstractLayouter object

Parameters:
lastCondition - The new lastCondition value
Returns:
No description provided

getHorizDist

public int getHorizDist()
Get the horizDist attribute of the AbstractLayouter object

Returns:
The horizDist value

setHorizDist

public int setHorizDist(int horizDist)
Sets the horizDist attribute of the AbstractLayouter object

Parameters:
horizDist - The new horizDist value
Returns:
No description provided

getVertDist

public int getVertDist()
Get the vertDist attribute of the AbstractLayouter object

Returns:
The vertDist value

setVertDist

public int setVertDist(int vertDist)
Sets the vertDist attribute of the AbstractLayouter object

Parameters:
vertDist - The new vertDist value
Returns:
No description provided

refreshOptions

public void refreshOptions()
Function refreshes the function settings for the AbstractLayouter


getChild

protected FSAObject getChild(FSABend itemGrab)
Function searches for Child of a father class, connected by a grab

Parameters:
itemGrab - The grab which should be searched
Returns:
The grabbed to Frame

innerLayout

protected void innerLayout(FSAContainer currentClass)
                    throws java.lang.InterruptedException
No comment provided by developer, please add a comment to improve documentation.

Parameters:
currentClass - No description provided
Throws:
java.lang.InterruptedException - Exception description not provided

checkVisited

protected boolean checkVisited(java.lang.Object tocheckObject)
This method returns TRUE if a Object already is set as visited, the behavior of the method depends on the var lastCondition

Parameters:
tocheckObject - The object to be checked, needs to be a instance of DisFrame
Returns:
No description provided

searchStart

protected FSAObject searchStart(FSAContainer searchCanvas,
                                boolean withVisited)
searchStart searches for DisFrame on the searchCanvas, from which the reLayouter can start. This method only is invoked, if there is no DisFrame selected on searchCanvas. Not used by all layouters

Parameters:
searchCanvas - The Canvas to be searched
withVisited - The Toggle status of the visited condition (for performance reasons this value is toggled at each invocation of the layouter)
Returns:
No description provided

getLeft

protected int getLeft(int pos,
                      java.util.Vector rowDepths)
Function is responsible for the rowDepths vector, it returns the value of Element at position in the vector, if the size of the array is smaller as the requested element, the function adds one element and returns 0. Only for layouter, which layout in rows

Parameters:
pos - The position of the leftmost element
rowDepths - The rowDepths-Vector per reference (needed for recursion reasons)
Returns:
The left value

setLeft

protected void setLeft(int left,
                       int pos,
                       java.util.Vector rowDepths)
Function set value at pos in vector rowDepths

Parameters:
left - The new left value
pos - The new left value
rowDepths - The new left value

getFrame

public javax.swing.JFrame getFrame(FSAObject canvas)
Returns the frame where the wait cursor have to be set.

Parameters:
canvas - the canvas to be layouted.
Returns:
the highest frame.

reLayout

public abstract void reLayout(FSAContainer currentCanvas)
                       throws java.lang.InterruptedException
This function needs to be implemented in the child-classes.

Parameters:
currentCanvas - No description provided
Throws:
java.lang.InterruptedException - Exception description not provided

getRevMyLayouter

public MrLayout getRevMyLayouter()
Get the revMyLayouter attribute of the AbstractLayouter object

Returns:
The revMyLayouter value

setRevMyLayouter

public void setRevMyLayouter(MrLayout revMyLayouter)
Sets the revMyLayouter attribute of the AbstractLayouter object

Parameters:
revMyLayouter - The new revMyLayouter value

removeYou

public void removeYou()
No comment provided by developer, please add a comment to improve documentation.


getFromToFrame

protected FSAObject getFromToFrame(FSABendLine myLine,
                                   int what)
Function returns the frame at the one side of a Frame depending on the what-Parameter

Parameters:
myLine - The connecting Line
what - =1 front of bends, =2 back of bends
Returns:
The fromToFrame value

getPresetAdjustment

public double getPresetAdjustment()
Get the presetAdjustment attribute of the AbstractLayouter object

Returns:
The presetAdjustment value

setPresetAdjustment

public void setPresetAdjustment(double presetAdjustment)
Sets the presetAdjustment attribute of the AbstractLayouter object

Parameters:
presetAdjustment - The new presetAdjustment value

getPreferredLen

protected int getPreferredLen(FSABendLine myLine)
Function returns the preferred length of a given DisLine

Parameters:
myLine - The Line
Returns:
The preferredLen value