/** * Changes the font of the list symbol to the font of the first chunk * in the list item. * @since 5.0.6 */ public void adjustListSymbolFont() { java.util.List<Chunk> cks = getChunks(); if (!cks.isEmpty() && symbol != null) symbol.setFont(cks.get(0).getFont()); }
/** * Changes the font of the list symbol to the font of the first chunk * in the list item. * @since 5.0.6 */ public void adjustListSymbolFont() { java.util.List<Chunk> cks = getChunks(); if (!cks.isEmpty() && symbol != null) symbol.setFont(cks.get(0).getFont()); }
/** * Constructs a <CODE>Phrase</CODE> with a certain <CODE>Chunk</CODE>. * * @param chunk a <CODE>Chunk</CODE> */ public Phrase(final Chunk chunk) { super.add(chunk); font = chunk.getFont(); setHyphenation(chunk.getHyphenation()); }
/** * Constructs a <CODE>Phrase</CODE> with a certain <CODE>Chunk</CODE> * and a certain leading. * * @param leading the leading * @param chunk a <CODE>Chunk</CODE> */ public Phrase(final float leading, final Chunk chunk) { this.leading = leading; super.add(chunk); font = chunk.getFont(); setHyphenation(chunk.getHyphenation()); }
/** * Constructs a <CODE>Phrase</CODE> with a certain <CODE>Chunk</CODE>. * * @param chunk a <CODE>Chunk</CODE> */ public Phrase(final Chunk chunk) { super.add(chunk); font = chunk.getFont(); setHyphenation(chunk.getHyphenation()); }
/** * Sets the listsymbol. * * @param symbol a <CODE>Chunk</CODE> */ public void setListSymbol(final Chunk symbol) { if (this.symbol == null) { this.symbol = symbol; if (this.symbol.getFont().isStandardFont()) { this.symbol.setFont(font); } } }
/** * Creates a ZapfDingbatsList * * @param zn a char-number */ public ZapfDingbatsList(int zn) { super(true); this.zn = zn; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * Creates a ZapdDingbatsNumberList * @param type the type of list */ public ZapfDingbatsNumberList(int type) { super(true); this.type = type; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * change the font to SYMBOL */ protected void setGreekFont() { float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.SYMBOL, fontsize, Font.NORMAL)); }
private static void changeFontSize(Phrase p, float size) { for (int k = 0; k < p.size(); ++k) ((Chunk)p.get(k)).getFont().setSize(size); }
/** * Sets the dingbat's color. * * @param zapfDingbatColor color for the ZapfDingbat */ public void setDingbatColor(BaseColor zapfDingbatColor) { float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL, zapfDingbatColor)); }
/** * Sets the dingbat's color. * * @param zapfDingbatColor color for the ZapfDingbat */ public void setDingbatColor(BaseColor zapfDingbatColor) { float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL, zapfDingbatColor)); }
/** * Creates a ZapdDingbatsNumberList * @param type the type of list */ public ZapfDingbatsNumberList(int type) { super(true); this.type = type; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * Creates a ZapdDingbatsNumberList * @param type the type of list * @param symbolIndent indent */ public ZapfDingbatsNumberList(int type, int symbolIndent) { super(true, symbolIndent); this.type = type; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * Creates a ZapfDingbatsList * * @param zn a char-number * @param symbolIndent indent */ public ZapfDingbatsList(int zn, int symbolIndent) { super(true, symbolIndent); this.zn = zn; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * Creates a ZapfDingbatsList * * @param zn a char-number * @param symbolIndent indent */ public ZapfDingbatsList(int zn, int symbolIndent) { super(true, symbolIndent); this.zn = zn; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * Creates a ZapfDingbatsList * * @param zn a char-number */ public ZapfDingbatsList(int zn) { super(true); this.zn = zn; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL)); postSymbol = " "; }
/** * Creates a ZapfDingbatList with a colored symbol * * @param zn a char-number * @param symbolIndent indent * @param zapfDingbatColor color for the ZpafDingbat */ public ZapfDingbatsList(int zn, int symbolIndent, BaseColor zapfDingbatColor) { super(true, symbolIndent); this.zn = zn; float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.ZAPFDINGBATS, fontsize, Font.NORMAL, zapfDingbatColor)); postSymbol = " "; }
/** * change the font to SYMBOL */ protected void setGreekFont() { float fontsize = symbol.getFont().getSize(); symbol.setFont(FontFactory.getFont(FontFactory.SYMBOL, fontsize, Font.NORMAL)); }
/** * Makes chunk content bold. * @param chunk The chunk whose content is to be rendered bold. * @param color The font color desired. */ private void setBoldStyle(Chunk chunk, BaseColor color) { Font font = chunk.getFont(); chunk.setFont(FontFactory.getFont(font.getFamilyname(), font.getSize(), Font.BOLD, color)); }