public class Link extends AbstractComponent implements Comparable<Object>
Modifier and Type | Field and Description |
---|---|
protected 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
LABELLEDBY
Constructor and Description |
---|
Link()
Constructs a new empty link.
|
Link(String href) |
Link(String href,
Component text) |
Link(String href,
Component text,
String target,
String styleClass) |
Link(String href,
Content text) |
Link(String href,
Object[] contents)
Deprecated.
use
Link(String) .addContent(Object...) instead |
Link(String href,
String text) |
Link(String href,
String text,
String target)
Constructor with text, url and target.
|
Link(String href,
String text,
String target,
String styleClass)
Constructor with text, url, target, and style.
|
Link(String href,
String text,
String target,
String styleClass,
String id)
Constructor with text, url, target, style, and id.
|
Modifier and Type | Method and Description |
---|---|
Link |
addContent(Object... contents) |
int |
compareTo(Object o) |
Object |
getContent()
Set the href attribute.
|
String |
getHref() |
String |
getTarget() |
String |
getText() |
void |
setContent(Object o)
Set the href attribute.
|
void |
setHref(String href)
sets the link url
|
void |
setTarget(String target)
sets the target where the link will open
|
void |
setText(Component text) |
void |
setText(String text)
sets the text
|
addClass, clone, create, getAttribute, getBrowserMode, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, init, removeAttribute, removeClass, setActionListener, setAttribute, setBrowserMode, setClass, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toggleClass, toString
protected String text
public Link()
@Deprecated public Link(String href, Object[] contents)
Link(String)
.addContent(Object...)
insteadhref
- contents
- public Link(String href)
public Link(String href, String text, String target)
href
- the url of the linktext
- the description of the linktarget
- the target where the link will openpublic Link(String href, String text, String target, 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(String href, String text, String target, String styleClass, 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(String href)
href
- the urlpublic String getHref()
public void setText(String text)
text
- - the text Stringpublic void setText(Component text)
public String getText()
public void setTarget(String target)
target
- - the targetpublic String getTarget()
public void setContent(Object o)
setContent
in interface Component
setContent
in class AbstractComponent
o
- - any object where the string representation is used for renderingpublic Object getContent()
getContent
in interface Component
getContent
in class AbstractComponent
public int compareTo(Object o)
compareTo
in interface Comparable<Object>
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.