TextElement
Leave feedback
On this page
public interface TextElement<T>
Represents a generic text element.
The TextElement interface defines the contract for a generic text element in the GroupDocs.Viewer component. It represents a text element with a specific type and provides methods to access and manipulate the text content.
Note: The default implementation of this interface is TextElementImpl.
| Method | Description |
|---|---|
| getValue() | Retrieves the value of the text element. |
| setValue(T value) | Sets the value of the text element. |
| getX() | Retrieves the X coordinate of the highest left point on the page layout where the rectangle that contains the element begins. |
| setX(double x) | Sets the X coordinate of the highest left point on the page layout where the rectangle that contains the element begins. |
| getY() | Retrieves the Y coordinate of the highest left point on the page layout where the rectangle that contains the element begins. |
| setY(double y) | Sets the Y coordinate of the highest left point on the page layout where the rectangle that contains the element begins. |
| getWidth() | Retrieves the width of the rectangle that contains the element (in pixels). |
| setWidth(double width) | Sets the width of the rectangle that contains the element (in pixels). |
| getHeight() | Retrieves the height of the rectangle that contains the element (in pixels). |
| setHeight(double height) | Sets the height of the rectangle that contains the element (in pixels). |
public abstract T getValue()
Retrieves the value of the text element.
Returns: T - the value of the text element.
public abstract void setValue(T value)
Sets the value of the text element.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | T | The new value to be set for the text element. |
public abstract double getX()
Retrieves the X coordinate of the highest left point on the page layout where the rectangle that contains the element begins.
Returns: double - the X coordinate of the starting point.
public abstract void setX(double x)
Sets the X coordinate of the highest left point on the page layout where the rectangle that contains the element begins.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| x | double | The new X coordinate. |
public abstract double getY()
Retrieves the Y coordinate of the highest left point on the page layout where the rectangle that contains the element begins.
Returns: double - the Y coordinate of the starting point.
public abstract void setY(double y)
Sets the Y coordinate of the highest left point on the page layout where the rectangle that contains the element begins.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| y | double | The new Y coordinate. |
public abstract double getWidth()
Retrieves the width of the rectangle that contains the element (in pixels).
Returns: double - the width of the rectangle.
public abstract void setWidth(double width)
Sets the width of the rectangle that contains the element (in pixels).
Parameters:
| Parameter | Type | Description |
|---|---|---|
| width | double | The new width. |
public abstract double getHeight()
Retrieves the height of the rectangle that contains the element (in pixels).
Returns: double - the height of the rectangle.
public abstract void setHeight(double height)
Sets the height of the rectangle that contains the element (in pixels).
Parameters:
| Parameter | Type | Description |
|---|---|---|
| height | double | The new height. |
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.