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:

Inserts a hyperlink into a document using DocumentBuilder.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.write("Please make sure to visit ");

// Specify font formatting for the hyperlink.
builder.getFont().setColor(Color.BLUE);
builder.getFont().setUnderline(Underline.SINGLE);
// Insert the link.
builder.insertHyperlink("Aspose Website", "http://www.aspose.com", false);

// Revert to default formatting.
builder.getFont().clearFormatting();

builder.write(" for more information.");

doc.save(getMyDir() + "\\Artifacts\\DocumentBuilder.InsertHyperlink.doc");

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