public void setLinkOptions(int options) { if(linkDetailsB != null) { linkDetailsB.setOptions(options); } }
/** * Insert a {@link CString} record that stores the user's date. * * @return the created {@link CString} record that stores the user's date. */ public CString addUserDateAtom(){ if(csDate != null) return csDate; csDate = new CString(); csDate.setOptions(USERDATEATOM << 4); addChildAfter(csDate, hdAtom); return csDate; }
/** * Insert a {@link CString} record that stores the user's date. * * @return the created {@link CString} record that stores the user's date. */ public CString addUserDateAtom(){ if(csDate != null) return csDate; csDate = new CString(); csDate.setOptions(USERDATEATOM << 4); addChildAfter(csDate, hdAtom); return csDate; }
/** * Insert a {@link CString} record that stores the user's date. * * @return the created {@link CString} record that stores the user's date. */ public CString addHeaderAtom(){ if(csHeader != null) return csHeader; csHeader = new CString(); csHeader.setOptions(HEADERATOM << 4); Record r = hdAtom; if(csDate != null) r = hdAtom; addChildAfter(csHeader, r); return csHeader; }
/** * Insert a {@link CString} record that stores the user's date. * * @return the created {@link CString} record that stores the user's date. */ public CString addHeaderAtom(){ if(csHeader != null) return csHeader; csHeader = new CString(); csHeader.setOptions(HEADERATOM << 4); Record r = hdAtom; if(csDate != null) r = hdAtom; addChildAfter(csHeader, r); return csHeader; }
/** * Insert a {@link CString} record that stores the user's date. * * @return the created {@link CString} record that stores the user's date. */ public CString addFooterAtom(){ if(csFooter != null) return csFooter; csFooter = new CString(); csFooter.setOptions(FOOTERATOM << 4); Record r = hdAtom; if(csHeader != null) r = csHeader; else if(csDate != null) r = csDate; addChildAfter(csFooter, r); return csFooter; } }
/** * Insert a {@link CString} record that stores the user's date. * * @return the created {@link CString} record that stores the user's date. */ public CString addFooterAtom(){ if(csFooter != null) return csFooter; csFooter = new CString(); csFooter.setOptions(FOOTERATOM << 4); Record r = hdAtom; if(csHeader != null) r = csHeader; else if(csDate != null) r = csDate; addChildAfter(csFooter, r); return csFooter; } }
/** * Create a new Comment2000, with blank fields */ public Comment2000() { _header = new byte[8]; _children = new Record[4]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)_type); // Setup our child records CString csa = new CString(); CString csb = new CString(); CString csc = new CString(); csa.setOptions(0x00); csb.setOptions(0x10); csc.setOptions(0x20); _children[0] = csa; _children[1] = csb; _children[2] = csc; _children[3] = new Comment2000Atom(); findInterestingChildren(); }
private CString safeCString(CString oldStr, int optionsId) { CString newStr = oldStr; if (newStr == null) { newStr = new CString(); newStr.setOptions(optionsId << 4); } boolean found = false; for (final Record r : _children) { // for simplicity just check for object identity if (r == newStr) { found = true; break; } } if (!found) { appendChildRecord(newStr); } return newStr; } }
/** * Create a new Comment2000, with blank fields */ public Comment2000() { _header = new byte[8]; _children = new Record[4]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)_type); // Setup our child records CString csa = new CString(); CString csb = new CString(); CString csc = new CString(); csa.setOptions(0x00); csb.setOptions(0x10); csc.setOptions(0x20); _children[0] = csa; _children[1] = csb; _children[2] = csc; _children[3] = new Comment2000Atom(); findInterestingChildren(); }
/** * Create a new ExHyperlink, with blank fields */ public ExHyperlink() { _header = new byte[8]; _children = new Record[3]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)_type); // Setup our child records CString csa = new CString(); CString csb = new CString(); csa.setOptions(0x00); csb.setOptions(0x10); _children[0] = new ExHyperlinkAtom(); _children[1] = csa; _children[2] = csb; findInterestingChildren(); }
/** * Create a new ExHyperlink, with blank fields */ public ExHyperlink() { _header = new byte[8]; _children = new Record[3]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)_type); // Setup our child records CString csa = new CString(); CString csb = new CString(); csa.setOptions(0x00); csb.setOptions(0x10); _children[0] = new ExHyperlinkAtom(); _children[1] = csa; _children[2] = csb; findInterestingChildren(); }
/** * Create a new ExEmbed, with blank fields */ public ExEmbed() { _header = new byte[8]; _children = new Record[5]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)getRecordType()); // Setup our child records CString cs1 = new CString(); cs1.setOptions(0x1 << 4); CString cs2 = new CString(); cs2.setOptions(0x2 << 4); CString cs3 = new CString(); cs3.setOptions(0x3 << 4); _children[0] = new ExEmbedAtom(); _children[1] = new ExOleObjAtom(); _children[2] = cs1; _children[3] = cs2; _children[4] = cs3; findInterestingChildren(); }
/** * Create a new ExEmbed, with blank fields */ public ExEmbed() { _header = new byte[8]; _children = new Record[5]; // Setup our header block _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)getRecordType()); // Setup our child records final CString cs1 = new CString(); cs1.setOptions(0x1 << 4); final CString cs2 = new CString(); cs2.setOptions(0x2 << 4); final CString cs3 = new CString(); cs3.setOptions(0x3 << 4); _children[0] = new ExEmbedAtom(); _children[1] = new ExOleObjAtom(); _children[2] = cs1; _children[3] = cs2; _children[4] = cs3; findInterestingChildren(); }