java.lang.Object
com.aspose.words.Underline
public class Underline
- extends java.lang.Object
Utility class containing constants.
Indicates type of the underline applied to a font.
Example:
Shows how to insert a hyperlink field.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.write("For more information, please visit the ");
// Insert a hyperlink and emphasize it with custom formatting.
// The hyperlink will be a clickable piece of text which will take us to the location specified in the URL.
builder.getFont().setColor(Color.BLUE);
builder.getFont().setUnderline(Underline.SINGLE);
builder.insertHyperlink("Google website", "https://www.google.com", false);
builder.getFont().clearFormatting();
builder.writeln(".");
// Ctrl + left clicking the link in the text in Microsoft Word will take us to the URL via a new web browser window.
doc.save(getArtifactsDir() + "DocumentBuilder.InsertHyperlink.docx");
NONE = 0 | |
public static final int NONE |
-
SINGLE = 1 | |
public static final int SINGLE |
-
WORDS = 2 | |
public static final int WORDS |
-
DOUBLE = 3 | |
public static final int DOUBLE |
-
DOTTED = 4 | |
public static final int DOTTED |
-
THICK = 6 | |
public static final int THICK |
-
DASH = 7 | |
public static final int DASH |
-
DASH_LONG = 39 | |
public static final int DASH_LONG |
-
DOT_DASH = 9 | |
public static final int DOT_DASH |
-
DOT_DOT_DASH = 10 | |
public static final int DOT_DOT_DASH |
-
WAVY = 11 | |
public static final int WAVY |
-
DOTTED_HEAVY = 20 | |
public static final int DOTTED_HEAVY |
-
DASH_HEAVY = 23 | |
public static final int DASH_HEAVY |
-
DASH_LONG_HEAVY = 55 | |
public static final int DASH_LONG_HEAVY |
-
DOT_DASH_HEAVY = 25 | |
public static final int DOT_DASH_HEAVY |
-
DOT_DOT_DASH_HEAVY = 26 | |
public static final int DOT_DOT_DASH_HEAVY |
-
WAVY_HEAVY = 27 | |
public static final int WAVY_HEAVY |
-
WAVY_DOUBLE = 43 | |
public static final int WAVY_DOUBLE |
-
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.