|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.inet.html.css.CSS
public class CSS
Contains all known CSS attributes and some additional setters
Nested Class Summary | |
---|---|
static class |
CSS.Attribute
A list of CSS attributes. |
Constructor Summary | |
---|---|
CSS()
|
Method Summary | |
---|---|
static CSS.Attribute |
getAttribute(java.lang.String name)
Get the CSS Attribute with the same name. |
static boolean |
isBold(javax.swing.text.Element element)
Checks whether the element has font weight bold set directly or by inherit |
static boolean |
isItalic(javax.swing.text.Element element)
Checks whether the element has font style italic or oblique set directly or by inherit |
static boolean |
isUnderline(javax.swing.text.Element element)
Checks whether the element has text decoration underline set directly or by inherit |
static void |
setFontFamily(javax.swing.text.MutableAttributeSet a,
java.lang.String family)
Correctly sets the CSS.FONT_FAMILY attribute |
static void |
setFontSize(javax.swing.text.MutableAttributeSet a,
int size)
Correctly sets the CSS.FONT_SIZE attribute |
static void |
setFontStyle(javax.swing.text.MutableAttributeSet a,
boolean italic)
Correctly sets the CSS.FONT_STYLE attribute |
static void |
setFontWeight(javax.swing.text.MutableAttributeSet a,
boolean bold)
Correctly sets the CSS.FONT_WEIGHT attribute |
static void |
setMarginLeft(javax.swing.text.MutableAttributeSet a,
int pixels)
Correctly sets the CSS.MARGIN_LEFT attribute |
static void |
setTextColor(javax.swing.text.MutableAttributeSet a,
java.awt.Color color)
Correctly sets the CSS.COLOR attribute |
static void |
setTextDecoration(javax.swing.text.MutableAttributeSet a,
int decoration)
Correctly sets the CSS.TEXT_DECORATION attribute |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CSS()
Method Detail |
---|
public static final CSS.Attribute getAttribute(java.lang.String name)
name
- the lower case name
public static void setTextColor(javax.swing.text.MutableAttributeSet a, java.awt.Color color)
a
- The attribute set to modifycolor
- The color to setpublic static void setFontSize(javax.swing.text.MutableAttributeSet a, int size)
a
- The attribute set to modifysize
- the size in pixels to setpublic static void setFontWeight(javax.swing.text.MutableAttributeSet a, boolean bold)
a
- The attribute set to modifybold
- set to true, to make the font boldpublic static void setFontStyle(javax.swing.text.MutableAttributeSet a, boolean italic)
a
- The attribute set to modifyitalic
- set to true, to make the font italicspublic static void setTextDecoration(javax.swing.text.MutableAttributeSet a, int decoration)
a
- The attribute set to modifydecoration
- The TextDecoration
constantpublic static void setFontFamily(javax.swing.text.MutableAttributeSet a, java.lang.String family)
a
- The attribute set to modifyfamily
- The name of the font or font family to setpublic static boolean isBold(javax.swing.text.Element element)
element
- the element to check - in most cases the character element
public static boolean isItalic(javax.swing.text.Element element)
element
- the element to check - in most cases the character element
public static boolean isUnderline(javax.swing.text.Element element)
element
- the element to check - in most cases the character element
public static void setMarginLeft(javax.swing.text.MutableAttributeSet a, int pixels)
a
- The attribute set to modifypixels
- the margin width in pixel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |