Hyperlink
Inheritance: java.lang.Object
public class Hyperlink
Encapsulates the object that represents a hyperlink.
Example
//Instantiating a Workbook object
Workbook workbook = new Workbook();
//Adding a new worksheet to the Workbook object
workbook.getWorksheets().add();
//Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.getWorksheets().get(0);
//Adding a hyperlink to a URL at "A1" cell
int index = worksheet.getHyperlinks().add("A1", 1, 1, "http://www.aspose.com");
//Getting a Hyperlink by index.
Hyperlink hyperlink = worksheet.getHyperlinks().get(index);
//Setting display text of this hyperlink.
hyperlink.setTextToDisplay("Aspose");
//Saving the Excel file
workbook.save("book1.xls");
Methods
Method | Description |
---|---|
delete() | Deletes this hyperlink |
equals(Object arg0) | |
getAddress() | Represents the address of a hyperlink. |
getArea() | Gets the range of hyperlink. |
getClass() | |
getLinkType() | Gets the link type. |
getScreenTip() | Returns or sets the ScreenTip text for the specified hyperlink. |
getTextToDisplay() | Represents the text to be displayed for the specified hyperlink. |
hashCode() | |
notify() | |
notifyAll() | |
setAddress(String value) | Represents the address of a hyperlink. |
setScreenTip(String value) | Returns or sets the ScreenTip text for the specified hyperlink. |
setTextToDisplay(String value) | Represents the text to be displayed for the specified hyperlink. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
delete()
public void delete()
Deletes this hyperlink
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getAddress()
public String getAddress()
Represents the address of a hyperlink.
Returns: java.lang.String
getArea()
public CellArea getArea()
Gets the range of hyperlink.
Returns: CellArea
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getLinkType()
public int getLinkType()
Gets the link type.
See TargetModeType.
Returns: int
getScreenTip()
public String getScreenTip()
Returns or sets the ScreenTip text for the specified hyperlink.
Returns: java.lang.String
getTextToDisplay()
public String getTextToDisplay()
Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
Returns: java.lang.String
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setAddress(String value)
public void setAddress(String value)
Represents the address of a hyperlink.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setScreenTip(String value)
public void setScreenTip(String value)
Returns or sets the ScreenTip text for the specified hyperlink.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setTextToDisplay(String value)
public void setTextToDisplay(String value)
Represents the text to be displayed for the specified hyperlink. The default value is the address of the hyperlink.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |