InteractiveInfoAtompublic class InteractiveInfoAtom extends RecordAtom Tne atom that holds metadata on Links in the document.
(The actual link is held Document.ExObjList.ExHyperlink) |
Fields Summary |
---|
public static final int | ACTION_NONEAction Table | public static final int | ACTION_MACRO | public static final int | ACTION_RUNPROGRAM | public static final int | ACTION_JUMP | public static final int | ACTION_HYPERLINK | public static final int | ACTION_OLE | public static final int | ACTION_MEDIA | public static final int | ACTION_CUSTOMSHOW | public static final int | JUMP_NONEJump Table | public static final int | JUMP_NEXTSLIDE | public static final int | JUMP_PREVIOUSSLIDE | public static final int | JUMP_FIRSTSLIDE | public static final int | JUMP_LASTSLIDE | public static final int | JUMP_LASTSLIDEVIEWED | public static final int | JUMP_ENDSHOW | private byte[] | _headerRecord header. | private byte[] | _dataRecord data. |
Constructors Summary |
---|
protected InteractiveInfoAtom()Constructs a brand new link related atom record.
_header = new byte[8];
_data = new byte[16];
LittleEndian.putShort(_header, 2, (short)getRecordType());
LittleEndian.putInt(_header, 4, _data.length);
// It is fine for the other values to be zero
| protected InteractiveInfoAtom(byte[] source, int start, int len)Constructs the link related atom record from its
source data.
// Get the header.
_header = new byte[8];
System.arraycopy(source,start,_header,0,8);
// Get the record data.
_data = new byte[len-8];
System.arraycopy(source,start+8,_data,0,len-8);
// Must be at least 16 bytes long
if(_data.length < 16) {
throw new IllegalArgumentException("The length of the data for a InteractiveInfoAtom must be at least 16 bytes, but was only " + _data.length);
}
// First 4 bytes - no idea, normally 0
// Second 4 bytes - the id of the link (from 1 onwards)
// Third 4 bytes - no idea, normally 4
// Fourth 4 bytes - no idea, normally 8
|
Methods Summary |
---|
public byte | getAction()Hyperlink Action.
see ACTION_* constants for the list of actions
return _data[8];
| public byte | getFlags()Flags
Bit 1: Animated. If 1, then button is animated
Bit 2: Stop sound. If 1, then stop current sound when button is pressed.
Bit 3: CustomShowReturn. If 1, and this is a jump to custom show,
then return to this slide after custom show.
return _data[11];
| public int | getHyperlinkID()Gets the link number. You will normally look the
ExHyperlink with this number to get the details.
return LittleEndian.getInt(_data,4);
| public byte | getHyperlinkType()hyperlink type
return _data[12];
| public byte | getJump()Jump
see JUMP_* constants for the list of actions
return _data[10];
| public byte | getOleVerb()Only valid when action == OLEAction. OLE verb to use, 0 = first verb, 1 = second verb, etc.
return _data[9];
| public long | getRecordType()Gets the record type. return RecordTypes.InteractiveInfoAtom.typeID;
| public int | getSoundRef()a reference to a sound in the sound collection.
return LittleEndian.getInt(_data,0);
| public void | setAction(byte val)Hyperlink Action
see ACTION_* constants for the list of actions
_data[8] = val;
| public void | setFlags(byte val)Flags
Bit 1: Animated. If 1, then button is animated
Bit 2: Stop sound. If 1, then stop current sound when button is pressed.
Bit 3: CustomShowReturn. If 1, and this is a jump to custom show,
then return to this slide after custom show.
_data[11] = val;
| public void | setHyperlinkID(int number)Sets the persistent unique identifier of the link
LittleEndian.putInt(_data,4,number);
| public void | setHyperlinkType(byte val)hyperlink type
_data[12] = val;
| public void | setJump(byte val)Jump
see JUMP_* constants for the list of actions
_data[10] = val;
| public void | setOleVerb(byte val)Only valid when action == OLEAction. OLE verb to use, 0 = first verb, 1 = second verb, etc.
_data[9] = val;
| public void | setSoundRef(int val)a reference to a sound in the sound collection.
LittleEndian.putInt(_data, 0, val);
| public void | writeOut(java.io.OutputStream out)Write the contents of the record back, so it can be written
to disk
out.write(_header);
out.write(_data);
|
|