Size
Leave feedback
On this page
Inheritance: java.lang.Object
public class Size
Represents the size of document in comparison.
Example usage:
try (Comparer comparer = new Comparer(sourceFile)) {
comparer.add(targetFile);
final Size originalSize = new Size(100, 200);
StyleSettings styleSettings = new StyleSettings();
styleSettings.setOriginalSize(originalSize);
final CompareOptions compareOptions = new CompareOptions();
compareOptions.setInsertedItemStyle(styleSettings);
comparer.compare(resultFile, compareOptions);
}
| Constructor | Description |
|---|---|
| Size() | Initializes a new instance of the Size class. |
| Size(int width, int height) | Initializes a new instance of the Size class with width and height of a document. |
| Method | Description |
|---|---|
| getWidth() | Gets the width of an original document. |
| setWidth(int value) | Sets the width of an original document. |
| getHeight() | Gets the height of an original document. |
| setHeight(int value) | Sets the height of an original document. |
public Size()
Initializes a new instance of the Size class.
public Size(int width, int height)
Initializes a new instance of the Size class with width and height of a document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| width | int | |
| height | int |
public final int getWidth()
Gets the width of an original document.
Returns: int - the width of the document
public final void setWidth(int value)
Sets the width of an original document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int | The width of the document |
public final int getHeight()
Gets the height of an original document.
Returns: int - the height of the document
public final void setHeight(int value)
Sets the height of an original document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int | The height of the document |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.