jxl.write
Class WritableHyperlink

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.biff.WritableRecordData
              |
              +--jxl.write.biff.HyperlinkRecord
                    |
                    +--jxl.write.WritableHyperlink
All Implemented Interfaces:
ByteData, Hyperlink

public class WritableHyperlink
extends HyperlinkRecord
implements Hyperlink

A writable hyperlink. Provides API to modify the contents of the hyperlink


Inner classes inherited from class jxl.write.biff.HyperlinkRecord
HyperlinkRecord.LinkType
 
Fields inherited from class jxl.write.biff.HyperlinkRecord
contents, data, file, fileLink, firstColumn, firstRow, lastColumn, lastRow, linkType, location, modified, range, sheet, unknown, url, urlLink, workbookLink
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
WritableHyperlink(Hyperlink h, WritableSheet ws)
          Constructor used internally by the worksheet when making a copy of worksheet
WritableHyperlink(int col, int row, java.io.File file)
          Constructs a file hyperlink in a single cell
WritableHyperlink(int col, int row, int lastcol, int lastrow, java.io.File file)
          Constructs a File hyperlink to a range of cells
WritableHyperlink(int col, int row, int lastcol, int lastrow, java.lang.String desc, WritableSheet sheet, int destcol, int destrow, int lastdestcol, int lastdestrow)
          Constructs a hyperlink to some cells within this workbook
WritableHyperlink(int col, int row, int lastcol, int lastrow, java.net.URL url)
          Constructs a url hyperlink to a range of cells
WritableHyperlink(int col, int row, java.lang.String desc, WritableSheet sheet, int destcol, int destrow)
          Constructs a hyperlink to some cells within this workbook
WritableHyperlink(int col, int row, java.net.URL url)
          Constructs a URL hyperlink in a single cell
 
Method Summary
 void setFile(java.io.File file)
          Sets the file activated by this hyperlink
 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
 void setURL(java.net.URL url)
          Sets the URL of this hyperlink
 
Methods inherited from class jxl.write.biff.HyperlinkRecord
getColumn, getContents, getData, getFile, getFileData, getLastColumn, getLastRow, getLocationData, getRange, getRow, getShortName, getURL, getURLData, initialize, insertColumn, insertRow, isFile, isLocation, isURL, removeColumn, removeRow, setLocation, toString
 
Methods inherited from class jxl.biff.WritableRecordData
getBytes
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface jxl.Hyperlink
getColumn, getFile, getLastColumn, getLastRow, getRange, getRow, getURL, isFile, isLocation, isURL
 

Constructor Detail

WritableHyperlink

public WritableHyperlink(Hyperlink h,
                         WritableSheet ws)
Constructor used internally by the worksheet when making a copy of worksheet
Parameters:
h - the hyperlink being read in
ws - the writable sheet containing the hyperlink

WritableHyperlink

public WritableHyperlink(int col,
                         int row,
                         java.net.URL url)
Constructs a URL hyperlink in a single cell
Parameters:
col - the column containing this hyperlink
row - the row containing this hyperlink
url - the hyperlink

WritableHyperlink

public WritableHyperlink(int col,
                         int row,
                         int lastcol,
                         int lastrow,
                         java.net.URL url)
Constructs a url hyperlink to a range of cells
Parameters:
col - the column containing this hyperlink
row - the row containing this hyperlink
lastcol - the last column which activates this hyperlink
lastrow - the last row which activates this hyperlink
url - the hyperlink

WritableHyperlink

public WritableHyperlink(int col,
                         int row,
                         java.io.File file)
Constructs a file hyperlink in a single cell
Parameters:
col - the column containing this hyperlink
row - the row containing this hyperlink
file - the hyperlink

WritableHyperlink

public WritableHyperlink(int col,
                         int row,
                         int lastcol,
                         int lastrow,
                         java.io.File file)
Constructs a File hyperlink to a range of cells
Parameters:
col - the column containing this hyperlink
row - the row containing this hyperlink
lastcol - the last column which activates this hyperlink
lastrow - the last row which activates this hyperlink
file - the hyperlink

WritableHyperlink

public WritableHyperlink(int col,
                         int row,
                         java.lang.String desc,
                         WritableSheet sheet,
                         int destcol,
                         int destrow)
Constructs a hyperlink to some cells within this workbook
Parameters:
col - the column containing this hyperlink
row - the row containing this hyperlink
desc - the cell contents for this hyperlink
sheet - the sheet containing the cells to be linked to
destcol - the column number of the first destination linked cell
destrow - the row number of the first destination linked cell

WritableHyperlink

public WritableHyperlink(int col,
                         int row,
                         int lastcol,
                         int lastrow,
                         java.lang.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 hyperlink
row - the row containing this hyperlink
lastcol - the last column which activates this hyperlink
lastrow - the last row which activates this hyperlink
desc - the cell contents for this hyperlink
sheet - the sheet containing the cells to be linked to
destcol - the column number of the first destination linked cell
destrow - the row number of the first destination linked cell
lastdestcol - the column number of the last destination linked cell
lastdestrow - the row number of the last destination linked cell
Method Detail

setURL

public void setURL(java.net.URL url)
Sets the URL of this hyperlink
Overrides:
setURL in class HyperlinkRecord
Parameters:
url - the url

setFile

public void setFile(java.io.File file)
Sets the file activated by this hyperlink
Overrides:
setFile in class HyperlinkRecord
Parameters:
file - the file

setLocation

public 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
Overrides:
setLocation in class HyperlinkRecord
Parameters:
desc - the label describing the link
sheet - the sheet containing the cells to be linked to
destcol - the column number of the first destination linked cell
destrow - the row number of the first destination linked cell
lastdestcol - the column number of the last destination linked cell
lastdestrow - the row number of the last destination linked cell