Layout
Leave feedback
On this page
All Implemented Interfaces: java.io.Serializable
public interface Layout extends Serializable
Represents a layout contained by a CAD drawing.
The Layout interface defines the contract for accessing and manipulating a layout within a CAD drawing in the GroupDocs.Viewer component. It provides methods to retrieve information such as the layout name, dimensions, and other properties.
Example usage:
try (Viewer viewer = new Viewer("document.mpt")) {
CadViewInfo viewInfo = (CadViewInfo) viewer.getViewInfo(ViewInfoOptions.forHtmlView());
List layouts = viewInfo.getLayouts();
for (Layout layout : layouts) {
// Use the layout object for further operations
}
}
Note: The default implementation of this interface is LayoutImpl.
| Method | Description |
|---|---|
| getName() | Retrieves the name of the layout. |
| setName(String name) | Sets the name of the layout. |
| getWidth() | Retrieves the width of the layout. |
| setWidth(double width) | Sets the width of the layout. |
| getHeight() | Retrieves the height of the layout. |
| setHeight(double height) | Sets the height of the layout. |
| equals(Object other) | Checks if this object is equal to the provided object. |
public abstract String getName()
Retrieves the name of the layout.
Returns: java.lang.String - the name of the layout.
public abstract void setName(String name)
Sets the name of the layout.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String | The name to set for the layout. |
public abstract double getWidth()
Retrieves the width of the layout.
Returns: double - the width of the layout.
public abstract void setWidth(double width)
Sets the width of the layout.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| width | double | The width to set for the layout. |
public abstract double getHeight()
Retrieves the height of the layout.
Returns: double - the height of the layout.
public abstract void setHeight(double height)
Sets the height of the layout.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| height | double | The height to set for the layout. |
public abstract boolean equals(Object other)
Checks if this object is equal to the provided object.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | java.lang.Object | The object to compare. |
Returns: boolean - true if the objects are equal, false otherwise.
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.