public class HSSFHyperlink implements Hyperlink {\r
\r
/**\r
- * Link to an existing file or web page\r
+ * Link to an existing file or web page
+ * May be deprecated in the future. Consider using {@link Hyperlink#LINK_URL} instead.\r
*/\r
- public static final int LINK_URL = 1;\r
+ public static final int LINK_URL = Hyperlink.LINK_URL;\r
\r
/**
* Link to a place in this document
+ * May be deprecated in the future. Consider using {@link Hyperlink#LINK_DOCUMENT} instead.
*/
- public static final int LINK_DOCUMENT = 2;
+ public static final int LINK_DOCUMENT = Hyperlink.LINK_DOCUMENT;
/**
* Link to an E-mail address
+ * May be deprecated in the future. Consider using {@link Hyperlink#LINK_EMAIL} instead.
*/
- public static final int LINK_EMAIL = 3;
+ public static final int LINK_EMAIL = Hyperlink.LINK_EMAIL;
/**
* Link to a file
+ * May be deprecated in the future. Consider using {@link Hyperlink#LINK_FILE} instead.
*/
- public static final int LINK_FILE = 4;
+ public static final int LINK_FILE = Hyperlink.LINK_FILE;
/**
* Low-level record object that stores the actual hyperlink data
*
* @return the 0-based row of the cell that contains the hyperlink
*/
+ @Override
public int getFirstRow(){
return record.getFirstRow();
}
*
* @param row the 0-based row of the first cell that contains the hyperlink
*/
+ @Override
public void setFirstRow(int row){
record.setFirstRow(row);
}
*
* @return the 0-based row of the last cell that contains the hyperlink
*/
+ @Override
public int getLastRow(){
return record.getLastRow();
}
*
* @param row the 0-based row of the last cell that contains the hyperlink
*/
+ @Override
public void setLastRow(int row){
record.setLastRow(row);
}
*
* @return the 0-based column of the first cell that contains the hyperlink
*/
+ @Override
public int getFirstColumn(){
return record.getFirstColumn();
}
*
* @param col the 0-based column of the first cell that contains the hyperlink
*/
+ @Override
public void setFirstColumn(int col){
record.setFirstColumn((short)col);
}
*
* @return the 0-based column of the last cell that contains the hyperlink
*/
+ @Override
public int getLastColumn(){
return record.getLastColumn();
}
*
* @param col the 0-based column of the last cell that contains the hyperlink
*/
+ @Override
public void setLastColumn(int col){
record.setLastColumn((short)col);
}\r
* Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.\r
*\r
* @return the address of this hyperlink\r
- */\r
+ */
+ @Override\r
public String getAddress(){
return record.getAddress();
}
* Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.\r
*\r
* @param address the address of this hyperlink\r
- */\r
+ */
+ @Override\r
public void setAddress(String address){
record.setAddress(address);
}
*
* @return text to display
*/
+ @Override
public String getLabel(){
return record.getLabel();
}
*
* @param label text label for this hyperlink
*/
+ @Override
public void setLabel(String label){
record.setLabel(label);
}
*
* @return the type of this hyperlink
*/
+ @Override
public int getType(){
return link_type;
}
*
* @return the type of this hyperlink
*/
+ @Override
public int getType() {
return _type;
}
*
* @return the address of this hyperlink
*/
+ @Override
public String getAddress() {
return _location;
}
*
* @return text to display
*/
+ @Override
public String getLabel() {
return _ctHyperlink.getDisplay();
}
*
* @param label text label for this hyperlink
*/
+ @Override
public void setLabel(String label) {
_ctHyperlink.setDisplay(label);
}
*
* @param address - the address of this hyperlink
*/
+ @Override
public void setAddress(String address) {
validate(address);
*
* @return the 0-based column of the first cell that contains the hyperlink
*/
+ @Override
public int getFirstColumn() {
return buildCellReference().getCol();
}
*
* @return the 0-based column of the last cell that contains the hyperlink
*/
+ @Override
public int getLastColumn() {
return buildCellReference().getCol();
}
*
* @return the 0-based row of the cell that contains the hyperlink
*/
+ @Override
public int getFirstRow() {
return buildCellReference().getRow();
}
*
* @return the 0-based row of the last cell that contains the hyperlink
*/
+ @Override
public int getLastRow() {
return buildCellReference().getRow();
}
*
* @param col the 0-based column of the first cell that contains the hyperlink
*/
+ @Override
public void setFirstColumn(int col) {
setCellReference(new CellReference( getFirstRow(), col ));
}
*
* @param col the 0-based column of the last cell that contains the hyperlink
*/
+ @Override
public void setLastColumn(int col) {
setFirstColumn(col);
}
*
* @param row the 0-based row of the first cell that contains the hyperlink
*/
+ @Override
public void setFirstRow(int row) {
setCellReference(new CellReference( row, getFirstColumn() ));
}
*
* @param row the 0-based row of the last cell that contains the hyperlink
*/
+ @Override
public void setLastRow(int row) {
setFirstRow(row);
}