[]
        
(Showing Draft Content)

IAdjustments

Interface IAdjustments

All Superinterfaces:
Iterable<Double>

public interface IAdjustments extends Iterable<Double>
Represents a collection of adjustment values for a specified AutoShape or connector.

An IAdjustments object provides access to the adjustment points that control the geometry of a shape. The number of available adjustment points depends on the current shape type. Use getCount() to determine how many adjustment points are available, get(int) to read an adjustment value, and set(int,double) to modify an adjustment value.


 IShape shape = worksheet.getShapes().addShape(AutoShapeType.Chevron, 10, 10, 120, 80);
 IAdjustments adjustments = shape.getAdjustments();
 double value = adjustments.get(0);
 adjustments.set(0, value * 0.8);
 
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    get(int index)
    Gets the value of the specified adjustment point.
    int
    Gets the number of adjustment points in this collection.
    void
    set(int index, double value)
    Sets the value of the specified adjustment point.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • getCount

      int getCount()
      Gets the number of adjustment points in this collection.

      Adjustment points define the editable geometry values for the associated AutoShape or connector obtained from IShape.getAdjustments().

      
       IShape shape = worksheet.getShapes().addShape(AutoShapeType.Chevron, 10, 10, 120, 80);
       IAdjustments adjustments = shape.getAdjustments();
       int count = adjustments.getCount();
       
      Returns:
      The count of adjustment points.
    • get

      double get(int index)
      Gets the value of the specified adjustment point.

      Adjustment points control the geometry of an AutoShape or connector. Use getCount() to determine the available adjustment point indexes for the current shape before calling this method.

      
       IShape shape = worksheet.getShapes().addShape(AutoShapeType.Chevron, 10, 10, 120, 80);
       IAdjustments adjustments = shape.getAdjustments();
       double adjustment = adjustments.get(0);
       
      Parameters:
      index - The zero-based index of the adjustment point in this collection.
      Returns:
      The value of the specified adjustment point.
    • set

      void set(int index, double value)
      Sets the value of the specified adjustment point.

      Adjustment points control the geometry of an AutoShape or connector. Use getCount() to determine the available adjustment point indexes for the current shape before calling this method.

      
       IShape shape = worksheet.getShapes().addShape(AutoShapeType.Chevron, 10, 10, 120, 80);
       IAdjustments adjustments = shape.getAdjustments();
       adjustments.set(0, 0.5);
       
      Parameters:
      index - The zero-based index of the adjustment point in this collection.
      value - The value of the adjustment point.