com.aspose.words
Class Adjustment

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

public class Adjustment 
extends java.lang.Object

Represents adjustment 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
java.lang.StringgetName()
           Gets the name of the adjustment.
intgetValue()
voidsetValue(int value)
           Gets or sets the raw value of the adjustment.
 

Property Getters/Setters Detail

getName

public java.lang.String getName()
Gets the name of the adjustment.

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");

getValue/setValue

public int getValue() / public void setValue(int value)
Gets or sets the raw value of the adjustment. An adjust value is simply a guide that has a value based formula specified. That is, no calculation takes place for an adjust value guide. Instead, this guide specifies a parameter value that is used for calculations within the shape guides.

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.