java.lang.Object | |||
↳ | com.google.gwt.user.client.ui.UIObject | ||
↳ | com.google.gwt.user.client.ui.Widget | ||
↳ | com.google.gwt.user.client.ui.Hyperlink |
Known Direct Subclasses |
A widget that serves as an "internal" hyperlink. That is, it is a link to
another state of the running application. When clicked, it will create a new
history frame using newItem(String)
, but
without reloading the page.
If you want an HTML hyperlink (<a> tag) without interacting with the
history system, use Anchor
instead.
Being a true hyperlink, it is also possible for the user to "right-click, open link in new window", which will cause the application to be loaded in a new window at the state specified by the hyperlink.
setDirectionEstimator(boolean)
or
passing a DirectionEstimator parameter to the constructor, and is off by
default.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_DIRECTION_ESTIMATOR | |||||||||||
directionalTextHelper |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates an empty hyperlink.
| |||||||||||
Creates a hyperlink with its html and target history token specified.
| |||||||||||
Creates a hyperlink with its html and target history token specified.
| |||||||||||
Creates a hyperlink with its html and target history token specified.
| |||||||||||
Creates a hyperlink with its text and target history token specified.
| |||||||||||
Creates a hyperlink with its text and target history token specified.
| |||||||||||
Creates a hyperlink with its text and target history token specified.
| |||||||||||
Creates a hyperlink with its text and target history token specified.
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
addClickHandler(ClickHandler) instead and call
History.newItem from the handler if you need to process the
click before the history token is set.
| |||||||||||
This method is deprecated.
Use
addClickHandler(ClickHandler) instead and call
History.newItem from the handler if you need to process the
click before the history token is set.
| |||||||||||
Returns the
DirectionEstimator object. | |||||||||||
Gets this object's contents as HTML.
| |||||||||||
Gets the history token referenced by this hyperlink.
| |||||||||||
Gets this object's text.
| |||||||||||
Gets the direction of this object's text.
| |||||||||||
Fired whenever a browser event is received.
| |||||||||||
This method is deprecated.
Use the
removeHandler()
method on the object returned by an add*Handler method instead
| |||||||||||
Sets the
DirectionEstimator object.
Note: DirectionEstimator should be set before the widget has any content; it's highly recommended to set it using a constructor. | |||||||||||
Toggles on / off direction estimation.
See note at | |||||||||||
Sets this object's contents via known-safe HTML.
| |||||||||||
Sets this object's html, also declaring its direction.
| |||||||||||
Sets this object's contents via HTML.
| |||||||||||
Sets the history token referenced by this hyperlink.
| |||||||||||
Sets this object's text, also declaring its direction.
| |||||||||||
Sets this object's text.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Affected Elements:
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.Widget
| |||||||||||
From class
com.google.gwt.user.client.ui.UIObject
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.google.gwt.event.dom.client.HasClickHandlers
| |||||||||||
From interface com.google.gwt.event.logical.shared.HasAttachHandlers | |||||||||||
From interface com.google.gwt.event.shared.HasHandlers | |||||||||||
From interface com.google.gwt.i18n.shared.HasDirectionEstimator | |||||||||||
From interface
com.google.gwt.safehtml.client.HasSafeHtml
| |||||||||||
From interface
com.google.gwt.user.client.EventListener
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasDirectionalSafeHtml
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasDirectionalText
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasHTML
| |||||||||||
From interface
com.google.gwt.user.client.ui.HasText
| |||||||||||
From interface
com.google.gwt.user.client.ui.IsWidget
| |||||||||||
From interface
com.google.gwt.user.client.ui.SourcesClickEvents
|
Creates an empty hyperlink.
Creates a hyperlink with its html and target history token specified.
html | the hyperlink's safe html |
---|---|
targetHistoryToken | the history token to which it will link |
Creates a hyperlink with its html and target history token specified.
html | the hyperlink's safe html |
---|---|
dir | the html's direction |
targetHistoryToken | the history token to which it will link |
Creates a hyperlink with its html and target history token specified.
html | the hyperlink's safe html |
---|---|
directionEstimator | A DirectionEstimator object used for automatic
direction adjustment. For convenience,
DEFAULT_DIRECTION_ESTIMATOR can be used. |
targetHistoryToken | the history token to which it will link |
Creates a hyperlink with its text and target history token specified.
text | the hyperlink's text |
---|---|
targetHistoryToken | the history token to which it will link, which
may not be null (use Anchor instead if you don't need
history processing)
|
Creates a hyperlink with its text and target history token specified.
text | the hyperlink's text |
---|---|
dir | the text's direction |
targetHistoryToken | the history token to which it will link, which
may not be null (use Anchor instead if you don't need
history processing)
|
Creates a hyperlink with its text and target history token specified.
text | the hyperlink's text |
---|---|
directionEstimator | A DirectionEstimator object used for automatic
direction adjustment. For convenience,
DEFAULT_DIRECTION_ESTIMATOR can be used. |
targetHistoryToken | the history token to which it will link, which
may not be null (use Anchor instead if you don't need
history processing)
|
Creates a hyperlink with its text and target history token specified.
text | the hyperlink's text |
---|---|
asHTML | true to treat the specified text as html |
targetHistoryToken | the history token to which it will link |
This method is deprecated.
Use addClickHandler(ClickHandler)
instead and call
History.newItem from the handler if you need to process the
click before the history token is set.
Adds a ClickEvent
handler.
handler | the click handler |
---|
HandlerRegistration
used to remove this handler
This method is deprecated.
Use addClickHandler(ClickHandler)
instead and call
History.newItem from the handler if you need to process the
click before the history token is set.
Adds a listener interface to receive click events.
listener | the listener interface to add |
---|
Gets the history token referenced by this hyperlink.
Gets the direction of this object's text.
Fired whenever a browser event is received.
event | the event received |
---|
This method is deprecated.
Use the removeHandler()
method on the object returned by an add*Handler method instead
Removes a previously added listener interface.
listener | the listener interface to remove |
---|
Sets the DirectionEstimator
object.
Note: DirectionEstimator should be set before the widget has any content; it's highly recommended to set it using a constructor. Reason: if the widget already has non-empty content, this will update its direction according to the new estimator's result. This may cause flicker, and thus should be avoided.
directionEstimator | The {code DirectionEstimator} to be set. null means turning off direction estimation.
|
---|
Toggles on / off direction estimation.
See note at setDirectionEstimator(DirectionEstimator)
.
enabled | Whether to enable direction estimation. If true ,
sets the DirectionEstimator object to a default
DirectionEstimator .
|
---|
Sets this object's contents via known-safe HTML.
The object will behave exactly the same as when a widget's
setHTML(String)
method is
invoked; however the SafeHtml
passed to this method observes the
contract that it can be used in an HTML context without causing unsafe
script execution. Thus, unlike
setHTML(String)
, using this
method cannot result in Cross-Site Scripting security vulnerabilities.
html | the object's new HTML, represented as a SafeHtml object
|
---|
Sets this object's html, also declaring its direction.
html | the object's new html |
---|---|
dir | the html's direction |
Sets this object's contents via HTML. Use care when setting an object's
HTML; it is an easy way to expose script-based security problems. Consider
using setText(String)
whenever possible.
html | the object's new HTML |
---|
Sets the history token referenced by this hyperlink. This is the history
token that will be passed to newItem(String)
when this link is
clicked.
targetHistoryToken | the new history token, which may not be null (use
Anchor instead if you don't need history processing)
|
---|
Sets this object's text, also declaring its direction.
text | the object's new text |
---|---|
dir | the text's direction |
Affected Elements:
baseID | the base ID used by the main element |
---|