public class Link extends AbstractComponent implements java.lang.Comparable<java.lang.Object>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
text |
ACTIVE, browserMode, DEFAULT, ID, IE, INVISIBLE, isSensitive, label, NS, ON_BLUR, ON_CHANGE, ON_CLICK, ON_DBLCLICK, ON_FOCUS, ON_KEY_DOWN, ON_KEY_PRESS, ON_KEY_UP, ON_LOAD, ON_MOUSE_DOWN, ON_MOUSE_MOVE, ON_MOUSE_OUT, ON_MOUSE_UP, ON_RESET, ON_SELECT, ON_SUBMIT, ON_UNLOAD, parent, parentElem, READONLY, root, viewMode
Constructor and Description |
---|
Link()
Constructs a new empty link.
|
Link(java.lang.String href,
Component text) |
Link(java.lang.String href,
Component text,
java.lang.String target,
java.lang.String styleClass) |
Link(java.lang.String href,
Content text) |
Link(java.lang.String href,
java.lang.Object[] text) |
Link(java.lang.String href,
java.lang.String text) |
Link(java.lang.String href,
java.lang.String text,
java.lang.String target)
Constructor with text, url and target.
|
Link(java.lang.String href,
java.lang.String text,
java.lang.String target,
java.lang.String styleClass)
Constructor with text, url, target, and style.
|
Link(java.lang.String href,
java.lang.String text,
java.lang.String target,
java.lang.String styleClass,
java.lang.String id)
Constructor with text, url, target, style, and id.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object o) |
java.lang.Object |
getContent()
Set the href attribute.
|
java.lang.String |
getHref() |
java.lang.String |
getTarget() |
java.lang.String |
getText() |
void |
setContent(java.lang.Object o)
Set the href attribute.
|
void |
setHref(java.lang.String href)
sets the link url
|
void |
setTarget(java.lang.String target)
sets the target where the link will open
|
void |
setText(Component text) |
void |
setText(java.lang.String text)
sets the text
|
clone, create, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, init, removeAttribute, setActionListener, setAttribute, setBrowserMode, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toString
public Link()
public Link(java.lang.String href, java.lang.String text)
public Link(java.lang.String href, java.lang.Object[] text)
public Link(java.lang.String href, Component text)
public Link(java.lang.String href, Content text)
public Link(java.lang.String href, java.lang.String text, java.lang.String target)
href
- the url of the linktext
- the description of the linktarget
- the target where the link will openpublic Link(java.lang.String href, java.lang.String text, java.lang.String target, java.lang.String styleClass)
href
- the url of the linktext
- the description of the linktarget
- the target where the link will openstyleClass
- the name of a CSS classpublic Link(java.lang.String href, Component text, java.lang.String target, java.lang.String styleClass)
public Link(java.lang.String href, java.lang.String text, java.lang.String target, java.lang.String styleClass, java.lang.String id)
href
- the url of the linktext
- the description of the linktarget
- the target where the link will openstyleClass
- the name of a CSS classid
- the uniqe element idpublic void setHref(java.lang.String href)
href
- the urlpublic java.lang.String getHref()
public void setText(java.lang.String text)
text
- - the text Stringpublic void setText(Component text)
public java.lang.String getText()
public void setTarget(java.lang.String target)
target
- - the targetpublic java.lang.String getTarget()
public void setContent(java.lang.Object o)
setContent
in interface Component
setContent
in class AbstractComponent
o
- - any object where the string representation is used for renderingpublic java.lang.Object getContent()
getContent
in interface Component
getContent
in class AbstractComponent
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable<java.lang.Object>
java.lang.ClassCastException
@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.