jxl.read.biff
Class HyperlinkRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.read.biff.HyperlinkRecord
All Implemented Interfaces:
Hyperlink

public class HyperlinkRecord
extends RecordData
implements Hyperlink

A number record. This is stored as 8 bytes, as opposed to the 4 byte RK record


Inner Class Summary
private static class HyperlinkRecord.LinkType
          The excel type of hyperlink
 
Field Summary
private  java.io.File file
          The local file referred to by this hyperlink
private static HyperlinkRecord.LinkType fileLink
           
private  int firstColumn
          The first column
private  int firstRow
          The first row
private  int lastColumn
          The last column
private  int lastRow
          The last row
private  HyperlinkRecord.LinkType linkType
          The type of this hyperlink
private  java.lang.String location
          The location in this workbook referred to by this hyperlink
private  SheetRangeImpl range
          The range of cells which activate this hyperlink
private static HyperlinkRecord.LinkType unknown
           
private  java.net.URL url
          The URL referred to by this hyperlink
private static HyperlinkRecord.LinkType urlLink
           
private static HyperlinkRecord.LinkType workbookLink
           
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
(package private) HyperlinkRecord(Record t, Sheet s, WorkbookSettings ws)
          Constructs this object from the raw data
 
Method Summary
 int getColumn()
          Returns the column number of the top left cell
 java.io.File getFile()
          Returns the local file eferenced by this Hyperlink
 int getLastColumn()
          Returns the column number of the bottom right cell
 int getLastRow()
          Returns the row number of the bottom right cell
 java.lang.String getLocation()
          Gets the location referenced by this hyperlink
 Range getRange()
          Gets the range of cells which activate this hyperlink The get sheet index methods will all return -1, because the cells will all be present on the same sheet
 Record getRecord()
          Exposes the base class method.
 int getRow()
          Returns the row number of the top left cell
 java.net.URL getURL()
          Gets the URL referenced by this Hyperlink
 boolean isFile()
          Determines whether this is a hyperlink to a file
 boolean isLocation()
          Determines whether this is a hyperlink to a location in this workbook
 boolean isURL()
          Determines whether this is a hyperlink to a web resource
 
Methods inherited from class jxl.biff.RecordData
getCode
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

firstRow

private int firstRow
The first row

lastRow

private int lastRow
The last row

firstColumn

private int firstColumn
The first column

lastColumn

private int lastColumn
The last column

url

private java.net.URL url
The URL referred to by this hyperlink

file

private java.io.File file
The local file referred to by this hyperlink

location

private java.lang.String location
The location in this workbook referred to by this hyperlink

range

private SheetRangeImpl range
The range of cells which activate this hyperlink

linkType

private HyperlinkRecord.LinkType linkType
The type of this hyperlink

urlLink

private static final HyperlinkRecord.LinkType urlLink

fileLink

private static final HyperlinkRecord.LinkType fileLink

workbookLink

private static final HyperlinkRecord.LinkType workbookLink

unknown

private static final HyperlinkRecord.LinkType unknown
Constructor Detail

HyperlinkRecord

HyperlinkRecord(Record t,
                Sheet s,
                WorkbookSettings ws)
Constructs this object from the raw data
Parameters:
t - the raw data
Method Detail

isFile

public boolean isFile()
Determines whether this is a hyperlink to a file
Specified by:
isFile in interface Hyperlink
Returns:
TRUE if this is a hyperlink to a file, FALSE otherwise

isURL

public boolean isURL()
Determines whether this is a hyperlink to a web resource
Specified by:
isURL in interface Hyperlink
Returns:
TRUE if this is a URL

isLocation

public boolean isLocation()
Determines whether this is a hyperlink to a location in this workbook
Specified by:
isLocation in interface Hyperlink
Returns:
TRUE if this is a link to an internal location

getRow

public int getRow()
Returns the row number of the top left cell
Specified by:
getRow in interface Hyperlink
Returns:
the row number of this cell

getColumn

public int getColumn()
Returns the column number of the top left cell
Specified by:
getColumn in interface Hyperlink
Returns:
the column number of this cell

getLastRow

public int getLastRow()
Returns the row number of the bottom right cell
Specified by:
getLastRow in interface Hyperlink
Returns:
the row number of this cell

getLastColumn

public int getLastColumn()
Returns the column number of the bottom right cell
Specified by:
getLastColumn in interface Hyperlink
Returns:
the column number of this cell

getURL

public java.net.URL getURL()
Gets the URL referenced by this Hyperlink
Specified by:
getURL in interface Hyperlink
Returns:
the URL, or NULL if this hyperlink is not a URL

getFile

public java.io.File getFile()
Returns the local file eferenced by this Hyperlink
Specified by:
getFile in interface Hyperlink
Returns:
the file, or NULL if this hyperlink is not a file

getRecord

public Record getRecord()
Exposes the base class method. This is used when copying hyperlinks
Overrides:
getRecord in class RecordData
Returns:
the Record data

getRange

public Range getRange()
Gets the range of cells which activate this hyperlink The get sheet index methods will all return -1, because the cells will all be present on the same sheet
Specified by:
getRange in interface Hyperlink
Returns:
the range of cells which activate the hyperlink

getLocation

public java.lang.String getLocation()
Gets the location referenced by this hyperlink
Returns:
the location