Top Description Fields Constructors Methods
javafx.scene.control

public Class Hyperlink

extends ButtonBase
Class Inheritance
Imports
javafx.beans.property.BooleanProperty, .BooleanPropertyBase, javafx.beans.value.WritableValue, javafx.event.ActionEvent, javafx.scene.AccessibleAttribute, .AccessibleRole, .Cursor, .Node, javafx.css.PseudoClass, .StyleableProperty, javafx.scene.control.skin.HyperlinkSkin

An HTML like label which can be a graphic and/or text which responds to rollovers and clicks. When a hyperlink is clicked/pressed isVisited becomes true. A Hyperlink behaves just like a Button. When a hyperlink is pressed and released a ActionEvent is sent, and your application can perform some action based on this event.

Example:

Hyperlink link = new Hyperlink("www.oracle.com");
Image of the Hyperlink control
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
private static final String
private static final PseudoClass
private BooleanProperty

Constructor Summary

AccessConstructor and Description

Method Summary

Modifier and TypeMethod and Description
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control.

public void
fire()

Implements abstract javafx.scene.control.ButtonBase.fire.

Implemented to invoke the ActionEvent if one is defined.

protected Cursor
getInitialCursor()

Overrides javafx.scene.Node.getInitialCursor.

Returns the initial cursor state of this control, for use by the JavaFX CSS engine to correctly set its initial value.

private void
public final boolean
public Object
queryAccessibleAttribute(AccessibleAttribute
the requested attribute
attribute
,
Object...
optional list of parameters
parameters
)

Overrides javafx.scene.control.Control.queryAccessibleAttribute.

This method is called by the assistive technology to request the value for an attribute.

public final void
setVisited(boolean value)

public final BooleanProperty

Returns:

true if this link has already been "visited"
visitedProperty
()

Indicates whether this link has already been "visited".

Inherited from javafx.scene.control.ButtonBase:
armarmedPropertydisarmexecuteAccessibleActiongetOnActionisArmedonActionPropertysetOnAction

Field Detail

DEFAULT_STYLE_CLASSback to summary
private static final String DEFAULT_STYLE_CLASS
PSEUDO_CLASS_VISITEDback to summary
private static final PseudoClass PSEUDO_CLASS_VISITED
visitedback to summary
private BooleanProperty visited

Constructor Detail

Method Detail

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Doc from javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Returns:Skin<?>

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Annotations
@Override
fireback to summary
public void fire()

Implements abstract javafx.scene.control.ButtonBase.fire.

Implemented to invoke the ActionEvent if one is defined. This function will also setVisited to true.

Annotations
@Override
getInitialCursorback to summary
protected Cursor getInitialCursor()

Overrides javafx.scene.Node.getInitialCursor.

Returns the initial cursor state of this control, for use by the JavaFX CSS engine to correctly set its initial value. This method is overridden to use the HAND cursor initially.

Returns:Cursor

Doc from javafx.scene.Node.getInitialCursor.

the initial cursor state for this Node.

Annotations
@Override
Since
9
initializeback to summary
private void initialize()
isVisitedback to summary
public final boolean isVisited()
queryAccessibleAttributeback to summary
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)

Overrides javafx.scene.control.Control.queryAccessibleAttribute.

Doc from javafx.scene.control.Control.queryAccessibleAttribute.

This method is called by the assistive technology to request the value for an attribute.

This method is commonly overridden by subclasses to implement attributes that are required for a specific role.
If a particular attribute is not handled, the superclass implementation must be called.

Parameters
attribute:AccessibleAttribute

Doc from javafx.scene.Node.queryAccessibleAttribute.

the requested attribute

parameters:Object[]

Doc from javafx.scene.Node.queryAccessibleAttribute.

optional list of parameters

Returns:Object

Doc from javafx.scene.Node.queryAccessibleAttribute.

the value for the requested attribute

Annotations
@Override
setVisitedback to summary
public final void setVisited(boolean value)
visitedPropertyback to summary
public final BooleanProperty visitedProperty()

Indicates whether this link has already been "visited".

Returns:BooleanProperty

true if this link has already been "visited"