/** * */ public JRStyle getBaseStyle(JRStyle styleContainer) { if (styleContainer != null) { JRStyle style = styleContainer.getStyle(); if (style != null) { return style; } if (stylesInheritFromDefault && !styleContainer.isDefault()) { JRDefaultStyleProvider defaultStyleProvider = styleContainer.getDefaultStyleProvider(); if (defaultStyleProvider != null) { return defaultStyleProvider.getDefaultStyle(); } } } return null; }
/** * */ protected static JRStyle getBaseStyleFromStyleContainer(JRStyleContainer styleContainer) { if (styleContainer != null) { JRStyle style = styleContainer.getStyle(); if (style != null) { return style; } JRDefaultStyleProvider defaultStyleProvider = styleContainer.getDefaultStyleProvider(); if (defaultStyleProvider != null) { return defaultStyleProvider.getDefaultStyle(); } } return null; }
/** * */ private void exportHeader(JRDefaultStyleProvider defaultStyleProvider, JRStyle style) { //write(" <w:style w:type=\"paragraph\" w:default=\"1\" w:styleId=\"" + style.getName() + "\">\n"); write(" <w:style w:type=\"paragraph\" w:styleId=\"" + style.getName() + "\""); if (style.isDefault()) { write(" w:default=\"1\""); } write(">\n"); write(" <w:name w:val=\"" + style.getName() + "\" />\n"); write(" <w:qFormat />\n"); JRStyle baseStyle = defaultStyleProvider.getStyleResolver().getBaseStyle(style); String styleNameReference = baseStyle == null ? null : baseStyle.getName(); //javadoc says getStyleNameReference is not supposed to work for print elements if (styleNameReference != null) { write(" <w:basedOn w:val=\"" + styleNameReference + "\" />\n"); } }
/** * Creates a new crosstab. * * @param defaultStyleProvider default style provider */ public JRDesignCrosstab(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); parametersList = new ArrayList<JRCrosstabParameter>(); parametersMap = new HashMap<String, JRCrosstabParameter>(); rowGroupsMap = new HashMap<String, Integer>(); rowGroups = new ArrayList<JRCrosstabRowGroup>(); columnGroupsMap = new HashMap<String, Integer>(); columnGroups = new ArrayList<JRCrosstabColumnGroup>(); measuresMap = new HashMap<String, Integer>(); measures = new ArrayList<JRCrosstabMeasure>(); cellsMap = new HashMap<Pair<String,String>,JRCrosstabCell>(); cellsList = new ArrayList<JRCrosstabCell>(); addBuiltinParameters(); variablesList = new LinkedMap(); addBuiltinVariables(); dataset = new JRDesignCrosstabDataset(); lineBox = new JRBaseLineBox(this); }
static JRDesignSubreport createSubreport(int x, int y, int subheight, String subreportDesignExpression, String subreportDataExpression, JRDefaultStyleProvider defaultStyleProvider) { JRDesignSubreport sub = new JRDesignSubreport(defaultStyleProvider); sub.setHeight(subheight); sub.setX(x); sub.setY(y); sub.setPrintRepeatedValues(true); sub.setRemoveLineWhenBlank(true); //sub.setPrintInFirstWholeBand(true); if (subreportDataExpression != null) { sub.setDataSourceExpression(new JRDesignExpression(subreportDataExpression)); } // expect the subreport template as a parameter to the main report - see // http://stackoverflow.com/questions/9785451/generate-jasper-report-with-subreport-from-java if (subreportDesignExpression != null) { JRDesignExpression subexpression = new JRDesignExpression(subreportDesignExpression); sub.setExpression(subexpression); } return sub; }
@Override public JRDefaultStyleProvider getDefaultStyleProvider() { if (paragraphContainer != null) { return paragraphContainer.getDefaultStyleProvider(); } return null; }
/** * */ public JRBasePrintText(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); lineBox = new JRBaseLineBox(this); paragraph = new JRBaseParagraph(this); }
/** * */ public JRBaseStyle(JRDefaultStyleProvider defaultStyleProvider) { this.defaultStyleProvider = defaultStyleProvider; linePen = new JRBasePen(this); lineBox = new JRBaseLineBox(this); paragraph = new JRBaseParagraph(this); }
/** * */ public JRBaseStyle(String name) { this((JRDefaultStyleProvider)null); this.name = name; }
/** * */ public JRBaseStyle(JRDefaultStyleProvider defaultStyleProvider, String name) { this(defaultStyleProvider); this.name = name; }
/** * */ public JRBasePrintImage(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); lineBox = new JRBaseLineBox(this); }
@Override public JRDefaultStyleProvider getDefaultStyleProvider() { if (boxContainer != null) { return boxContainer.getDefaultStyleProvider(); } return null; }
/** * */ public JRBasePrintGraphicElement(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); linePen = new JRBasePen(this); }
public JRBasePrintFrame(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); elements = new ArrayList<JRPrintElement>(); lineBox = new JRBaseLineBox(this); }
/** * */ public JRDesignTextField(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); hyperlinkParameters = new ArrayList<JRHyperlinkParameter>(); }
/** * Creates a new text element. */ protected JRDesignTextElement(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); lineBox = new JRBaseLineBox(this); paragraph = new JRBaseParagraph(this); }
/** * */ protected JRDesignGraphicElement(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); linePen = new JRBasePen(this); }
/** * */ public JRDesignChart(JRDefaultStyleProvider defaultStyleProvider, byte chartType) { super(defaultStyleProvider); setChartType(chartType); hyperlinkParameters = new ArrayList<JRHyperlinkParameter>(); lineBox = new JRBaseLineBox(this); }
/** * */ public JRDesignImage(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); hyperlinkParameters = new ArrayList<JRHyperlinkParameter>(); lineBox = new JRBaseLineBox(this); }
/** * */ protected JRDesignElement(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); positionTypeValue = PositionTypeEnum.FIX_RELATIVE_TO_TOP; }
/** * Creates a new frame object. * * @param defaultStyleProvider default style provider instance */ public JRDesignFrame(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); children = new ArrayList<JRChild>(); lineBox = new JRBaseLineBox(this); }
/** * */ public void exportProps(JRDefaultStyleProvider defaultStyleProvider, JRStyle style, Locale locale) { JRStyle baseStyle = defaultStyleProvider.getStyleResolver().getBaseStyle(style); exportProps( getAttributes(baseStyle), getAttributes(style), locale, false, false ); }
/** * */ protected JRTemplateGraphicElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRGraphicElement graphicElement) { super(origin, defaultStyleProvider); setGraphicElement(graphicElement); }
/** * */ protected JRTemplateLine(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRLine line) { super(origin, defaultStyleProvider); setLine(line); }
/** * */ protected JRTemplateElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider) { this.origin = origin; this.defaultStyleProvider = defaultStyleProvider; id = createId(); }
/** * */ protected JRTemplateEllipse(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JREllipse ellipse) { super(origin, defaultStyleProvider); setEllipse(ellipse); }
/** * */ protected JRTemplateRectangle(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRRectangle rectangle) { super(origin, defaultStyleProvider); setRectangle(rectangle); }
/** * */ protected JRTemplateRectangle(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRSubreport subreport) { super(origin, defaultStyleProvider); setSubreport(subreport); }
/** * */ protected JRTemplateText(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRStaticText staticText) { super(origin, defaultStyleProvider); setStaticText(staticText); }
/** * */ protected JRTemplateText(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRTextField textField) { super(origin, defaultStyleProvider); setTextField(textField); }
/** * Creates a template text. * * @param origin the origin of the elements that will use this template * @param defaultStyleProvider the default style provider to use for * this template */ public JRTemplateText(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider) { super(origin, defaultStyleProvider); lineBox = new JRBaseLineBox(this); paragraph = new JRBaseParagraph(this); }
protected JRTemplateGenericElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRGenericElement element) { super(origin, defaultStyleProvider); setElement(element); setGenericType(element.getGenericType()); }
/** * Creates a generic print element template. * * @param origin the origin of the elements that will use the template * @param defaultStyleProvider the style provider to be used for the elements * @param genericType the type of the generic elements */ public JRTemplateGenericElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRGenericElementType genericType) { super(origin, defaultStyleProvider); setGenericType(genericType); }
/** * Creates a generic print element template. * * @param origin the origin of the elements that will use the template * @param defaultStyleProvider the style provider to be used for the elements * @param element an element to copy basic elements from * @param genericType the type of the generic elements */ public JRTemplateGenericElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRElement element, JRGenericElementType genericType) { super(origin, defaultStyleProvider); setElement(element); setGenericType(genericType); }
/** * Creates a template frame for a crosstab cell. * * @param cell the cell */ public JRTemplateFrame(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRFillCellContents cell) { super(origin, defaultStyleProvider); //FIXME properties? parentStyle = cell.getStyle(); setBackcolor(cell.getBackcolor()); setMode(cell.getModeValue()); copyBox(cell.getLineBox()); }
/** * Creates a template frame for a frame. * * @param frame the frame */ public JRTemplateFrame(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRFillFrame frame) { super(origin, defaultStyleProvider); setElement(frame); copyBox(frame.getLineBox()); }
/** * */ protected JRTemplateImage(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRImage image) { super(origin, defaultStyleProvider); setImage(image); }
/** * */ protected JRTemplateImage(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRChart chart) { super(origin, defaultStyleProvider); setChart(chart); }
/** * Creates a template image. * * @param origin the origin of the elements that will use this template * @param defaultStyleProvider the default style provider to use for * this template */ public JRTemplateImage(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider) { super(origin, defaultStyleProvider); this.lineBox = new JRBaseLineBox(this); this.linePen = new JRBasePen(this); }
public BarcodeDesignEvaluator( JasperReportsContext jasperReportsContext, JRComponentElement componentElement, JRDefaultStyleProvider defaultStyleProvider ) { super(jasperReportsContext, componentElement, defaultStyleProvider); }