javax.swing.text
Class StyleConstants

java.lang.Object
  extended by javax.swing.text.StyleConstants
Direct Known Subclasses:
StyleConstants.CharacterConstants, StyleConstants.ColorConstants, StyleConstants.FontConstants, StyleConstants.ParagraphConstants

public class StyleConstants
extends Object

Represents standard attribute keys. This class also contains a set of useful static utility methods for querying and populating an AttributeSet.

Since:
1.2

Nested Class Summary
static class StyleConstants.CharacterConstants
          A set of keys for attributes that apply to characters.
static class StyleConstants.ColorConstants
          A set of keys for attributes that relate to colors.
static class StyleConstants.FontConstants
          A set of keys for attributes that apply to fonts.
static class StyleConstants.ParagraphConstants
          A set of keys for attributes that apply to paragraphs.
 
Field Summary
static int ALIGN_CENTER
          A value representing center alignment for the StyleConstants.ParagraphConstants.Alignment attribute.
static int ALIGN_JUSTIFIED
          A value representing ful justification for the StyleConstants.ParagraphConstants.Alignment attribute.
static int ALIGN_LEFT
          A value representing left alignment for the StyleConstants.ParagraphConstants.Alignment attribute.
static int ALIGN_RIGHT
          A value representing right alignment for the StyleConstants.ParagraphConstants.Alignment attribute.
static Object Alignment
          An alias for StyleConstants.ParagraphConstants.Alignment.
static Object Background
          An alias for StyleConstants.CharacterConstants.Background.
static Object BidiLevel
          An alias for StyleConstants.CharacterConstants.BidiLevel.
static Object Bold
          An alias for StyleConstants.CharacterConstants.Bold.
static Object ComponentAttribute
          An alias for StyleConstants.CharacterConstants.ComponentAttribute.
static String ComponentElementName
           
static Object ComposedTextAttribute
           
static Object Family
          An alias for StyleConstants.CharacterConstants.Family.
static Object FirstLineIndent
          An alias for StyleConstants.ParagraphConstants.FirstLineIndent.
static Object FontFamily
          An alias for StyleConstants.CharacterConstants.Family.
static Object FontSize
          An alias for StyleConstants.CharacterConstants.Size.
static Object Foreground
          An alias for StyleConstants.CharacterConstants.Foreground.
static Object IconAttribute
          An alias for StyleConstants.CharacterConstants.IconAttribute.
static String IconElementName
           
static Object Italic
          An alias for StyleConstants.CharacterConstants.Italic.
static Object LeftIndent
          An alias for StyleConstants.ParagraphConstants.LeftIndent.
static Object LineSpacing
          An alias for StyleConstants.ParagraphConstants.LineSpacing.
static Object ModelAttribute
           
static Object NameAttribute
           
static Object Orientation
          An alias for StyleConstants.ParagraphConstants.Orientation.
static Object ResolveAttribute
           
static Object RightIndent
          An alias for StyleConstants.ParagraphConstants.RightIndent.
static Object Size
          An alias for StyleConstants.CharacterConstants.Size.
static Object SpaceAbove
          An alias for StyleConstants.ParagraphConstants.SpaceAbove.
static Object SpaceBelow
          An alias for StyleConstants.ParagraphConstants.SpaceBelow.
static Object StrikeThrough
          An alias for StyleConstants.CharacterConstants.StrikeThrough.
static Object Subscript
          An alias for StyleConstants.CharacterConstants.Subscript.
static Object Superscript
          An alias for StyleConstants.CharacterConstants.Superscript.
static Object TabSet
          An alias for StyleConstants.ParagraphConstants.TabSet.
static Object Underline
          An alias for StyleConstants.CharacterConstants.Underline.
 
Method Summary
static int getAlignment(AttributeSet a)
          Returns the alignment specified in the given attributes, or ALIGN_LEFT if no alignment is specified.
static Color getBackground(AttributeSet a)
          Returns the background color specified in the given attributes, or Color.BLACK if no background color is specified.
static int getBidiLevel(AttributeSet a)
          Returns the bidi level specified in the given attributes, or 0 if no bidi level is specified.
static Component getComponent(AttributeSet a)
          Returns the component specified in the given attributes, or null if no component is specified.
static float getFirstLineIndent(AttributeSet a)
          Returns the indentation specified in the given attributes, or 0.0f if no indentation is specified.
static String getFontFamily(AttributeSet a)
          Returns the font family specified in the given attributes, or Monospaced if no font family is specified.
static int getFontSize(AttributeSet a)
          Returns the font size specified in the given attributes, or 12 if no font size is specified.
static Color getForeground(AttributeSet a)
          Returns the foreground color specified in the given attributes, or Color.BLACK if no foreground color is specified.
static Icon getIcon(AttributeSet a)
          Returns the icon specified in the given attributes, or null if no icon is specified.
static float getLeftIndent(AttributeSet a)
          Returns the left indentation specified in the given attributes, or 0.0f if no left indentation is specified.
static float getLineSpacing(AttributeSet a)
          Returns the line spacing specified in the given attributes, or 0.0f if no line spacing is specified.
static float getRightIndent(AttributeSet a)
          Returns the right indentation specified in the given attributes, or 0.0f if no right indentation is specified.
static float getSpaceAbove(AttributeSet a)
          Returns the 'space above' specified in the given attributes, or 0.0f if no 'space above' is specified.
static float getSpaceBelow(AttributeSet a)
          Returns the 'space below' specified in the given attributes, or 0.0f if no 'space below' is specified.
static TabSet getTabSet(AttributeSet a)
          Returns the tab set specified in the given attributes, or null if no tab set is specified.
static boolean isBold(AttributeSet a)
          Returns the value of the bold flag in the given attributes, or false if no bold flag is specified.
static boolean isItalic(AttributeSet a)
          Returns the value of the italic flag in the given attributes, or false if no italic flag is specified.
static boolean isStrikeThrough(AttributeSet a)
          Returns the value of the strike-through flag in the given attributes, or false if no strike-through flag is specified.
static boolean isSubscript(AttributeSet a)
          Returns the value of the subscript flag in the given attributes, or false if no subscript flag is specified.
static boolean isSuperscript(AttributeSet a)
          Returns the value of the superscript flag in the given attributes, or false if no superscript flag is specified.
static boolean isUnderline(AttributeSet a)
          Returns the value of the underline flag in the given attributes, or false if no underline flag is specified.
static void setAlignment(MutableAttributeSet a, int align)
          Adds an alignment attribute to the specified set.
static void setBackground(MutableAttributeSet a, Color bg)
          Adds a background attribute to the specified set.
static void setBidiLevel(MutableAttributeSet a, int lev)
          Adds a bidi-level attribute to the specified set.
static void setBold(MutableAttributeSet a, boolean b)
          Adds a bold attribute to the specified set.
static void setComponent(MutableAttributeSet a, Component c)
          Adds a component attribute to the specified set.
static void setFirstLineIndent(MutableAttributeSet a, float i)
          Adds a first line indentation attribute to the specified set.
static void setFontFamily(MutableAttributeSet a, String fam)
          Adds a font family attribute to the specified set.
static void setFontSize(MutableAttributeSet a, int s)
          Adds a font size attribute to the specified set.
static void setForeground(MutableAttributeSet a, Color fg)
          Adds a foreground color attribute to the specified set.
static void setIcon(MutableAttributeSet a, Icon c)
          Adds an icon attribute to the specified set.
static void setItalic(MutableAttributeSet a, boolean b)
          Adds an italic attribute to the specified set.
static void setLeftIndent(MutableAttributeSet a, float i)
          Adds a left indentation attribute to the specified set.
static void setLineSpacing(MutableAttributeSet a, float i)
          Adds a line spacing attribute to the specified set.
static void setRightIndent(MutableAttributeSet a, float i)
          Adds a right indentation attribute to the specified set.
static void setSpaceAbove(MutableAttributeSet a, float i)
          Adds a 'space above' attribute to the specified set.
static void setSpaceBelow(MutableAttributeSet a, float i)
          Adds a 'space below' attribute to the specified set.
static void setStrikeThrough(MutableAttributeSet a, boolean b)
          Adds a strike-through attribue to the specified set.
static void setSubscript(MutableAttributeSet a, boolean b)
          Adds a subscript attribute to the specified set.
static void setSuperscript(MutableAttributeSet a, boolean b)
          Adds a superscript attribute to the specified set.
static void setTabSet(MutableAttributeSet a, TabSet tabs)
          Adds a TabSet attribute to the specified set.
static void setUnderline(MutableAttributeSet a, boolean b)
          Adds an underline attribute to the specified set.
 String toString()
          Returns a string representation of the attribute key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALIGN_LEFT

public static final int ALIGN_LEFT
A value representing left alignment for the StyleConstants.ParagraphConstants.Alignment attribute.

See Also:
Constant Field Values

ALIGN_CENTER

public static final int ALIGN_CENTER
A value representing center alignment for the StyleConstants.ParagraphConstants.Alignment attribute.

See Also:
Constant Field Values

ALIGN_RIGHT

public static final int ALIGN_RIGHT
A value representing right alignment for the StyleConstants.ParagraphConstants.Alignment attribute.

See Also:
Constant Field Values

ALIGN_JUSTIFIED

public static final int ALIGN_JUSTIFIED
A value representing ful justification for the StyleConstants.ParagraphConstants.Alignment attribute.

See Also:
Constant Field Values

Background

public static final Object Background
An alias for StyleConstants.CharacterConstants.Background.


BidiLevel

public static final Object BidiLevel
An alias for StyleConstants.CharacterConstants.BidiLevel.


Bold

public static final Object Bold
An alias for StyleConstants.CharacterConstants.Bold.


ComponentAttribute

public static final Object ComponentAttribute
An alias for StyleConstants.CharacterConstants.ComponentAttribute.


Family

public static final Object Family
An alias for StyleConstants.CharacterConstants.Family.


FontFamily

public static final Object FontFamily
An alias for StyleConstants.CharacterConstants.Family.


FontSize

public static final Object FontSize
An alias for StyleConstants.CharacterConstants.Size.


Foreground

public static final Object Foreground
An alias for StyleConstants.CharacterConstants.Foreground.


IconAttribute

public static final Object IconAttribute
An alias for StyleConstants.CharacterConstants.IconAttribute.


Italic

public static final Object Italic
An alias for StyleConstants.CharacterConstants.Italic.


Size

public static final Object Size
An alias for StyleConstants.CharacterConstants.Size.


StrikeThrough

public static final Object StrikeThrough
An alias for StyleConstants.CharacterConstants.StrikeThrough.


Subscript

public static final Object Subscript
An alias for StyleConstants.CharacterConstants.Subscript.


Superscript

public static final Object Superscript
An alias for StyleConstants.CharacterConstants.Superscript.


Underline

public static final Object Underline
An alias for StyleConstants.CharacterConstants.Underline.


Alignment

public static final Object Alignment
An alias for StyleConstants.ParagraphConstants.Alignment.


FirstLineIndent

public static final Object FirstLineIndent
An alias for StyleConstants.ParagraphConstants.FirstLineIndent.


LeftIndent

public static final Object LeftIndent
An alias for StyleConstants.ParagraphConstants.LeftIndent.


LineSpacing

public static final Object LineSpacing
An alias for StyleConstants.ParagraphConstants.LineSpacing.


Orientation

public static final Object Orientation
An alias for StyleConstants.ParagraphConstants.Orientation.


RightIndent

public static final Object RightIndent
An alias for StyleConstants.ParagraphConstants.RightIndent.


SpaceAbove

public static final Object SpaceAbove
An alias for StyleConstants.ParagraphConstants.SpaceAbove.


SpaceBelow

public static final Object SpaceBelow
An alias for StyleConstants.ParagraphConstants.SpaceBelow.


TabSet

public static final Object TabSet
An alias for StyleConstants.ParagraphConstants.TabSet.


ComponentElementName

public static final String ComponentElementName
See Also:
Constant Field Values

IconElementName

public static final String IconElementName
See Also:
Constant Field Values

ComposedTextAttribute

public static final Object ComposedTextAttribute

ModelAttribute

public static final Object ModelAttribute

NameAttribute

public static final Object NameAttribute

ResolveAttribute

public static final Object ResolveAttribute
Method Detail

toString

public String toString()
Returns a string representation of the attribute key.

Overrides:
toString in class Object
Returns:
A string representation of the attribute key.
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)

getAlignment

public static int getAlignment(AttributeSet a)
Returns the alignment specified in the given attributes, or ALIGN_LEFT if no alignment is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The alignment (typically one of ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER or ALIGN_JUSTIFIED).
See Also:
setAlignment(MutableAttributeSet, int)

getBackground

public static Color getBackground(AttributeSet a)
Returns the background color specified in the given attributes, or Color.BLACK if no background color is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The background color.
See Also:
setBackground(MutableAttributeSet, Color)

getBidiLevel

public static int getBidiLevel(AttributeSet a)
Returns the bidi level specified in the given attributes, or 0 if no bidi level is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The bidi level.
See Also:
setBidiLevel(MutableAttributeSet, int)

getComponent

public static Component getComponent(AttributeSet a)
Returns the component specified in the given attributes, or null if no component is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The component (possibly null).
See Also:
setComponent(MutableAttributeSet, Component)

getFirstLineIndent

public static float getFirstLineIndent(AttributeSet a)
Returns the indentation specified in the given attributes, or 0.0f if no indentation is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The indentation.
See Also:
setFirstLineIndent(MutableAttributeSet, float)

getFontFamily

public static String getFontFamily(AttributeSet a)
Returns the font family specified in the given attributes, or Monospaced if no font family is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The font family.
See Also:
setFontFamily(MutableAttributeSet, String)

getFontSize

public static int getFontSize(AttributeSet a)
Returns the font size specified in the given attributes, or 12 if no font size is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The font size.
See Also:
setFontSize(MutableAttributeSet, int)

getForeground

public static Color getForeground(AttributeSet a)
Returns the foreground color specified in the given attributes, or Color.BLACK if no foreground color is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The foreground color.
See Also:
setForeground(MutableAttributeSet, Color)

getIcon

public static Icon getIcon(AttributeSet a)
Returns the icon specified in the given attributes, or null if no icon is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The icon (possibly null).
See Also:
setIcon(MutableAttributeSet, Icon)

getLeftIndent

public static float getLeftIndent(AttributeSet a)
Returns the left indentation specified in the given attributes, or 0.0f if no left indentation is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The left indentation.
See Also:
setLeftIndent(MutableAttributeSet, float)

getLineSpacing

public static float getLineSpacing(AttributeSet a)
Returns the line spacing specified in the given attributes, or 0.0f if no line spacing is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The line spacing.
See Also:
setLineSpacing(MutableAttributeSet, float)

getRightIndent

public static float getRightIndent(AttributeSet a)
Returns the right indentation specified in the given attributes, or 0.0f if no right indentation is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The right indentation.
See Also:
setRightIndent(MutableAttributeSet, float)

getSpaceAbove

public static float getSpaceAbove(AttributeSet a)
Returns the 'space above' specified in the given attributes, or 0.0f if no 'space above' is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The 'space above'.
See Also:
setSpaceAbove(MutableAttributeSet, float)

getSpaceBelow

public static float getSpaceBelow(AttributeSet a)
Returns the 'space below' specified in the given attributes, or 0.0f if no 'space below' is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The 'space below'.
See Also:
setSpaceBelow(MutableAttributeSet, float)

getTabSet

public static TabSet getTabSet(AttributeSet a)
Returns the tab set specified in the given attributes, or null if no tab set is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The tab set.
See Also:
setTabSet(MutableAttributeSet, javax.swing.text.TabSet)

isBold

public static boolean isBold(AttributeSet a)
Returns the value of the bold flag in the given attributes, or false if no bold flag is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The bold flag.
See Also:
setBold(MutableAttributeSet, boolean)

isItalic

public static boolean isItalic(AttributeSet a)
Returns the value of the italic flag in the given attributes, or false if no italic flag is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The italic flag.
See Also:
setItalic(MutableAttributeSet, boolean)

isStrikeThrough

public static boolean isStrikeThrough(AttributeSet a)
Returns the value of the strike-through flag in the given attributes, or false if no strike-through flag is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The strike-through flag.
See Also:
setStrikeThrough(MutableAttributeSet, boolean)

isSubscript

public static boolean isSubscript(AttributeSet a)
Returns the value of the subscript flag in the given attributes, or false if no subscript flag is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The subscript flag.
See Also:
setSubscript(MutableAttributeSet, boolean)

isSuperscript

public static boolean isSuperscript(AttributeSet a)
Returns the value of the superscript flag in the given attributes, or false if no superscript flag is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The superscript flag.
See Also:
setSuperscript(MutableAttributeSet, boolean)

isUnderline

public static boolean isUnderline(AttributeSet a)
Returns the value of the underline flag in the given attributes, or false if no underline flag is specified.

Parameters:
a - the attribute set (null not permitted).
Returns:
The underline flag.
See Also:
setUnderline(MutableAttributeSet, boolean)

setAlignment

public static void setAlignment(MutableAttributeSet a,
                                int align)
Adds an alignment attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
align - the alignment (typically one of ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER or ALIGN_JUSTIFIED).
Throws:
NullPointerException - if a is null.
See Also:
getAlignment(AttributeSet)

setBackground

public static void setBackground(MutableAttributeSet a,
                                 Color bg)
Adds a background attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
bg - the background (null not permitted).
Throws:
NullPointerException - if either argument is null.
See Also:
getBackground(AttributeSet)

setBidiLevel

public static void setBidiLevel(MutableAttributeSet a,
                                int lev)
Adds a bidi-level attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
lev - the level.
Throws:
NullPointerException - if a is null.
See Also:
getBidiLevel(AttributeSet)

setBold

public static void setBold(MutableAttributeSet a,
                           boolean b)
Adds a bold attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
b - the new value of the bold attribute.
Throws:
NullPointerException - if a is null.
See Also:
isBold(AttributeSet)

setComponent

public static void setComponent(MutableAttributeSet a,
                                Component c)
Adds a component attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
c - the component (null not permitted).
Throws:
NullPointerException - if either argument is null.
See Also:
getComponent(AttributeSet)

setFirstLineIndent

public static void setFirstLineIndent(MutableAttributeSet a,
                                      float i)
Adds a first line indentation attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
i - the indentation.
Throws:
NullPointerException - if a is null.
See Also:
getFirstLineIndent(AttributeSet)

setFontFamily

public static void setFontFamily(MutableAttributeSet a,
                                 String fam)
Adds a font family attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
fam - the font family name (null not permitted).
Throws:
NullPointerException - if either argument is null.
See Also:
getFontFamily(AttributeSet)

setFontSize

public static void setFontSize(MutableAttributeSet a,
                               int s)
Adds a font size attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
s - the font size (in points).
Throws:
NullPointerException - if a is null.
See Also:
getFontSize(AttributeSet)

setForeground

public static void setForeground(MutableAttributeSet a,
                                 Color fg)
Adds a foreground color attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
fg - the foreground color (null not permitted).
Throws:
NullPointerException - if either argument is null.
See Also:
getForeground(AttributeSet)

setIcon

public static void setIcon(MutableAttributeSet a,
                           Icon c)
Adds an icon attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
c - the icon (null not permitted).
Throws:
NullPointerException - if either argument is null.
See Also:
getIcon(AttributeSet)

setItalic

public static void setItalic(MutableAttributeSet a,
                             boolean b)
Adds an italic attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
b - the new value of the italic attribute.
Throws:
NullPointerException - if a is null.
See Also:
isItalic(AttributeSet)

setLeftIndent

public static void setLeftIndent(MutableAttributeSet a,
                                 float i)
Adds a left indentation attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
i - the indentation.
Throws:
NullPointerException - if a is null.
See Also:
getLeftIndent(AttributeSet)

setLineSpacing

public static void setLineSpacing(MutableAttributeSet a,
                                  float i)
Adds a line spacing attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
i - the line spacing.
Throws:
NullPointerException - if a is null.
See Also:
getLineSpacing(AttributeSet)

setRightIndent

public static void setRightIndent(MutableAttributeSet a,
                                  float i)
Adds a right indentation attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
i - the right indentation.
Throws:
NullPointerException - if a is null.
See Also:
getRightIndent(AttributeSet)

setSpaceAbove

public static void setSpaceAbove(MutableAttributeSet a,
                                 float i)
Adds a 'space above' attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
i - the space above attribute value.
Throws:
NullPointerException - if a is null.
See Also:
getSpaceAbove(AttributeSet)

setSpaceBelow

public static void setSpaceBelow(MutableAttributeSet a,
                                 float i)
Adds a 'space below' attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
i - the space below attribute value.
Throws:
NullPointerException - if a is null.
See Also:
getSpaceBelow(AttributeSet)

setStrikeThrough

public static void setStrikeThrough(MutableAttributeSet a,
                                    boolean b)
Adds a strike-through attribue to the specified set.

Parameters:
a - the attribute set (null not permitted).
b - the strike-through attribute value.
Throws:
NullPointerException - if a is null.
See Also:
isStrikeThrough(AttributeSet)

setSubscript

public static void setSubscript(MutableAttributeSet a,
                                boolean b)
Adds a subscript attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
b - the subscript attribute value.
Throws:
NullPointerException - if a is null.
See Also:
isSubscript(AttributeSet)

setSuperscript

public static void setSuperscript(MutableAttributeSet a,
                                  boolean b)
Adds a superscript attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
b - the superscript attribute value.
Throws:
NullPointerException - if a is null.
See Also:
isSuperscript(AttributeSet)

setTabSet

public static void setTabSet(MutableAttributeSet a,
                             TabSet tabs)
Adds a TabSet attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
tabs - the tab set (null not permitted).
Throws:
NullPointerException - if either argument is null.
See Also:
getTabSet(AttributeSet)

setUnderline

public static void setUnderline(MutableAttributeSet a,
                                boolean b)
Adds an underline attribute to the specified set.

Parameters:
a - the attribute set (null not permitted).
b - the underline attribute value.
Throws:
NullPointerException - if a is null.
See Also:
isUnderline(AttributeSet)