|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.record.Record org.apache.poi.hssf.record.HyperlinkRecord
public class HyperlinkRecord
The HyperlinkRecord
wraps an HLINK-record
from the Excel-97 format.
Supports only external links for now (eg http://)
Field Summary | |
---|---|
protected static byte[] |
FILE_MONIKER
|
protected static byte[] |
FILE_TAIL
Tail of a file link |
protected static int |
HLINK_ABS
|
protected static int |
HLINK_LABEL
|
protected static int |
HLINK_PLACE
|
protected static int |
HLINK_URL
Link flags |
static short |
sid
|
protected static byte[] |
STD_MONIKER
|
protected static byte[] |
URL_MONIKER
|
protected static byte[] |
URL_TAIL
Tail of a URL link |
Constructor Summary | |
---|---|
HyperlinkRecord()
Create a new hyperlink |
|
HyperlinkRecord(RecordInputStream in)
Read hyperlink from input stream |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
protected void |
fillFields(RecordInputStream in)
called by the constructor, should set class level fields. |
java.lang.String |
getAddress()
Hypelink address. |
int |
getFileOptions()
Options for a file link |
short |
getFirstColumn()
Return the column of the first cell that contains the hyperlink |
int |
getFirstRow()
Return the row of the first cell that contains the hyperlink |
byte[] |
getGuid()
Returns a 16-byte guid identifier. |
java.lang.String |
getLabel()
Return text label for this hyperlink |
int |
getLabelOptions()
Label options |
short |
getLastColumn()
Set the column of the last cell that contains the hyperlink |
int |
getLastRow()
Return the row of the last cell that contains the hyperlink |
int |
getLinkOptions()
Link options. |
byte[] |
getMoniker()
Returns a 16-byte moniker. |
int |
getRecordSize()
gives the current serialized size of the record. |
short |
getSid()
return the non static version of the id for this record. |
byte[] |
getTail()
|
void |
newDocumentLink()
Initialize a new document link |
void |
newFileLink()
Initialize a new file link |
void |
newUrlLink()
Initialize a new url link |
int |
serialize(int offset,
byte[] data)
called by the class that is responsible for writing this sucker. |
void |
setAddress(java.lang.String address)
Hypelink address. |
void |
setFirstColumn(short col)
Set the column of the first cell that contains the hyperlink |
void |
setFirstRow(int row)
Set the row of the first cell that contains the hyperlink |
void |
setLabel(java.lang.String label)
Sets text label for this hyperlink |
void |
setLastColumn(short col)
Set the column of the last cell that contains the hyperlink |
void |
setLastRow(int row)
Set the row of the last cell that contains the hyperlink |
java.lang.String |
toString()
get a string representation of the record (for biffview/debugging) |
protected void |
validateSid(short id)
called by constructor, should throw runtime exception in the event of a record passed with a differing ID. |
Methods inherited from class org.apache.poi.hssf.record.Record |
---|
cloneViaReserialise, isInValueSection, isValue, serialize |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int HLINK_URL
protected static final int HLINK_ABS
protected static final int HLINK_LABEL
protected static final int HLINK_PLACE
protected static final byte[] STD_MONIKER
protected static final byte[] URL_MONIKER
protected static final byte[] FILE_MONIKER
protected static final byte[] URL_TAIL
protected static final byte[] FILE_TAIL
public static final short sid
Constructor Detail |
---|
public HyperlinkRecord()
public HyperlinkRecord(RecordInputStream in)
in
- the stream to read fromMethod Detail |
---|
public short getFirstColumn()
public void setFirstColumn(short col)
col
- the 0-based column of the first cell that contains the hyperlinkpublic short getLastColumn()
public void setLastColumn(short col)
col
- the 0-based column of the last cell that contains the hyperlinkpublic int getFirstRow()
public void setFirstRow(int row)
row
- the 0-based row of the first cell that contains the hyperlinkpublic int getLastRow()
public void setLastRow(int row)
row
- the 0-based row of the last cell that contains the hyperlinkpublic byte[] getGuid()
STD_MONIKER
public byte[] getMoniker()
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
label
- text label for this hyperlinkpublic java.lang.String getAddress()
public void setAddress(java.lang.String address)
address
- the address of this hyperlinkpublic int getLinkOptions()
public int getLabelOptions()
public int getFileOptions()
public byte[] getTail()
protected void fillFields(RecordInputStream in)
Record
fillFields
in class Record
in
- the RecordInputstream to read the record frompublic short getSid()
Record
getSid
in class Record
protected void validateSid(short id)
Record
validateSid
in class Record
id
- alleged id for this recordpublic int serialize(int offset, byte[] data)
Record
serialize
in class Record
offset
- to begin writing atdata
- byte array containing instance data
public int getRecordSize()
Record
getRecordSize
in class Record
public java.lang.String toString()
Record
toString
in class Record
public void newUrlLink()
public void newFileLink()
public void newDocumentLink()
public java.lang.Object clone()
clone
in class Record
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |