|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.html.HtmlElement | +--weblogic.html.ElementWithAttributes | +--weblogic.html.SinglePartElement | +--weblogic.html.FontElement
A FontElement is used to set the font color, face, and size of an HtmlElement. Use FontElement as the argument for any of the addElement() methods. You can also use the asFontElement() methods in the parent class HtmlElement. Valid color names for use with methods in this class are encapsulated in HtmlColor.
This examples uses FontElement to add font effects to an HtmlPage object "hp":
hp.addElement(new FontElement(5, HtmlColor.fuchsia, caption).asItalicElement())or, using asFontElement() to increase a font size:
.addElement(new StringElement(filename).asCenteredElement().asFontElement("+1"))
The HTML FONT and BASEFONT elements are deprecated in HTML 4.0 in favor of a more generic use of the STYLE element. htmlKona continues to support these HTML elements, but not all browsers may display them properly.
StyleElement
Fields inherited from class weblogic.html.HtmlElement |
codeset,
useObsolete |
Constructor Summary | |
FontElement()
Deprecated. Constructs a FontElement. |
|
FontElement(int size,
HtmlElement val)
Deprecated. Constructs a FontElement of the specified font size with the specified HtmlElement. |
|
FontElement(int size,
java.lang.String val)
Deprecated. Constructs a FontElement of the specified font size with the specified string. |
|
FontElement(int size,
java.lang.String color,
HtmlElement val)
Deprecated. Constructs a FontElement of the specified font size and color with the specified HtmlElement. |
|
FontElement(int size,
java.lang.String color,
java.lang.String val)
Deprecated. Constructs a FontElement of the specified font size and color with the specified string. |
|
FontElement(java.lang.String val)
Deprecated. Constructs a FontElement with the specified string. |
|
FontElement(java.lang.String size,
HtmlElement val)
Deprecated. Constructs a FontElement of the specified font size with the specified HtmlElement. |
|
FontElement(java.lang.String size,
java.lang.String val)
Deprecated. Constructs a FontElement of the specified font size with the specified string. |
|
FontElement(java.lang.String size,
java.lang.String color,
HtmlElement val)
Deprecated. Constructs a FontElement of the specified font size and color with the specified HtmlElement. |
|
FontElement(java.lang.String size,
java.lang.String color,
java.lang.String val)
Deprecated. Constructs a FontElement of the specified font size and color with the specified string. |
Method Summary | |
protected java.lang.String |
getHtmlCode()
Deprecated. |
FontElement |
setFontColor(java.awt.Color color)
Deprecated. Sets the font color to a java.awt.Color object. |
FontElement |
setFontColor(java.lang.String val)
Deprecated. Sets the font color to its hexidecimal RGB value (for example, #FFFFFF) or to the name of a color. |
FontElement |
setFontFace(java.lang.String fontnames)
Deprecated. Sets the FACE attribute for a FontElement. |
FontElement |
setFontSize(int val)
Deprecated. Sets the font size. |
FontElement |
setFontSize(java.lang.String val)
Deprecated. Sets the font size to a string value. |
Methods inherited from class weblogic.html.SinglePartElement |
getElement,
printBody,
printBody,
printBody,
setElement,
setElement,
widthAsLiteral |
Methods inherited from class weblogic.html.ElementWithAttributes |
addAttribute,
addAttribute,
escapeQuotes,
getBooleanAttribute,
getElementAttribute,
getLocalVar,
getQuotedAttribute,
output,
output,
output,
printBody,
printCR,
printEndingTag,
setBooleanAttribute,
setBooleanAttribute,
setClass,
setDirection,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setElementAttribute,
setId,
setLang,
setLocalVar,
setQuotedAttribute,
setStyle |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public FontElement()
public FontElement(java.lang.String val)
contents
- Stringpublic FontElement(int size, java.lang.String val)
size
- Font size in pointsval
- Stringpublic FontElement(java.lang.String size, java.lang.String val)
size
- Font sizeval
- Stringpublic FontElement(int size, HtmlElement val)
size
- Font sizeval
- HtmlElementpublic FontElement(java.lang.String size, HtmlElement val)
size
- Font sizeval
- HtmlElementpublic FontElement(java.lang.String size, java.lang.String color, java.lang.String val)
size
- Font size or term for font sizecolor
- Hex RGB color or valid color nameval
- Stringpublic FontElement(int size, java.lang.String color, java.lang.String val)
size
- Font sizecolor
- Hex RGB color or valid color nameval
- Stringpublic FontElement(int size, java.lang.String color, HtmlElement val)
size
- Font sizecolor
- Hex RGB color or valid color nameval
- HtmlElementpublic FontElement(java.lang.String size, java.lang.String color, HtmlElement val)
size
- Font size or term for font sizecolor
- Hex RGB color or valid color nameval
- HtmlElementMethod Detail |
public FontElement setFontColor(java.lang.String val)
val
- Hex color value or valid color namepublic FontElement setFontColor(java.awt.Color color)
color
- Color objectpublic FontElement setFontFace(java.lang.String fontnames)
fontnames
- Comma-delimited list of font face namespublic FontElement setFontSize(int val)
val
- Font size in pointspublic FontElement setFontSize(java.lang.String val)
val
- Font sizeprotected java.lang.String getHtmlCode()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs60 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |