com.f1j.ss
Interface ShapeAnchor


public interface ShapeAnchor
extends ShapeAnchor

Interface to maintain positioning information on a shape in the spreadsheet.


Inner Class Summary
static class ShapeAnchor.EPlacement
          The placement enumeration
 
Field Summary
static ShapeAnchor.EPlacement eFreeFloating
          Free Floating - neither move nor size with cells.
static ShapeAnchor.EPlacement eMove
          Move with cells.
static ShapeAnchor.EPlacement eMoveAndSize
          Move and size with cells.
 
Method Summary
 double getBottom()
          Returns a value representing the bottom side of the client anchor.
 double getLeft()
          Returns a value representing the left side of the client anchor.
 ShapeAnchor.EPlacement getPlacementStyle()
          Returns the placement style.
 double getRight()
          Returns a value representing the right side of the client anchor.
 double getTop()
          Returns a value representing the top side of the client anchor.
 void setPlacementStyle(ShapeAnchor.EPlacement placementStyle)
          Sets the placement style for the shape.
 void setPosition(double left, double top, double right, double bottom)
          Sets the position.
 

Field Detail

eFreeFloating

public static final ShapeAnchor.EPlacement eFreeFloating
Free Floating - neither move nor size with cells. Changes in the cells location and size underneath the shape have no affect on the location or size of the shape.

eMove

public static final ShapeAnchor.EPlacement eMove
Move with cells. If the cell that contains the upper left corner moves then the shape moves along with it.

eMoveAndSize

public static final ShapeAnchor.EPlacement eMoveAndSize
Move and size with cells. If the cell that contains the upper left corner moves then the shape moves along with it. If any of cells underneath the shape changes in size the shape also changes in size relatively.
Method Detail

getLeft

public double getLeft()
Returns a value representing the left side of the client anchor. The whole part of the value is the column containing the left side, and the fractional part of the value is the position of the left side within that column.
Returns:
the left side of the client anchor.

getPlacementStyle

public ShapeAnchor.EPlacement getPlacementStyle()
Returns the placement style.
Returns:
the ShapeAnchor.EPlacement style.
     eFreeFloating
     eMove
     eMoveAndSize

getRight

public double getRight()
Returns a value representing the right side of the client anchor. The whole part of the value is the column containing the right side, and the fractional part of the value is the position of the right side within that column.
Returns:
the right side of the client anchor.

getTop

public double getTop()
Returns a value representing the top side of the client anchor. The whole part of the value is the row containing the top side, and the fractional part of the value is the position of the top side within that row.
Returns:
the top side of the client anchor.

getBottom

public double getBottom()
Returns a value representing the bottom side of the client anchor. The whole part of the value is the row containing the bottom side, and the fractional part of the value is the position of the bottom side within that row.
Returns:
the bottom side of the client anchor.

setPlacementStyle

public void setPlacementStyle(ShapeAnchor.EPlacement placementStyle)
Sets the placement style for the shape.
Parameters:
placementStyle - EPlacement.
     eFreeFloating
     eMove
     eMoveAndSize

setPosition

public void setPosition(double left,
                        double top,
                        double right,
                        double bottom)
                 throws InvalidArgumentException
Sets the position.
Parameters:
left - left position. The whole part of the value is the column containing the left side, and the fractional part of the value is the position of the left side within that column.
top - top position. The whole part of the value is the row containing the top side, and the fractional part of the value is the position of the top side within that row.
right - right position. The whole part of the value is the column containing the right side, and the fractional part of the value is the position of the right side within that column.
bottom - bottom position. The whole part of the value is the row containing the bottom side, and the fractional part of the value is the position of the bottom side within that row.