/** * Set things up, and find our more interesting children */ protected AnimationInfo(byte[] source, int start, int len) { // Grab the header _header = new byte[8]; System.arraycopy(source,start,_header,0,8); // Find our children _children = Record.findChildRecords(source,start+8,len-8); findInterestingChildren(); }
/** * Write the contents of the record back, so it can be written * to disk */ public void writeOut(OutputStream out) throws IOException { writeOut(_header[0],_header[1],getRecordType(),_children,out); }
infoAtom.setHyperlinkType(InteractiveInfoAtom.LINK_NULL); AnimationInfo an = new AnimationInfo(); AnimationInfoAtom anAtom = an.getAnimationInfoAtom(); anAtom.setFlag(AnimationInfoAtom.Automatic, true); try { oe.writeOut(out); an.writeOut(out); info.writeOut(out); } catch(Exception e){
/** * Create a new Placeholder and initialize internal structures * * @return the created <code>EscherContainerRecord</code> which holds shape data */ @Override protected EscherContainerRecord createSpContainer(int idx, boolean isChild) { EscherContainerRecord ecr = super.createSpContainer(idx, isChild); setEscherProperty(EscherProperties.PROTECTION__LOCKAGAINSTGROUPING, 0x1000100); setEscherProperty(EscherProperties.FILL__NOFILLHITTEST, 0x10001); ExObjRefAtom oe = new ExObjRefAtom(); InteractiveInfo info = new InteractiveInfo(); InteractiveInfoAtom infoAtom = info.getInteractiveInfoAtom(); infoAtom.setAction(InteractiveInfoAtom.ACTION_MEDIA); infoAtom.setHyperlinkType(InteractiveInfoAtom.LINK_NULL); AnimationInfo an = new AnimationInfo(); AnimationInfoAtom anAtom = an.getAnimationInfoAtom(); anAtom.setFlag(AnimationInfoAtom.Automatic, true); HSLFEscherClientDataRecord cldata = getClientData(true); cldata.addChild(oe); cldata.addChild(an); cldata.addChild(info); return ecr; }
public boolean isAutoPlay(){ AnimationInfo an = (AnimationInfo)getClientDataRecord(RecordTypes.AnimationInfo.typeID); if(an != null){ return an.getAnimationInfoAtom().getFlag(AnimationInfoAtom.Automatic); } return false; }
/** * Create a new AnimationInfo, with blank fields */ public AnimationInfo() { // Setup our header block _header = new byte[8]; _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)getRecordType()); _children = new Record[1]; _children[0] = animationAtom = new AnimationInfoAtom(); }
public void setAutoPlay(boolean flag){ AnimationInfo an = getClientDataRecord(RecordTypes.AnimationInfo.typeID); if(an != null){ an.getAnimationInfoAtom().setFlag(AnimationInfoAtom.Automatic, flag); } }
/** * Create a new AnimationInfo, with blank fields */ public AnimationInfo() { // Setup our header block _header = new byte[8]; _header[0] = 0x0f; // We are a container record LittleEndian.putShort(_header, 2, (short)getRecordType()); _children = new Record[1]; _children[0] = animationAtom = new AnimationInfoAtom(); }
/** * Write the contents of the record back, so it can be written * to disk */ public void writeOut(OutputStream out) throws IOException { writeOut(_header[0],_header[1],getRecordType(),_children,out); }
public boolean isAutoPlay(){ AnimationInfo an = getClientDataRecord(RecordTypes.AnimationInfo.typeID); if(an != null){ return an.getAnimationInfoAtom().getFlag(AnimationInfoAtom.Automatic); } return false; }
/** * Set things up, and find our more interesting children */ protected AnimationInfo(byte[] source, int start, int len) { // Grab the header _header = new byte[8]; System.arraycopy(source,start,_header,0,8); // Find our children _children = Record.findChildRecords(source,start+8,len-8); findInterestingChildren(); }
public void setAutoPlay(boolean flag){ AnimationInfo an = (AnimationInfo)getClientDataRecord(RecordTypes.AnimationInfo.typeID); if(an != null){ an.getAnimationInfoAtom().setFlag(AnimationInfoAtom.Automatic, flag); updateClientData(); } }
/** * Assign a movie to this shape * * @see org.apache.poi.hslf.usermodel.HSLFSlideShow#addMovie(String, int) * @param idx the index of the movie */ public void setMovieIndex(int idx){ ExObjRefAtom oe = getClientDataRecord(RecordTypes.ExObjRefAtom.typeID); oe.setExObjIdRef(idx); AnimationInfo an = getClientDataRecord(RecordTypes.AnimationInfo.typeID); if(an != null) { AnimationInfoAtom ai = an.getAnimationInfoAtom(); ai.setDimColor(0x07000000); ai.setFlag(AnimationInfoAtom.Automatic, true); ai.setFlag(AnimationInfoAtom.Play, true); ai.setFlag(AnimationInfoAtom.Synchronous, true); ai.setOrderID(idx + 1); } }
/** * Assign a movie to this shape * * @see org.apache.poi.hslf.usermodel.SlideShow#addMovie(String, int) * @param idx the index of the movie */ public void setMovieIndex(int idx){ OEShapeAtom oe = (OEShapeAtom)getClientDataRecord(RecordTypes.OEShapeAtom.typeID); oe.setOptions(idx); AnimationInfo an = (AnimationInfo)getClientDataRecord(RecordTypes.AnimationInfo.typeID); if(an != null) { AnimationInfoAtom ai = an.getAnimationInfoAtom(); ai.setDimColor(0x07000000); ai.setFlag(AnimationInfoAtom.Automatic, true); ai.setFlag(AnimationInfoAtom.Play, true); ai.setFlag(AnimationInfoAtom.Synchronous, true); ai.setOrderID(idx + 1); } }