public class LegendsBlock extends Block
Block.PdfElement| Modifier and Type | Field and Description |
|---|---|
protected float |
classFontSize |
protected float |
layerFontSize |
static org.apache.log4j.Logger |
LOGGER |
align, CONDITION_REGEXP, spacingAfter| Constructor and Description |
|---|
LegendsBlock() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getClassFont() |
protected com.itextpdf.text.Font |
getClassPdfFont()
classes' texts font
|
protected com.itextpdf.text.Font |
getLayerPdfFont()
layers' texts font
|
void |
render(PJsonObject params,
Block.PdfElement target,
RenderingContext context)
Render the legends block
|
void |
setBorders(boolean value)
Do we have borders for debugging?
|
void |
setClassFont(java.lang.String classFont)
font of class legend items' texts
|
void |
setClassFontSize(double classFontSize)
font size for class legend items' texts
|
void |
setClassIndentation(double classIndentation)
horizontal indentation of class legend items
|
void |
setClassSpace(double classSpace)
vertical space AFTER class legend items
|
void |
setColumnMargin(java.lang.String columnMargin)
CSS style margin of each legend column
|
void |
setDefaultScale(double scale)
1.0 or null for no scaling >1.0 to increase size, < 1.0 to decrease
|
void |
setFontEncoding(java.lang.String fontEncoding)
Font encoding
|
void |
setHorizontalAlignment(java.lang.String value)
set the horizontal alignment of legend items inside the table and the
table itself
|
void |
setIconMaxHeight(double maxIconHeight)
maximum height of legend icon/image currently SVG icons get scaled to
this if not present icons get scaled preserving ratio with iconMaxWidth
|
void |
setIconMaxWidth(double maxIconWidth)
maximum width a legend icon/image can have currently SVG icons are scaled
to fit this
|
void |
setIconPadding(java.lang.String values)
CSS style padding around legend icon/image
|
void |
setInline(boolean inline)
Whether legend icons/images should appear on the same line as the legend
text, has nothing to do with multi-column layout.
|
void |
setLayerFont(java.lang.String layerFont) |
void |
setLayerFontSize(double layerFontSize) |
void |
setLayerSpace(double layerSpace)
vertical space AFTER the legend items
|
void |
setLayerSpaceBefore(double layerSpaceBefore) |
void |
setMaxHeight(double maxHeight)
set maximum height of a legend column
|
void |
setMaxWidth(double maxWidth)
set maximum width of legend items i.e.
|
void |
setTextMaxWidth(double textMaxWidth) |
void |
setTextPadding(java.lang.String values)
CSS style padding around legend text/name
|
getAlign, getBackgroundColorVal, getMap, getMaxValueIfZero, getMaxValueIfZero, getVertAlign, isAbsolute, isVisible, setAlign, setBackgroundColor, setCondition, setSpacingAfter, setVertAlign, testCondition, validatepublic static final org.apache.log4j.Logger LOGGER
protected float layerFontSize
protected float classFontSize
public void render(PJsonObject params, Block.PdfElement target, RenderingContext context) throws com.itextpdf.text.DocumentException
render in class Blockparams - target - context - com.lowagie.text.DocumentExceptioncom.itextpdf.text.DocumentExceptionBlock.render(
org.mapfish.print.utils.PJsonObject,
org.mapfish.print.config.layout.Block.PdfElement,
org.mapfish.print.RenderingContext)public void setMaxWidth(double maxWidth)
maxWidth - public void setMaxHeight(double maxHeight)
maxHeight - if 0 means the column can be as hight as possiblepublic void setDefaultScale(double scale)
scale - scale icon/image by thispublic void setInline(boolean inline)
inline - true of falsepublic void setIconMaxWidth(double maxIconWidth)
maxIconWidth - public void setIconMaxHeight(double maxIconHeight)
maxIconHeight - public void setClassIndentation(double classIndentation)
classIndentation - public void setClassFont(java.lang.String classFont)
classFont - public void setClassFontSize(double classFontSize)
classFontSize - public java.lang.String getClassFont()
protected com.itextpdf.text.Font getLayerPdfFont()
protected com.itextpdf.text.Font getClassPdfFont()
public void setLayerSpace(double layerSpace)
layerSpace - public void setClassSpace(double classSpace)
classSpace - public void setLayerFont(java.lang.String layerFont)
layerFont - Font name used for layer items, not classespublic void setLayerFontSize(double layerFontSize)
layerFontSize - font size used for layer itemspublic void setFontEncoding(java.lang.String fontEncoding)
fontEncoding - public void setColumnMargin(java.lang.String columnMargin)
columnMargin - public void setHorizontalAlignment(java.lang.String value)
value - left|center|rightpublic void setIconPadding(java.lang.String values)
values - public void setTextPadding(java.lang.String values)
values - public void setBorders(boolean value)
value - public void setTextMaxWidth(double textMaxWidth)
textMaxWidth - the textMaxWidth to setpublic void setLayerSpaceBefore(double layerSpaceBefore)
layerSpaceBefore - the layerSpaceBefore to set