|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jxl.biff.RecordData | +--jxl.biff.WritableRecordData | +--jxl.write.biff.HyperlinkRecord
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.lang.String |
contents
The cell contents of the cell which activate this hyperlink. |
private byte[] |
data
The data for this hyperlink |
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 boolean |
modified
Indicates whether this record has been modified since it was copied |
private Range |
range
The range of this hyperlink. |
private WritableSheet |
sheet
The sheet containing 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.WritableRecordData |
maxRecordLength |
Fields inherited from class jxl.biff.RecordData |
code, record |
Constructor Summary | |
protected |
HyperlinkRecord(Hyperlink h,
WritableSheet s)
Constructs this object from the a readable spreadsheet |
protected |
HyperlinkRecord(int col,
int row,
int lastcol,
int lastrow,
java.io.File file)
Constructs a File hyperlink to a range of cells |
protected |
HyperlinkRecord(int col,
int row,
int lastcol,
int lastrow,
java.lang.String desc,
WritableSheet s,
int destcol,
int destrow,
int lastdestcol,
int lastdestrow)
Constructs a hyperlink to some cells within this workbook |
protected |
HyperlinkRecord(int col,
int row,
int lastcol,
int lastrow,
java.net.URL url)
Constructs a URL hyperlink to a range of cells |
Method Summary | |
int |
getColumn()
Returns the column number of the top left cell |
(package private) java.lang.String |
getContents()
Called by the worksheet. |
byte[] |
getData()
Gets the binary data to be written to the output file |
java.io.File |
getFile()
Returns the local file eferenced by this Hyperlink |
private byte[] |
getFileData(byte[] cd)
Gets the hyperlink stream specific to a local file link |
int |
getLastColumn()
Returns the column number of the bottom right cell |
int |
getLastRow()
Returns the row number of the bottom right cell |
private byte[] |
getLocationData(byte[] cd)
Gets the hyperlink stream specific to a location link |
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 |
int |
getRow()
Returns the row number of the top left cell |
private java.lang.String |
getShortName(java.lang.String s)
Gets the DOS short file name in 8.3 format of the name passed in |
java.net.URL |
getURL()
Gets the URL referenced by this Hyperlink |
private byte[] |
getURLData(byte[] cd)
Gets the hyperlink stream specific to a URL link |
(package private) void |
initialize(WritableSheet s)
Initializes the range when this hyperlink is added to the sheet |
(package private) void |
insertColumn(int c)
A column has been inserted, so adjust the range objects accordingly |
(package private) void |
insertRow(int r)
A row has been inserted, so adjust the range objects accordingly |
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 |
(package private) void |
removeColumn(int c)
A column has been removed, so adjust the range objects accordingly |
(package private) void |
removeRow(int r)
A row has been removed, so adjust the range objects accordingly |
void |
setFile(java.io.File file)
Sets the file activated by this hyperlink |
protected void |
setLocation(java.lang.String desc,
WritableSheet sheet,
int destcol,
int destrow,
int lastdestcol,
int lastdestrow)
Sets the location of the cells to be linked to within this workbook |
private void |
setLocation(WritableSheet sheet,
int destcol,
int destrow,
int lastdestcol,
int lastdestrow)
Initializes the location from the data passed in |
void |
setURL(java.net.URL url)
Sets the URL of this hyperlink |
java.lang.String |
toString()
A standard toString method |
Methods inherited from class jxl.biff.WritableRecordData |
getBytes, handleContinueRecords |
Methods inherited from class jxl.biff.RecordData |
getCode, getRecord |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int firstRow
private int lastRow
private int firstColumn
private int lastColumn
private java.net.URL url
private java.io.File file
private java.lang.String location
private java.lang.String contents
private HyperlinkRecord.LinkType linkType
private byte[] data
private Range range
private WritableSheet sheet
private boolean modified
private static final HyperlinkRecord.LinkType urlLink
private static final HyperlinkRecord.LinkType fileLink
private static final HyperlinkRecord.LinkType workbookLink
private static final HyperlinkRecord.LinkType unknown
Constructor Detail |
protected HyperlinkRecord(Hyperlink h, WritableSheet s)
hl
- the hyperlink from the read spreadsheetprotected HyperlinkRecord(int col, int row, int lastcol, int lastrow, java.net.URL url)
col
- the column containing this hyperlinkrow
- the row containing this hyperlinklastcol
- the last column which activates this hyperlinklastrow
- the last row which activates this hyperlinkurl
- the hyperlinkprotected HyperlinkRecord(int col, int row, int lastcol, int lastrow, java.io.File file)
col
- the column containing this hyperlinkrow
- the row containing this hyperlinklastcol
- the last column which activates this hyperlinklastrow
- the last row which activates this hyperlinkfile
- the hyperlinkprotected HyperlinkRecord(int col, int row, int lastcol, int lastrow, java.lang.String desc, WritableSheet s, int destcol, int destrow, int lastdestcol, int lastdestrow)
col
- the column containing this hyperlinkrow
- the row containing this hyperlinklastcol
- the last column which activates this hyperlinklastrow
- the last row which activates this hyperlinkdesc
- the contents of the cell which describe this hyperlinksheet
- the sheet containing the cells to be linked todestcol
- the column number of the first destination linked celldestrow
- the row number of the first destination linked celllastdestcol
- the column number of the last destination linked celllastdestrow
- the row number of the last destination linked cellMethod Detail |
public boolean isFile()
public boolean isURL()
public boolean isLocation()
public int getRow()
public int getColumn()
public int getLastRow()
public int getLastColumn()
public java.net.URL getURL()
public java.io.File getFile()
public byte[] getData()
getData
in class WritableRecordData
public java.lang.String toString()
toString
in class java.lang.Object
public Range getRange()
public void setURL(java.net.URL url)
url
- the urlpublic void setFile(java.io.File file)
file
- the fileprotected void setLocation(java.lang.String desc, WritableSheet sheet, int destcol, int destrow, int lastdestcol, int lastdestrow)
desc
- the label describing the linksheet
- the sheet containing the cells to be linked todestcol
- the column number of the first destination linked celldestrow
- the row number of the first destination linked celllastdestcol
- the column number of the last destination linked celllastdestrow
- the row number of the last destination linked cellprivate void setLocation(WritableSheet sheet, int destcol, int destrow, int lastdestcol, int lastdestrow)
sheet
- the sheet containing the cells to be linked todestcol
- the column number of the first destination linked celldestrow
- the row number of the first destination linked celllastdestcol
- the column number of the last destination linked celllastdestrow
- the row number of the last destination linked cellvoid insertRow(int r)
r
- the row which has been insertedvoid insertColumn(int c)
c
- the column which has been insertedvoid removeRow(int r)
r
- the row which has been insertedvoid removeColumn(int c)
c
- the column which has been removedprivate byte[] getURLData(byte[] cd)
cd
- the data common for all types of hyperlinkprivate byte[] getFileData(byte[] cd)
cd
- the data common for all types of hyperlinkprivate java.lang.String getShortName(java.lang.String s)
s
- the nameprivate byte[] getLocationData(byte[] cd)
cd
- the data common for all types of hyperlinkvoid initialize(WritableSheet s)
s
- the sheet containing this hyperlinkjava.lang.String getContents()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |