edu.umd.cs.piccolox.swing
Class SwingLayoutNode.Anchor.AbstractAnchor
java.lang.Object
edu.umd.cs.piccolox.swing.SwingLayoutNode.Anchor.AbstractAnchor
- All Implemented Interfaces:
- SwingLayoutNode.Anchor
- Enclosing interface:
- SwingLayoutNode.Anchor
public abstract static class SwingLayoutNode.Anchor.AbstractAnchor
- extends Object
- implements SwingLayoutNode.Anchor
Method Summary |
protected static double |
centerX(PNode node,
double x,
double width)
Returns the x at which the given node would need to be placed so
that its center was in the middle of the horizontal segment
defined by x and width. |
protected static double |
centerY(PNode node,
double y,
double height)
Returns the y at which the given node would need to be placed so
that its center was in the middle of the vertical segment defined
by y and h. |
protected static double |
east(PNode node,
double x,
double width)
Returns the x at which the given node would need to be placed so
that its right side was against the right side of the horizontal
range defined. |
protected static double |
north(PNode node,
double y,
double height)
Returns the y at which the given node would need to be placed so
that its top was against the top of the vertical segment defined. |
protected static double |
south(PNode node,
double y,
double height)
Returns the y at which the given node would need to be placed so
that its bottom was against the bottom of the vertical range
defined. |
protected static double |
west(PNode node,
double x,
double width)
Returns the x at which the given node would need to be placed so
that its left side was against the left side of the horizontal
range defined. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SwingLayoutNode.Anchor.AbstractAnchor
public SwingLayoutNode.Anchor.AbstractAnchor()
centerX
protected static double centerX(PNode node,
double x,
double width)
- Returns the x at which the given node would need to be placed so
that its center was in the middle of the horizontal segment
defined by x and width.
- Parameters:
node
- node which is being analyzedx
- x component of horizontal line segmentwidth
- width of horizontal line segment
- Returns:
- x at which node would need to be placed so that its
center matched the center of the line segment
centerY
protected static double centerY(PNode node,
double y,
double height)
- Returns the y at which the given node would need to be placed so
that its center was in the middle of the vertical segment defined
by y and h.
- Parameters:
node
- node which is being analyzedy
- y component of horizontal line segmentheight
- height of vertical line segment
- Returns:
- y at which node would need to be placed so that its
center matched the center of the line segment
north
protected static double north(PNode node,
double y,
double height)
- Returns the y at which the given node would need to be placed so
that its top was against the top of the vertical segment defined.
- Parameters:
node
- node which is being analyzedy
- y component of horizontal line segmentheight
- height of vertical line segment
- Returns:
- y at which node would need to be placed so that its top
matched the start of the line segment (y)
south
protected static double south(PNode node,
double y,
double height)
- Returns the y at which the given node would need to be placed so
that its bottom was against the bottom of the vertical range
defined.
- Parameters:
node
- node which is being analyzedy
- y component of vertical rangeheight
- height of vertical range
- Returns:
- y at which node would need to be placed so that its
bottom matched the bottom of the range
east
protected static double east(PNode node,
double x,
double width)
- Returns the x at which the given node would need to be placed so
that its right side was against the right side of the horizontal
range defined.
- Parameters:
node
- node which is being analyzedx
- x component of horizontal rangewidth
- width of horizontal range
- Returns:
- x at which node would need to be placed so that its right
side touched the right side of the range defined.
west
protected static double west(PNode node,
double x,
double width)
- Returns the x at which the given node would need to be placed so
that its left side was against the left side of the horizontal
range defined.
- Parameters:
node
- node which is being analyzedx
- x component of horizontal rangewidth
- width of horizontal range
- Returns:
- x at which node would need to be placed so that its left
side touched the left side of the range defined (x)
Copyright © 1995-2010 Piccolo2D. All Rights Reserved.