public enum TextOverflowMode extends Enum<TextOverflowMode>
The TextOverflowMode enum represents different modes for handling text overflow in the GroupDocs.Viewer component. It provides a set of predefined options that can be used to control how text is displayed when it exceeds the available space in cells during the rendering of spreadsheet documents into HTML. For details, see the documentation.
Example usage:
HtmlViewOptions htmlViewOptions = HtmlViewOptions.forEmbeddedResources();
htmlViewOptions.setSpreadsheetOptions(SpreadsheetOptions.forOnePagePerSheet());
htmlViewOptions.getSpreadsheetOptions().setTextOverflowMode(TextOverflowMode.HIDE_TEXT);
try (Viewer viewer = new Viewer("document.xlsx")) {
viewer.view(htmlViewOptions);
// Use the viewer object for further operations
}
Viewer,
HtmlViewOptions,
SpreadsheetOptions| Enum Constant and Description |
|---|
AUTO_FIT_COLUMN
Expand columns to fit the text.
|
HIDE_TEXT
Hide the overflow text.
|
OVERLAY
Overlay next cells even if they are not empty.
|
OVERLAY_IF_NEXT_IS_EMPTY
Overlay next cells only if they are empty.
|
| Modifier and Type | Method and Description |
|---|---|
static TextOverflowMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TextOverflowMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TextOverflowMode AUTO_FIT_COLUMN
Expand columns to fit the text. This mode automatically adjusts the width of the columns to accommodate the overflowing text.
For details, see the documentation.public static final TextOverflowMode HIDE_TEXT
Hide the overflow text. This mode hides the overflowing text, preventing it from being displayed.
For details, see the documentation.public static final TextOverflowMode OVERLAY
Overlay next cells even if they are not empty. This mode allows the text to overflow into the adjacent cells, regardless of their content.
For details, see the documentation.public static final TextOverflowMode OVERLAY_IF_NEXT_IS_EMPTY
Overlay next cells only if they are empty. This mode allows the text to overflow into the adjacent cells only if those cells are empty.
For details, see the documentation.public static TextOverflowMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static TextOverflowMode[] values()
for (TextOverflowMode c : TextOverflowMode.values()) System.out.println(c);
Copyright © 2024. All rights reserved.