com.aspose.words
Class AdjustmentCollection

java.lang.Object
    extended by com.aspose.words.AdjustmentCollection

public class AdjustmentCollection 
extends java.lang.Object

Represents a read-only collection of Adjustment adjust values that are applied to the specified shape.

Example:

Shows how to work with adjustment raw values.
Document doc = new Document(getMyDir() + "Rounded rectangle shape.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);

AdjustmentCollection adjustments = shape.getAdjustments();
Assert.assertEquals(1, adjustments.getCount());

Adjustment adjustment = adjustments.get(0);
Assert.assertEquals("adj", adjustment.getName());
Assert.assertEquals(16667, adjustment.getValue());

adjustment.setValue(30000);

doc.save(getArtifactsDir() + "Shape.Adjustments.docx");

Property Getters/Setters Summary
intgetCount()
           Gets the number of elements contained in the collection.
Adjustmentget(int index)
           Returns an adjustment at the specified index.
 

Property Getters/Setters Detail

getCount

public int getCount()
Gets the number of elements contained in the collection.

Example:

Shows how to work with adjustment raw values.
Document doc = new Document(getMyDir() + "Rounded rectangle shape.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);

AdjustmentCollection adjustments = shape.getAdjustments();
Assert.assertEquals(1, adjustments.getCount());

Adjustment adjustment = adjustments.get(0);
Assert.assertEquals("adj", adjustment.getName());
Assert.assertEquals(16667, adjustment.getValue());

adjustment.setValue(30000);

doc.save(getArtifactsDir() + "Shape.Adjustments.docx");

get

public Adjustment get(int index)
Returns an adjustment at the specified index.
Parameters:
index - An index into the collection.

Example:

Shows how to work with adjustment raw values.
Document doc = new Document(getMyDir() + "Rounded rectangle shape.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);

AdjustmentCollection adjustments = shape.getAdjustments();
Assert.assertEquals(1, adjustments.getCount());

Adjustment adjustment = adjustments.get(0);
Assert.assertEquals("adj", adjustment.getName());
Assert.assertEquals(16667, adjustment.getValue());

adjustment.setValue(30000);

doc.save(getArtifactsDir() + "Shape.Adjustments.docx");

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.