DhHyperlink Class

DhHyperlink Class

This Package | All Packages

DhSection
  |
  +--DhHyperlink
public class DhHyperlink
extends DhSection

Creates a jump in the document to another place in the current document or to a different document.

Constructors
Name Description
DhHyperlink() Creates default hyperlink object.
DhHyperlink(String url, String text) Creates a "classic" hyperlink that navigates the user to the document the url parameter points to.

Methods
Name Description
getEnabled() Retrieves the enabled state of the hyperlink.
getJumpPoint() Returns the local target of the jump.
getStockTargetWindow() Returns the window id where the browser will put the document.
getTargetWindow() Retrieves the name of the window where the browser will put the document.
getText() Retrieves the hyperlink text.
getURL() Retrieves the target URL for the hyperlink.
setEnabled( boolean f) Sets the enabled state of the hyperlink.
setJumpPoint( DhElement target ) Sets the destination of this hyperlink to be some element on this page.
setStockTargetWindow( int targetID ) Tells the browser which window to put the document into.
setTargetWindow(String winName) Tells the browser which window to put the document into.
setText( String text ) Sets the text the user sees in the hyperlink.
setURL(String url) Sets the pointer to the document.

Constructors

DhHyperlink.DhHyperlink

Syntax 1
public DhHyperlink();
Description

Creates default hyperlink object.

See Also
setURL, setJumpPoint, setText



Syntax 2
public DhHyperlink( String url, String text );
Parameters
url
The document to link to.
text
The text that the user sees as the hyperlink.
Description

Creates a "classic" hyperlink that navigates the user to the document the url parameter points to.

Methods

DhHyperlink.getEnabled

Syntax
public boolean getEnabled();
Return Value

Returns true if the hyperlink is enabled; otherwise, returns false .

Description

Retrieves the enabled state of the hyperlink.

DhHyperlink.getJumpPoint

Syntax
public synchronized DhElement getJumpPoint();
Description

Returns the local target of the jump.

See Also
setJumpPoint

DhHyperlink.getStockTargetWindow

Syntax
public int getStockTargetWindow();
Return Value

Returns one of the stock window IDs in LinkTargetEnum.

Description

Returns the window id where the browser will put the document.

See Also
getTargetWindow

DhHyperlink.getTargetWindow

Syntax
public String getTargetWindow();
Parameters
winName
The name of a window in a frameset.
Description

Retrieves the name of the window where the browser will put the document.

See Also
setStockTargetWindow

DhHyperlink.getText

Syntax
public synchronized String getText();
Return Value

Returns the text the user sees in the hyperlink.

Description

Retrieves the hyperlink text.

DhHyperlink.getURL

Syntax
public String getURL();
Return Value

Returns the current URL where users would be sent if they clicked the hyperlink.

Description

Retrieves the target URL for the hyperlink.

DhHyperlink.setEnabled

Syntax
public void setEnabled( boolean f );
Parameters
f
Set to true to enable the hyperlink; set to false disabled it.
Description

Sets the enabled state of the hyperlink.

DhHyperlink.setJumpPoint

Syntax
public synchronized void setJumpPoint( DhElement target );
Parameters
target
The element you want users to jump to when they click this hyperlink.
Description

Sets the destination of this hyperlink to be some element on this page.

DhHyperlink.setStockTargetWindow

Syntax
public void setStockTargetWindow( int targetID );
Parameters
targetID
One of the stock window IDs in LinkTargetEnum.
Description

Tells the browser which window to put the document into.

See Also
setTargetWindow

DhHyperlink.setTargetWindow

Syntax
public void setTargetWindow( String winName );
Parameters
winName
The name of a window in a frameset.
Description

Tells the browser which window to put the document into.

See Also
setStockTargetWindow

DhHyperlink.setText

Syntax
public synchronized void setText( String text );
Parameters
text
The string displayed to the user.
Description

Sets the text the user sees in the hyperlink.

DhHyperlink.setURL

Syntax
public void setURL( String url );
Parameters
url
Sets the pointer to the document.
Description

Sets the pointer to the document.