|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.SimplePanel
com.maryanovsky.gwtutils.client.ui.PlainHyperlink
public class PlainHyperlink
A plain HTML hyperlink, you know, the normal kind, which opens a URL when clicked.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
---|
HasWidgets.ForIsWidget |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
PlainHyperlink()
Creates a new PlainHyperlink , not yet pointing anywhere. |
|
PlainHyperlink(String url)
Creates a new PlainHyperlink pointing to the specified URL. |
|
PlainHyperlink(String url,
String content)
A convenience constructor for creating a really plain link, whose content is just text. |
|
PlainHyperlink(String url,
Widget content)
Creates a new PlainHyperlink to point to the specified URL
and contain the specified widget. |
Method Summary | |
---|---|
AnchorElement |
getAnchor()
Returns the AnchorElement this PlainHyperlink wraps. |
Widget |
getContent()
Returns the content of the link - the widget which may be clicked to follow to the URL. |
String |
getUrl()
Returns the URL the link points to. |
void |
setContent(String content)
A convenience method which sets the content of the link to be a simple Label with the specified text. |
void |
setContent(Widget content)
Sets the content of the link - the widget which may be clicked to follow to the URL. |
void |
setTarget(String target)
Sets the target attribute of the hyperlink to the specified
value. |
void |
setUrl(String url)
Sets the URL the link points to (the href attribute of the
anchor). |
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel |
---|
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PlainHyperlink()
PlainHyperlink
, not yet pointing anywhere.
public PlainHyperlink(String url)
PlainHyperlink
pointing to the specified URL.
url
- The URL to open when the hyperlink is clicked. May be
null
, in which case it should be set later.public PlainHyperlink(String url, String content)
url
- The URL to open when the hyperlink is clicked.content
- The linked text.public PlainHyperlink(String url, Widget content)
PlainHyperlink
to point to the specified URL
and contain the specified widget.
Method Detail |
---|
public AnchorElement getAnchor()
AnchorElement
this PlainHyperlink
wraps.
public void setUrl(String url)
href
attribute of the
anchor). A null
value removes the attribute.
public String getUrl()
public void setContent(Widget content)
public void setContent(String content)
public Widget getContent()
public void setTarget(String target)
target
attribute of the hyperlink to the specified
value. Specifying null
removes the attribute.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |