org.apache.poi.hssf.usermodel
Class HSSFHyperlink

java.lang.Object
  extended by org.apache.poi.hssf.usermodel.HSSFHyperlink

public class HSSFHyperlink
extends java.lang.Object

Represents an Excel hyperlink.

Author:
Yegor Kozlov (yegor at apache dot org)

Field Summary
static int LINK_DOCUMENT
          Link to a place in this document
static int LINK_EMAIL
          Link to an E-mail address
static int LINK_FILE
          Link to a file
protected  int link_type
          If we create a new hypelrink remember its type
static int LINK_URL
          Link to a existing file or web page
protected  HyperlinkRecord record
          Low-level record object that stores the actual hyperlink data
 
Constructor Summary
protected HSSFHyperlink(HyperlinkRecord record)
          Initialize the hyperlink by a HyperlinkRecord record
  HSSFHyperlink(int type)
          Construct a new hyperlink
 
Method Summary
 java.lang.String getAddress()
          Hypelink address.
 short getFirstColumn()
          Return the column of the first cell that contains the hyperlink
 int getFirstRow()
          Return the row of the first cell that contains the hyperlink
 java.lang.String getLabel()
          Return text label for this hyperlink
 short getLastColumn()
          Return the column of the last cell that contains the hyperlink
 int getLastRow()
          Return the row of the last cell that contains the hyperlink
protected  int getType()
          Return the type of this hyperlink
 void setAddress(java.lang.String address)
          Hypelink address.
 void setFirstColumn(short col)
          Set the column of the first cell that contains the hyperlink
 void setFirstRow(int row)
          Set the row of the first cell that contains the hyperlink
 void setLabel(java.lang.String label)
          Sets text label for this hyperlink
 void setLastColumn(short col)
          Set the column of the last cell that contains the hyperlink
 void setLastRow(int row)
          Set the row of the last cell that contains the hyperlink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINK_URL

public static final int LINK_URL
Link to a existing file or web page

See Also:
Constant Field Values

LINK_DOCUMENT

public static final int LINK_DOCUMENT
Link to a place in this document

See Also:
Constant Field Values

LINK_EMAIL

public static final int LINK_EMAIL
Link to an E-mail address

See Also:
Constant Field Values

LINK_FILE

public static final int LINK_FILE
Link to a file

See Also:
Constant Field Values

record

protected HyperlinkRecord record
Low-level record object that stores the actual hyperlink data


link_type

protected int link_type
If we create a new hypelrink remember its type

Constructor Detail

HSSFHyperlink

public HSSFHyperlink(int type)
Construct a new hyperlink

Parameters:
type - the type of hyperlink to create

HSSFHyperlink

protected HSSFHyperlink(HyperlinkRecord record)
Initialize the hyperlink by a HyperlinkRecord record

Parameters:
record -
Method Detail

getFirstRow

public int getFirstRow()
Return the row of the first cell that contains the hyperlink

Returns:
the 0-based row of the cell that contains the hyperlink

setFirstRow

public void setFirstRow(int row)
Set the row of the first cell that contains the hyperlink

Parameters:
row - the 0-based row of the first cell that contains the hyperlink

getLastRow

public int getLastRow()
Return the row of the last cell that contains the hyperlink

Returns:
the 0-based row of the last cell that contains the hyperlink

setLastRow

public void setLastRow(int row)
Set the row of the last cell that contains the hyperlink

Parameters:
row - the 0-based row of the last cell that contains the hyperlink

getFirstColumn

public short getFirstColumn()
Return the column of the first cell that contains the hyperlink

Returns:
the 0-based column of the first cell that contains the hyperlink

setFirstColumn

public void setFirstColumn(short col)
Set the column of the first cell that contains the hyperlink

Parameters:
col - the 0-based column of the first cell that contains the hyperlink

getLastColumn

public short getLastColumn()
Return the column of the last cell that contains the hyperlink

Returns:
the 0-based column of the last cell that contains the hyperlink

setLastColumn

public void setLastColumn(short col)
Set the column of the last cell that contains the hyperlink

Parameters:
col - the 0-based column of the last cell that contains the hyperlink

getAddress

public java.lang.String getAddress()
Hypelink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.

Returns:
the address of this hyperlink

setAddress

public void setAddress(java.lang.String address)
Hypelink address. Depending on the hyperlink type it can be URL, e-mail, patrh to a file, etc.

Parameters:
address - the address of this hyperlink

getLabel

public java.lang.String getLabel()
Return text label for this hyperlink

Returns:
text to display

setLabel

public void setLabel(java.lang.String label)
Sets text label for this hyperlink

Parameters:
label - text label for this hyperlink

getType

protected int getType()
Return the type of this hyperlink

Returns:
the type of this hyperlink


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.