de.uni_paderborn.fujaba.fsa.swing
Class OvalGrabLayouter

java.lang.Object
  extended byde.uni_paderborn.fujaba.fsa.swing.GrabLayouter
      extended byde.uni_paderborn.fujaba.fsa.swing.OvalGrabLayouter

public class OvalGrabLayouter
extends GrabLayouter

THE choice for oval targets. Cannot layout anything else

Version:
$Revision: 1.14 $
Author:
$Author: lowende $

Field Summary
private static OvalGrabLayouter layouter
          No comment provided by developer, please add a comment to improve documentation.
 
Fields inherited from class de.uni_paderborn.fujaba.fsa.swing.GrabLayouter
TARGET_PROPERTY
 
Constructor Summary
private OvalGrabLayouter()
          Constructor for class OvalGrabLayouter
 
Method Summary
static GrabLayouter get()
           
protected  double[] getPreferredLayoutInformation(JGrab grab)
          the preferred orientation and alignment are determined by the angle of the first line of the grab to the center of the circle
 void layout(GrabManager manager)
          Layouts all the grabs.
protected  void layoutGrab(GrabManager manager, JGrab grab, OvalBorder border)
          Layout the Grab around the oval target.
private  OvalBorder searchForOvalBorder(javax.swing.border.Border border)
          Searches for the first OvalBorder from outside by recursing into CompundBorders.
 
Methods inherited from class de.uni_paderborn.fujaba.fsa.swing.GrabLayouter
getDefaultLayouter, getDefaultLayouterClass, getLayouter, registerLayouterWithJComponent, setDefaultLayouterClass, unregisterLayouterFromJComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layouter

private static OvalGrabLayouter layouter
No comment provided by developer, please add a comment to improve documentation.

Constructor Detail

OvalGrabLayouter

private OvalGrabLayouter()
Constructor for class OvalGrabLayouter

Method Detail

get

public static GrabLayouter get()
Returns:
the singleton instance.

searchForOvalBorder

private OvalBorder searchForOvalBorder(javax.swing.border.Border border)
Searches for the first OvalBorder from outside by recursing into CompundBorders.

Parameters:
border - the border to start search at.
Returns:
the outmost OvalBorder or null if no OvalBorder was found

layout

public void layout(GrabManager manager)
Layouts all the grabs. The manager's target is checked for supported objects. These objects must have oval shape and currently are JOval-objects or objects with an outermost border of type OvalBorder.

Specified by:
layout in class GrabLayouter
Parameters:
manager - No description provided
See Also:
GrabManager.getTarget(), layoutGrab(de.uni_paderborn.fujaba.fsa.swing.GrabManager, de.uni_paderborn.fujaba.fsa.swing.JGrab, de.uni_paderborn.fujaba.fsa.swing.border.OvalBorder)

layoutGrab

protected void layoutGrab(GrabManager manager,
                          JGrab grab,
                          OvalBorder border)
Layout the Grab around the oval target.

Parameters:
manager - No description provided
grab - No description provided
border - No description provided
See Also:
getPreferredLayoutInformation(de.uni_paderborn.fujaba.fsa.swing.JGrab)

getPreferredLayoutInformation

protected double[] getPreferredLayoutInformation(JGrab grab)
the preferred orientation and alignment are determined by the angle of the first line of the grab to the center of the circle

Overrides:
getPreferredLayoutInformation in class GrabLayouter
Parameters:
grab - No description provided
Returns:
The preferredLayoutInformation value
See Also:
JGrab.setLayoutOrientation(de.uni_paderborn.fujaba.fsa.swing.Direction), JGrab.setLayoutAlignment(double), JBend.iteratorOfLines()