com.aspose.words

Class Underline

  • 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 apply formatting to emphasize it.
// 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("Aspose website", "http://www.aspose.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");

Field Summary
static final intNONE = 0
static final intSINGLE = 1
static final intWORDS = 2
static final intDOUBLE = 3
static final intDOTTED = 4
static final intTHICK = 6
static final intDASH = 7
static final intDASH_LONG = 39
static final intDOT_DASH = 9
static final intDOT_DOT_DASH = 10
static final intWAVY = 11
static final intDOTTED_HEAVY = 20
static final intDASH_HEAVY = 23
static final intDASH_LONG_HEAVY = 55
static final intDOT_DASH_HEAVY = 25
static final intDOT_DOT_DASH_HEAVY = 26
static final intWAVY_HEAVY = 27
static final intWAVY_DOUBLE = 43
 

    • Field Detail

      • 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