ASF Bugzilla – Attachment 22775 Details for
Bug 46080
javadoc for XSSFHyperlink
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
javadoc XSSFHyperlink
ooxml081024javadoc.diff (text/plain), 4.95 KB, created by
Gisella Bronzetti
on 2008-10-24 06:13:36 UTC
(
hide
)
Description:
javadoc XSSFHyperlink
Filename:
MIME Type:
Creator:
Gisella Bronzetti
Created:
2008-10-24 06:13:36 UTC
Size:
4.95 KB
patch
obsolete
>Index: src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java >=================================================================== >--- src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java (revision 706254) >+++ src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFHyperlink.java (working copy) >@@ -36,11 +36,23 @@ > private PackageRelationship externalRel; > private CTHyperlink ctHyperlink; > private String location; >- >+ >+ /** >+ * Create a new XSSFHyperlink. This method is protected to be used only by XSSFCreationHelper >+ * @param type - the type of hyperlink to create >+ * @see Hyperlink >+ */ > protected XSSFHyperlink(int type) { > this.type = type; > this.ctHyperlink = CTHyperlink.Factory.newInstance(); > } >+ /** >+ * Create a new XSSFHyperlink Initialize the hyperlink by a <code>HyperlinkRecord</code> record >+ * This method is protected to be used only by <link>XSSFSheet.initHyperlinks()</link> >+ * @param ctHyperlink >+ * @param PackageRelationship >+ * >+ */ > protected XSSFHyperlink(CTHyperlink ctHyperlink, PackageRelationship hyperlinkRel) { > this.ctHyperlink = ctHyperlink; > this.externalRel = hyperlinkRel; >@@ -106,36 +118,71 @@ > } > } > >+ /** >+ * Return the type of this hyperlink >+ * >+ * @return the type of this hyperlink >+ */ > public int getType() { > return type; > } > > /** > * Get the reference of the cell this applies to, >- * eg A55 >+ * es A55 > */ > public String getCellRef() { > return ctHyperlink.getRef(); > } > >+ /** >+ * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, path to a file >+ * >+ * @return the address of this hyperlink >+ */ > public String getAddress() { > return location; > } >+ >+ /** >+ * Return text label for this hyperlink >+ * @return text to display >+ */ > public String getLabel() { > return ctHyperlink.getDisplay(); > } >+ /** >+ * Location within target. If target is a workbook (or this workbook) this shall refer to a >+ * sheet and cell or a defined name. Can also be an HTML anchor if target is HTML file. >+ * @return location >+ */ > public String getLocation() { > return ctHyperlink.getLocation(); > } > >+ /** >+ * Sets text label for this hyperlink >+ * >+ * @param label text label for this hyperlink >+ */ > public void setLabel(String label) { > ctHyperlink.setDisplay(label); > } > >+ /** >+ * Location within target. If target is a workbook (or this workbook) this shall refer to a >+ * sheet and cell or a defined name. Can also be an HTML anchor if target is HTML file. >+ * @param location - string representing a location of this hyperlink >+ */ > public void setLocation(String location){ > ctHyperlink.setLocation(location); > } > >+ /** >+ * Hypelink address. Depending on the hyperlink type it can be URL, e-mail, path to a file >+ * >+ * @param address - the address of this hyperlink >+ */ > public void setAddress(String address) { > location = address; > //we must set location for internal hyperlinks >@@ -155,20 +202,50 @@ > return new CellReference(ctHyperlink.getRef()); > } > >+ >+ /** >+ * Return the column of the first cell that contains the hyperlink >+ * >+ * @return the 0-based column of the first cell that contains the hyperlink >+ */ > public int getFirstColumn() { > return buildCellReference().getCol(); > } >+ >+ >+ /** >+ * Return the column of the last cell that contains the hyperlink >+ * >+ * @return the 0-based column of the last cell that contains the hyperlink >+ */ > public int getLastColumn() { > return buildCellReference().getCol(); > } >- >+ >+ /** >+ * Return the row of the first cell that contains the hyperlink >+ * >+ * @return the 0-based row of the cell that contains the hyperlink >+ */ > public int getFirstRow() { > return buildCellReference().getRow(); > } >+ >+ >+ /** >+ * Return the row of the last cell that contains the hyperlink >+ * >+ * @return the 0-based row of the last cell that contains the hyperlink >+ */ > public int getLastRow() { > return buildCellReference().getRow(); > } >- >+ >+ /** >+ * Set the column of the first cell that contains the hyperlink >+ * >+ * @param col the 0-based column of the first cell that contains the hyperlink >+ */ > public void setFirstColumn(int col) { > ctHyperlink.setRef( > new CellReference( >@@ -176,9 +253,21 @@ > ).formatAsString() > ); > } >+ >+ /** >+ * Set the column of the last cell that contains the hyperlink >+ * >+ * @param col the 0-based column of the last cell that contains the hyperlink >+ */ > public void setLastColumn(int col) { > setFirstColumn(col); > } >+ >+ /** >+ * Set the row of the first cell that contains the hyperlink >+ * >+ * @param row the 0-based row of the first cell that contains the hyperlink >+ */ > public void setFirstRow(int row) { > ctHyperlink.setRef( > new CellReference( >@@ -186,6 +275,12 @@ > ).formatAsString() > ); > } >+ >+ /** >+ * Set the row of the last cell that contains the hyperlink >+ * >+ * @param row the 0-based row of the last cell that contains the hyperlink >+ */ > public void setLastRow(int row) { > setFirstRow(row); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 46080
: 22775