Class PolyLinkNumber

  extended by com.miginfocom.util.gfx.geometry.links.BoundsLinkNumber
      extended by com.miginfocom.util.gfx.geometry.links.ShapeLinkNumber
          extended by com.miginfocom.util.gfx.geometry.links.PolyLinkNumber
All Implemented Interfaces:
AtNumber, AtRefNumber, AtRefRangeNumber,

public class PolyLinkNumber
extends ShapeLinkNumber

Overrides ShapeLinkNumber only to make more efficient calculations since we can get a hold of the primitive x, y, width and height rather that requesting a new bounds object every time.

See Also:
Serialized Form

Field Summary
Fields inherited from class com.miginfocom.util.gfx.geometry.links.BoundsLinkNumber
align, dim, X, Y
Constructor Summary
PolyLinkNumber(PolygonShape shape, AtRefRangeNumber align, int dim)
          Constructor for a relative (percentage) value.
Method Summary
 boolean equals(java.lang.Object o)
protected  float getHorizontalValue(AtNumber align)
protected  float getVerticalValue(AtNumber align)
Methods inherited from class com.miginfocom.util.gfx.geometry.links.ShapeLinkNumber
getHorizontalValue, getShape, getVerticalValue, toString
Methods inherited from class com.miginfocom.util.gfx.geometry.links.BoundsLinkNumber
getAlign, getDimension, getIntValue, getIntValue, getIntValue, getValue, getValue, getValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public PolyLinkNumber(PolygonShape shape,
                      AtRefRangeNumber align,
                      int dim)
Constructor for a relative (percentage) value.

shape - The PolygonShape which's bounds to link to.
align - If the value that this link represents. Can be relative to the left, right or both bounds edges of the shape. The start and end position in dim will be ussed to get the value.
dim - The dimension. SwingConstants.HORIZONTAL or SwingConstants.VERTICAL.
Method Detail


protected float getHorizontalValue(AtNumber align)


protected float getVerticalValue(AtNumber align)


public boolean equals(java.lang.Object o)
equals in class ShapeLinkNumber

Copyright © 2009 MiG InfoCom AB. All Rights Reserved.