|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.cockpit.modeler.figures.layouter.AbstractTagLayouter
public abstract class AbstractTagLayouter
A tag layouter is responsible for laying out the sub figures of a tag. If a center figure is given, the direction of the tag will be determined by checking if the tag angle crosses the left, right, top or bottom lines of the center figure's display box. Otherwise, the direction will be determined according to the circle section that is determined by the angle. For square- or circle shaped figures, you don't need to provide a center figure. For rectangular or elliptic figures, however, it is recommended.
| Field Summary | |
|---|---|
protected int |
direction
Direction to which the tag currently faces (one of the EIGHT_* direction constants of the CircleConstants class) |
protected java.awt.Insets |
insets
Insets for each sub component. |
protected AbstractTagFigure |
tagFigure
Tag figure to layout |
| Constructor Summary | |
|---|---|
AbstractTagLayouter(AbstractTagFigure tagFigure)
Constructor. |
|
| Method Summary | |
|---|---|
abstract void |
applyDirection()
Initializes the layouter according to the current direction. |
void |
determineDirection()
Determines the direction of the tag by the angle of the associated figure and updates the layouter accordingly. |
java.awt.Insets |
getInsets()
Gets the insets for each sub component. |
abstract boolean |
isVerticalLayouter()
Checks if the orientation of the tag is vertical or horizontal. |
void |
setDirection(int direction)
Sets the direction to which the tag currently faces and updates the layouter accordingly. |
void |
setInsets(java.awt.Insets insets)
Sets the insets for each sub component. |
protected void |
setupLayouter()
Sets up the layouter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openbp.cockpit.modeler.figures.layouter.TagLayouter |
|---|
calculateSize, performLayout |
| Field Detail |
|---|
protected java.awt.Insets insets
protected int direction
CircleConstants class)
protected AbstractTagFigure tagFigure
| Constructor Detail |
|---|
public AbstractTagLayouter(AbstractTagFigure tagFigure)
tagFigure - Tag to lay out| Method Detail |
|---|
protected void setupLayouter()
public abstract void applyDirection()
public abstract boolean isVerticalLayouter()
TagLayouter
isVerticalLayouter in interface TagLayouterpublic java.awt.Insets getInsets()
getInsets in interface TagLayouterpublic void setInsets(java.awt.Insets insets)
setInsets in interface TagLayouterinsets - New spacing dimensionspublic void setDirection(int direction)
setDirection in interface TagLayouterdirection - One of the eighth direction constants of the CircleConstants class (EIGHTH_*)public void determineDirection()
determineDirection in interface TagLayouter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||