Package jxl.write
Class WritableHyperlink
java.lang.Object
jxl.biff.RecordData
jxl.biff.WritableRecordData
jxl.write.biff.HyperlinkRecord
jxl.write.WritableHyperlink
- All Implemented Interfaces:
jxl.biff.ByteData
,Hyperlink
A writable hyperlink. Provides API to modify the contents of the hyperlink
-
Constructor Summary
ConstructorsConstructorDescriptionWritableHyperlink
(int col, int row, int lastcol, int lastrow, File file) Constructs a File hyperlink to a range of cellsWritableHyperlink
(int col, int row, int lastcol, int lastrow, File file, String desc) Constructs a File hyperlink to a range of cellsWritableHyperlink
(int col, int row, int lastcol, int lastrow, String desc, WritableSheet sheet, int destcol, int destrow, int lastdestcol, int lastdestrow) Constructs a hyperlink to some cells within this workbookWritableHyperlink
(int col, int row, int lastcol, int lastrow, URL url) Constructs a url hyperlink to a range of cellsWritableHyperlink
(int col, int row, int lastcol, int lastrow, URL url, String desc) Constructs a url hyperlink to a range of cellsWritableHyperlink
(int col, int row, File file) Constructs a file hyperlink in a single cellWritableHyperlink
(int col, int row, File file, String desc) Constructs a file hyperlink in a single cellWritableHyperlink
(int col, int row, String desc, WritableSheet sheet, int destcol, int destrow) Constructs a hyperlink to some cells within this workbookWritableHyperlink
(int col, int row, URL url) Constructs a URL hyperlink in a single cellConstructor used internally by the worksheet when making a copy of worksheet -
Method Summary
Modifier and TypeMethodDescriptionvoid
setDescription
(String desc) Sets the description to appear in the hyperlink cellvoid
Sets the file activated by this hyperlinkvoid
setLocation
(String desc, WritableSheet sheet, int destcol, int destrow, int lastdestcol, int lastdestrow) Sets the location of the cells to be linked to within this workbookvoid
Sets the URL of this hyperlinkMethods inherited from class jxl.write.biff.HyperlinkRecord
getColumn, getData, getFile, getLastColumn, getLastRow, getRange, getRow, getURL, isFile, isLocation, isUNC, isURL, toString
Methods inherited from class jxl.biff.WritableRecordData
getBytes
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface jxl.Hyperlink
getColumn, getFile, getLastColumn, getLastRow, getRange, getRow, getURL, isFile, isLocation, isURL
-
Constructor Details
-
WritableHyperlink
Constructor used internally by the worksheet when making a copy of worksheet- Parameters:
h
- the hyperlink being read inws
- the writable sheet containing the hyperlink
-
WritableHyperlink
Constructs a URL hyperlink in a single cell- Parameters:
col
- the column containing this hyperlinkrow
- the row containing this hyperlinkurl
- the hyperlink
-
WritableHyperlink
Constructs a url hyperlink to a range of cells- Parameters:
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 hyperlink
-
WritableHyperlink
Constructs a url hyperlink to a range of cells- Parameters:
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 hyperlinkdesc
- the description text to place in the cell
-
WritableHyperlink
Constructs a file hyperlink in a single cell- Parameters:
col
- the column containing this hyperlinkrow
- the row containing this hyperlinkfile
- the hyperlink
-
WritableHyperlink
Constructs a file hyperlink in a single cell- Parameters:
col
- the column containing this hyperlinkrow
- the row containing this hyperlinkfile
- the hyperlinkdesc
- the hyperlink description
-
WritableHyperlink
Constructs a File hyperlink to a range of cells- Parameters:
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 hyperlink
-
WritableHyperlink
Constructs a File hyperlink to a range of cells- Parameters:
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 hyperlinkdesc
- the description
-
WritableHyperlink
public WritableHyperlink(int col, int row, String desc, WritableSheet sheet, int destcol, int destrow) Constructs a hyperlink to some cells within this workbook- Parameters:
col
- the column containing this hyperlinkrow
- the row containing this hyperlinkdesc
- the cell contents for 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 cell
-
WritableHyperlink
public WritableHyperlink(int col, int row, int lastcol, int lastrow, String desc, WritableSheet sheet, int destcol, int destrow, int lastdestcol, int lastdestrow) Constructs a hyperlink to some cells within this workbook- Parameters:
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 cell contents for 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 cell
-
-
Method Details
-
setURL
Sets the URL of this hyperlink- Overrides:
setURL
in classjxl.write.biff.HyperlinkRecord
- Parameters:
url
- the url
-
setFile
Sets the file activated by this hyperlink- Overrides:
setFile
in classjxl.write.biff.HyperlinkRecord
- Parameters:
file
- the file
-
setDescription
Sets the description to appear in the hyperlink cell- Parameters:
desc
- the description
-
setLocation
public void setLocation(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- Parameters:
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 cell
-