@Override public Iterator<HSLFShape> iterator() { return getShapes().iterator(); }
/** * Return placeholder by text type * * @param type type of text, See {@link org.apache.poi.hslf.record.TextHeaderAtom} * @return <code>TextShape</code> or <code>null</code> */ public HSLFTextShape getPlaceholderByTextType(int type){ for (HSLFShape shape : getShapes()) { if(shape instanceof HSLFTextShape){ HSLFTextShape tx = (HSLFTextShape)shape; if (tx.getRunType() == type) { return tx; } } } return null; }
/** * Search placeholder by its type * * @param type type of placeholder to search. See {@link org.apache.poi.hslf.record.OEPlaceholderAtom} * @return {@code SimpleShape} or {@code null} */ public HSLFSimpleShape getPlaceholder(Placeholder type){ for (HSLFShape shape : getShapes()) { if (shape instanceof HSLFSimpleShape) { HSLFSimpleShape ss = (HSLFSimpleShape)shape; if (type == ss.getPlaceholder()) { return ss; } } } return null; }