public void setAnchor(Rectangle anchor){ super.setAnchor(anchor); if(borderTop != null) anchorBorder(Table.BORDER_TOP, borderTop); if(borderRight != null) anchorBorder(Table.BORDER_RIGHT, borderRight); if(borderBottom != null) anchorBorder(Table.BORDER_BOTTOM, borderBottom); if(borderLeft != null) anchorBorder(Table.BORDER_LEFT, borderLeft); } }
/** * Background for this slide. */ public Background getBackground() { if(getFollowMasterBackground()) { return getMasterSheet().getBackground(); } return super.getBackground(); }
notesHeaderFooters.isHeaderVisible() && notesHeaderFooters.getHeaderText() != null) { xhtml.startElement("p", "class", "slide-note-header"); xhtml.characters(notesHeaderFooters.getHeaderText()); xhtml.endElement("p"); notesHeaderFooters.isFooterVisible() && notesHeaderFooters.getFooterText() != null) { xhtml.startElement("p", "class", "slide-note-footer"); xhtml.characters(notesHeaderFooters.getFooterText()); xhtml.endElement("p");
private Line cloneBorder(Line line){ Line border = createBorder(); border.setLineWidth(line.getLineWidth()); border.setLineStyle(line.getLineStyle()); border.setLineDashing(line.getLineDashing()); border.setLineColor(line.getLineColor()); return border; }
@Override protected Color getSlideBGColor(int index){ return slides[index].getBackground().getFill().getForegroundColor(); }
public java.awt.Shape getOutline(){ ShapeOutline outline = AutoShapes.getShapeOutline(getShapeType()); Rectangle2D anchor = getLogicalAnchor2D(); if(outline == null){ logger.log(POILogger.WARN, "Outline not found for " + ShapeTypes.typeName(getShapeType())); return anchor; } java.awt.Shape shape = outline.getOutline(this); return AutoShapes.transform(shape, anchor); }
/** * Add a shape to this group. * * @param shape - the Shape to add */ public void addShape(Shape shape){ _escherContainer.addChildRecord(shape.getSpContainer()); Sheet sheet = getSheet(); shape.setSheet(sheet); shape.setShapeId(sheet.allocateShapeId()); shape.afterInsert(sheet); }
/** * Color scheme for this slide. */ public ColorSchemeAtom getColorScheme() { if(getFollowMasterScheme()){ return getMasterSheet().getColorScheme(); } return super.getColorScheme(); }
/** * Constructs a SlideMaster from the MainMaster record, * */ public SlideMaster(MainMaster record, int sheetNo) { super(record, sheetNo); _runs = findTextRuns(getPPDrawing()); for (int i = 0; i < _runs.length; i++) _runs[i].setSheet(this); }
/** * The color used to fill this shape. */ public Color getFillColor(){ return getFill().getForegroundColor(); }
/** * Constructs a TitleMaster * */ public TitleMaster(org.apache.poi.hslf.record.Slide record, int sheetNo) { super(record, sheetNo); _runs = findTextRuns(getPPDrawing()); for (int i = 0; i < _runs.length; i++) _runs[i].setSheet(this); }
protected EscherContainerRecord createSpContainer(boolean isChild){ _escherContainer = super.createSpContainer(isChild); EscherOptRecord opt = (EscherOptRecord)getEscherChild(_escherContainer, EscherOptRecord.RECORD_ID); setEscherProperty(opt, EscherProperties.TEXT__TEXTID, 0); setEscherProperty(opt, EscherProperties.TEXT__SIZE_TEXT_TO_FIT_SHAPE, 0x20000); setEscherProperty(opt, EscherProperties.FILL__NOFILLHITTEST, 0x150001); setEscherProperty(opt, EscherProperties.SHADOWSTYLE__SHADOWOBSURED, 0x20000); setEscherProperty(opt, EscherProperties.PROTECTION__LOCKAGAINSTGROUPING, 0x40000); return _escherContainer; }
/** * Returns the text contained in this text frame. * * @return the text string for this textbox. */ public String getText(){ TextRun tx = getTextRun(); return tx == null ? null : tx.getText(); }
protected void applyPaint(SimpleShape shape) { if (_paint instanceof Color) { shape.getFill().setForegroundColor((Color)_paint); } } }
/** * @return name of the shape. */ public String getShapeName(){ return ShapeTypes.typeName(getShapeType()); }
/** * Delegate the call to the underlying slide master. */ public TextProp getStyleAttribute(int txtype, int level, String name, boolean isCharacter) { MasterSheet master = getMasterSheet(); return master == null ? null : master.getStyleAttribute(txtype, level, name, isCharacter); }
/** * Set the SlideShow we're attached to. * Also passes it on to our child RichTextRuns */ public void setSlideShow(SlideShow ss) { _slideShow = ss; TextRun[] trs = getTextRuns(); if (trs != null) { for (int i = 0; i < trs.length; i++) { trs[i].supplySlideShow(_slideShow); } } }
if (slideHeaderFooters != null && slideHeaderFooters.isHeaderVisible() && slideHeaderFooters.getHeaderText() != null) { xhtml.startElement("p", "class", "slide-header"); xhtml.characters(slideHeaderFooters.getHeaderText()); if (slideHeaderFooters != null && slideHeaderFooters.isFooterVisible() && slideHeaderFooters.getFooterText() != null) { xhtml.startElement("p", "class", "slide-footer"); xhtml.characters(slideHeaderFooters.getFooterText()); xhtml.endElement("p");
/** * The color used to fill this shape. * * @param color the background color */ public void setFillColor(Color color){ getFill().setForegroundColor(color); }