com.miginfocom.util.gfx.geometry.links
Class PolyLinkNumber

java.lang.Object
  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, java.io.Serializable

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

PolyLinkNumber

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

Parameters:
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

getHorizontalValue

protected float getHorizontalValue(AtNumber align)

getVerticalValue

protected float getVerticalValue(AtNumber align)

equals

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


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.