public class AdjustmentCollection
extends java.lang.Object
Adjustment adjust values that are applied to the specified shape.
Examples:
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");
| Modifier and Type | Method and Description |
|---|---|
Adjustment |
get(int index)
Returns an adjustment at the specified index.
|
int |
getCount()
Gets the number of elements contained in the collection.
|
public Adjustment get(int index)
Examples:
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");
index - An index into the collection.public int getCount()
Examples:
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");