org.openbp.cockpit.modeler.figures.layouter
Class HorizontalLayouter

java.lang.Object
  extended by org.openbp.cockpit.modeler.figures.layouter.AbstractTagLayouter
      extended by org.openbp.cockpit.modeler.figures.layouter.HorizontalLayouter
All Implemented Interfaces:
TagLayouter

public class HorizontalLayouter
extends AbstractTagLayouter

Horizontal layouter.

Author:
Stephan Moritz

Field Summary
protected  Orientation hAlign
          Horizontal alignment (Orientation.LEFT/Orientation.RIGHT)
protected  Orientation vAlign
          Vertical alignment (Orientation.TOP/Orientation.BOTTOM/Orientation.CENTER)
 
Fields inherited from class org.openbp.cockpit.modeler.figures.layouter.AbstractTagLayouter
direction, insets, tagFigure
 
Constructor Summary
HorizontalLayouter(AbstractTagFigure tagFigure)
          Constructor.
 
Method Summary
 void applyDirection()
          Initializes the layouter according to the current direction.
 java.awt.Rectangle calculateSize()
          Calculates the dimensions of the figure by simulating the layout process.
 boolean isVerticalLayouter()
          Checks if the orientation of the tag is vertical or horizontal.
 void performLayout(java.awt.Rectangle box)
          Performs the layout of the figure.
 
Methods inherited from class org.openbp.cockpit.modeler.figures.layouter.AbstractTagLayouter
determineDirection, getInsets, setDirection, setInsets, setupLayouter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vAlign

protected Orientation vAlign
Vertical alignment (Orientation.TOP/Orientation.BOTTOM/Orientation.CENTER)


hAlign

protected Orientation hAlign
Horizontal alignment (Orientation.LEFT/Orientation.RIGHT)

Constructor Detail

HorizontalLayouter

public HorizontalLayouter(AbstractTagFigure tagFigure)
Constructor.

Parameters:
tagFigure - Tag to lay out
Method Detail

applyDirection

public void applyDirection()
Description copied from class: AbstractTagLayouter
Initializes the layouter according to the current direction.

Specified by:
applyDirection in class AbstractTagLayouter

isVerticalLayouter

public boolean isVerticalLayouter()
Description copied from interface: TagLayouter
Checks if the orientation of the tag is vertical or horizontal.

Specified by:
isVerticalLayouter in interface TagLayouter
Specified by:
isVerticalLayouter in class AbstractTagLayouter
Returns:
true; The vertical layouter is always vertically oriented

calculateSize

public java.awt.Rectangle calculateSize()
Description copied from interface: TagLayouter
Calculates the dimensions of the figure by simulating the layout process.

Returns:
The new dimensions of the figure

performLayout

public void performLayout(java.awt.Rectangle box)
Description copied from interface: TagLayouter
Performs the layout of the figure.

Parameters:
box - Desired display box of the figure


Copyright © 2011. All Rights Reserved.