|
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.AnchorElement
Use an AnchorElement object to create hypertext links in a document. This class supercedes LinkElement in version 1.0 and has support for HTML 4.0 attributes and some other extensions.
This example shows an AnchorElement added to an HtmlPage, "page," that points to copyright information. The first constructor argument is the url, the second is the displayed hyperlinked text, the third a target window.
page.addElement(new AnchorElement("http://www.acme.com/copyright.html", "© 1996, Acme Inc. All Rights Reserved.", WindowName.parent));These two examples show how to construct and set an AnchorElement as an internal link on a page:
page.addElement(new HeadingElement(1, "Main Topic") .asAnchorElement(new StringElement("#topic1")));or,
page.addElement(new StringElement("Instructions on ")) .addElement(new AnchorElement(AnchorType.name, "#install", new StringElement("installing the kit")));
AnchorType
Fields inherited from class weblogic.html.HtmlElement |
codeset,
useObsolete |
Constructor Summary | |
AnchorElement()
Deprecated. Constructs an empty AnchorElement. |
|
AnchorElement(AnchorType type,
java.lang.String link,
HtmlElement display)
Deprecated. Constructs an AnchorElement of the specified type and link, and sets the contents of the anchor. |
|
AnchorElement(AnchorType type,
java.lang.String link,
java.lang.String display)
Deprecated. Constructs an AnchorElement of the specified type and link, and sets the contents of the anchor. |
|
AnchorElement(HtmlElement display)
Deprecated. Constructs a AnchorElement with the specified display information and no URL. |
|
AnchorElement(java.lang.String url)
Deprecated. Constructs a AnchorElement with the specified HREF tag. |
|
AnchorElement(java.lang.String url,
HtmlElement display)
Deprecated. Constructs a AnchorElement with the specified URL and display information. |
|
AnchorElement(java.lang.String url,
HtmlElement display,
java.lang.String target)
Deprecated. Constructs an AnchorElement with the specified URL, sets the display information to the specified HtmlElement, and sets the display window to the specified string name. |
|
AnchorElement(java.lang.String url,
HtmlElement display,
WindowName target)
Deprecated. Constructs an AnchorElement with the specified URL, display information, and target. |
|
AnchorElement(java.lang.String url,
java.lang.String display)
Deprecated. Constructs a AnchorElement with the specified link and display information. |
|
AnchorElement(java.lang.String url,
java.lang.String display,
java.lang.String target)
Deprecated. Constructs an AnchorElement with the specified URL, display information, and target. |
|
AnchorElement(java.lang.String url,
java.lang.String display,
WindowName target)
Deprecated. Constructs an AnchorElement with the specified URL, display information, and target. |
Method Summary | |
protected java.lang.String |
getHtmlCode()
Deprecated. |
protected boolean |
printBody()
Deprecated. |
protected boolean |
printCR()
Deprecated. |
protected boolean |
printEndingTag()
Deprecated. |
AnchorElement |
setHref(HtmlElement url)
Deprecated. Sets the HREF attribute for an AnchorElement. |
AnchorElement |
setHref(java.lang.String url)
Deprecated. Sets the HREF attribute for a AnchorElement. |
AnchorElement |
setName(java.lang.String name)
Deprecated. Sets the NAME attribute for an AnchorElement. |
AnchorElement |
setOnClick(java.lang.String event)
Deprecated. Sets the ONCLICK attribute for a AnchorElement. |
AnchorElement |
setOnMouseOver(java.lang.String event)
Deprecated. Sets the ONMOUSEOVER attribute for a AnchorElement. |
AnchorElement |
setTabindex(int tabindex)
Deprecated. Sets the tabbing order for an AnchorElement, which defines the order in which page elements get the focus when a user navigates the page with a keyboard. |
AnchorElement |
setTabindex(java.lang.String tabindex)
Deprecated. Sets the TABINDEX attribute for an AnchorElement. |
AnchorElement |
setTarget(java.lang.String target)
Deprecated. Sets the TARGET attribute for a AnchorElement. |
AnchorElement |
setTarget(WindowName target)
Deprecated. Sets the TARGET attribute for a AnchorElement. |
AnchorElement |
setTitle(java.lang.String title)
Deprecated. Sets the TITLE attribute for an AnchorElement. |
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,
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 AnchorElement()
public AnchorElement(java.lang.String url)
url
- URL of the referenced linkpublic AnchorElement(HtmlElement display)
elem
- HtmlElement displayed textpublic AnchorElement(java.lang.String url, HtmlElement display)
url
- URLdisplay
- HtmlElement displayed textpublic AnchorElement(java.lang.String url, java.lang.String display)
url
- URLdisplay
- String displayed textpublic AnchorElement(AnchorType type, java.lang.String link, HtmlElement display)
type
- Constant from AnchorTypelink
- Href or Name valuedisplay
- Text enclosed by the anchorpublic AnchorElement(AnchorType type, java.lang.String link, java.lang.String display)
type
- Constant from AnchorTypelink
- Href or Name valuedisplay
- Text enclosed by the anchorpublic AnchorElement(java.lang.String url, java.lang.String display, java.lang.String target)
url
- URLdisplay
- String displayed texttarget
- Window namepublic AnchorElement(java.lang.String url, HtmlElement display, java.lang.String target)
url
- URLdisplay
- HtmlElement displayed texttarget
- Window namepublic AnchorElement(java.lang.String url, java.lang.String display, WindowName target)
url
- URLdisplay
- String displayed texttarget
- Window namepublic AnchorElement(java.lang.String url, HtmlElement display, WindowName target)
url
- URLdisplay
- HtmlElement displayed texttarget
- Window nameMethod Detail |
protected java.lang.String getHtmlCode()
protected boolean printCR()
protected boolean printBody()
protected boolean printEndingTag()
public AnchorElement setHref(java.lang.String url)
url
- HREF attributepublic AnchorElement setHref(HtmlElement url)
url
- HREF attributepublic AnchorElement setName(java.lang.String name)
name
- NAME attributepublic AnchorElement setOnMouseOver(java.lang.String event)
attrib
- ONMOUSEOVER attributepublic AnchorElement setOnClick(java.lang.String event)
val
- ONCLICK attributepublic AnchorElement setTabindex(java.lang.String tabindex)
tabindex
- Indexpublic AnchorElement setTabindex(int tabindex)
tabindex
- intpublic AnchorElement setTarget(java.lang.String target)
attrib
- TARGET attributepublic AnchorElement setTarget(WindowName target)
attrib
- TARGET attributepublic AnchorElement setTitle(java.lang.String title)
title
- String
|
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 |