com.groiss.gui.component
Class Link

java.lang.Object
  extended by com.groiss.gui.AbstractComponent
      extended by com.groiss.gui.component.Link
All Implemented Interfaces:
Component, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
SortableLink

public class Link
extends AbstractComponent
implements java.lang.Comparable

A HTML link element (a).

See Also:
Serialized Form

Field Summary
protected  java.lang.String text
           
 
Fields inherited from class com.groiss.gui.AbstractComponent
actions, 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, outputter, parent, parentElem, READONLY, root, viewMode
 
Constructor Summary
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, org.jdom.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.
 
Method Summary
 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
 
Methods inherited from class com.groiss.gui.AbstractComponent
clone, create, getActionListener, 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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

text

protected java.lang.String text
Constructor Detail

Link

public Link()
Constructs a new empty link.


Link

public Link(java.lang.String href,
            java.lang.String text)

Link

public Link(java.lang.String href,
            java.lang.Object[] text)

Link

public Link(java.lang.String href,
            Component text)

Link

public Link(java.lang.String href,
            org.jdom.Content text)

Link

public Link(java.lang.String href,
            java.lang.String text,
            java.lang.String target)
Constructor with text, url and target.

Parameters:
href - the url of the link
text - the description of the link
target - the target where the link will open

Link

public Link(java.lang.String href,
            java.lang.String text,
            java.lang.String target,
            java.lang.String styleClass)
Constructor with text, url, target, and style.

Parameters:
href - the url of the link
text - the description of the link
target - the target where the link will open
styleClass - the name of a CSS class

Link

public Link(java.lang.String href,
            Component text,
            java.lang.String target,
            java.lang.String styleClass)

Link

public 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.

Parameters:
href - the url of the link
text - the description of the link
target - the target where the link will open
styleClass - the name of a CSS class
id - the uniqe element id
Method Detail

setHref

public void setHref(java.lang.String href)
sets the link url

Parameters:
href - the url

getHref

public java.lang.String getHref()

setText

public void setText(java.lang.String text)
sets the text

Parameters:
text - - the text String

setText

public void setText(Component text)

getText

public java.lang.String getText()

setTarget

public void setTarget(java.lang.String target)
sets the target where the link will open

Parameters:
target - - the target

getTarget

public java.lang.String getTarget()

setContent

public void setContent(java.lang.Object o)
Set the href attribute.

Specified by:
setContent in interface Component
Overrides:
setContent in class AbstractComponent
Parameters:
o - - any object where the string representation is used for rendering

getContent

public java.lang.Object getContent()
Set the href attribute.

Specified by:
getContent in interface Component
Overrides:
getContent in class AbstractComponent
Returns:
the href attribute

compareTo

public int compareTo(java.lang.Object o)
              throws java.lang.ClassCastException
Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.ClassCastException


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.