Java 类net.sf.jasperreports.engine.JRDefaultStyleProvider 实例源码

项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
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;
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
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;
}
项目:jasperreports    文件:DocxStyleHelper.java   
/**
 * 
 */
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");
    }
}
项目:jasperreports    文件:JRDesignCrosstab.java   
/**
 * 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);
}
项目:com.opendoorlogistics    文件:ReportBuilderUtils.java   
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;
}
项目:jasperreports    文件:JRBaseParagraph.java   
@Override
public JRDefaultStyleProvider getDefaultStyleProvider() 
{
    if (paragraphContainer != null)
    {
        return paragraphContainer.getDefaultStyleProvider();
    }
    return null;
}
项目:jasperreports    文件:JRBasePrintText.java   
/**
 *
 */
public JRBasePrintText(JRDefaultStyleProvider defaultStyleProvider)
{
    super(defaultStyleProvider);

    lineBox = new JRBaseLineBox(this);
    paragraph = new JRBaseParagraph(this);
}
项目:jasperreports    文件:JRBaseStyle.java   
/**
 *
 */
public JRBaseStyle(JRDefaultStyleProvider defaultStyleProvider)
{
    this.defaultStyleProvider = defaultStyleProvider;

    linePen = new JRBasePen(this);
    lineBox = new JRBaseLineBox(this);
    paragraph = new JRBaseParagraph(this);
}
项目:jasperreports    文件:JRBaseStyle.java   
/**
 *
 */
public JRBaseStyle(String name)
{
    this((JRDefaultStyleProvider)null);

    this.name = name;
}
项目:jasperreports    文件:JRBaseStyle.java   
/**
 *
 */
public JRBaseStyle(JRDefaultStyleProvider defaultStyleProvider, String name)
{
    this(defaultStyleProvider);

    this.name = name;
}
项目:jasperreports    文件:JRBasePrintImage.java   
/**
 *
 */
public JRBasePrintImage(JRDefaultStyleProvider defaultStyleProvider)
{
    super(defaultStyleProvider);

    lineBox = new JRBaseLineBox(this);
}
项目:jasperreports    文件:JRBaseLineBox.java   
@Override
public JRDefaultStyleProvider getDefaultStyleProvider() 
{
    if (boxContainer != null)
    {
        return boxContainer.getDefaultStyleProvider();
    }
    return null;
}
项目:jasperreports    文件:JRBasePrintGraphicElement.java   
/**
 *
 */
public JRBasePrintGraphicElement(JRDefaultStyleProvider defaultStyleProvider)
{
    super(defaultStyleProvider);

    linePen = new JRBasePen(this);
}
项目:jasperreports    文件:JRBasePrintFrame.java   
public JRBasePrintFrame(JRDefaultStyleProvider defaultStyleProvider)
{
    super(defaultStyleProvider);

    elements = new ArrayList<JRPrintElement>();

    lineBox = new JRBaseLineBox(this);
}
项目:jasperreports    文件:JRDesignTextField.java   
/**
 *
 */
public JRDesignTextField(JRDefaultStyleProvider defaultStyleProvider)
{
    super(defaultStyleProvider);

    hyperlinkParameters = new ArrayList<JRHyperlinkParameter>();
}
项目:jasperreports    文件:JRDesignTextElement.java   
/**
 * Creates a new text element.
 */
protected JRDesignTextElement(JRDefaultStyleProvider defaultStyleProvider)
{
    super(defaultStyleProvider);

    lineBox = new JRBaseLineBox(this);
    paragraph = new JRBaseParagraph(this);
}
项目:jasperreports    文件:JRDesignGraphicElement.java   
/**
 *
 */
protected JRDesignGraphicElement(JRDefaultStyleProvider defaultStyleProvider)
{
    super(defaultStyleProvider);

    linePen = new JRBasePen(this);
}
项目:jasperreports    文件:JRDesignChart.java   
/**
 *
 */
public JRDesignChart(JRDefaultStyleProvider defaultStyleProvider, byte chartType)
{
    super(defaultStyleProvider);

    setChartType(chartType);

    hyperlinkParameters = new ArrayList<JRHyperlinkParameter>();

    lineBox = new JRBaseLineBox(this);
}
项目:jasperreports    文件:JRDesignImage.java   
/**
 *
 */
public JRDesignImage(JRDefaultStyleProvider defaultStyleProvider)
{
    super(defaultStyleProvider);

    hyperlinkParameters = new ArrayList<JRHyperlinkParameter>();

    lineBox = new JRBaseLineBox(this);
}
项目:jasperreports    文件:JRDesignElement.java   
/**
 *
 */
protected JRDesignElement(JRDefaultStyleProvider defaultStyleProvider)
{
    super(defaultStyleProvider);

    positionTypeValue = PositionTypeEnum.FIX_RELATIVE_TO_TOP;
}
项目:jasperreports    文件:JRDesignFrame.java   
/**
 * 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);
}
项目:jasperreports    文件:DocxRunHelper.java   
/**
 *
 */
public void exportProps(JRDefaultStyleProvider defaultStyleProvider, JRStyle style, Locale locale)
{
    JRStyle baseStyle = defaultStyleProvider.getStyleResolver().getBaseStyle(style);
    exportProps(
        getAttributes(baseStyle), 
        getAttributes(style), 
        locale, 
        false, 
        false
        );
}
项目:jasperreports    文件:JRTemplateGraphicElement.java   
/**
 *
 */
protected JRTemplateGraphicElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRGraphicElement graphicElement)
{
    super(origin, defaultStyleProvider);

    setGraphicElement(graphicElement);
}
项目:jasperreports    文件:JRTemplateLine.java   
/**
 *
 */
protected JRTemplateLine(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRLine line)
{
    super(origin, defaultStyleProvider);

    setLine(line);
}
项目:jasperreports    文件:JRTemplateElement.java   
/**
 *
 */
protected JRTemplateElement(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider)
{
    this.origin = origin;
    this.defaultStyleProvider = defaultStyleProvider;
    id = createId();
}
项目:jasperreports    文件:JRTemplateEllipse.java   
/**
 *
 */
protected JRTemplateEllipse(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JREllipse ellipse)
{
    super(origin, defaultStyleProvider);

    setEllipse(ellipse);
}
项目:jasperreports    文件:JRTemplateRectangle.java   
/**
 *
 */
protected JRTemplateRectangle(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRRectangle rectangle)
{
    super(origin, defaultStyleProvider);

    setRectangle(rectangle);
}
项目:jasperreports    文件:JRTemplateRectangle.java   
/**
 *
 */
protected JRTemplateRectangle(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRSubreport subreport)
{
    super(origin, defaultStyleProvider);

    setSubreport(subreport);
}
项目:jasperreports    文件:JRTemplateText.java   
/**
 *
 */
protected JRTemplateText(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRStaticText staticText)
{
    super(origin, defaultStyleProvider);

    setStaticText(staticText);
}
项目:jasperreports    文件:JRTemplateText.java   
/**
 *
 */
protected JRTemplateText(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRTextField textField)
{
    super(origin, defaultStyleProvider);

    setTextField(textField);
}
项目:jasperreports    文件:JRTemplateText.java   
/**
 * 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);
}
项目:jasperreports    文件:JRTemplateGenericElement.java   
protected JRTemplateGenericElement(JROrigin origin, 
        JRDefaultStyleProvider defaultStyleProvider, JRGenericElement element)
{
    super(origin, defaultStyleProvider);

    setElement(element);
    setGenericType(element.getGenericType());
}
项目:jasperreports    文件:JRTemplateGenericElement.java   
/**
 * 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);
}
项目:jasperreports    文件:JRTemplateGenericElement.java   
/**
 * 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);
}
项目:jasperreports    文件:JRTemplateFrame.java   
/**
 * 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());
}
项目:jasperreports    文件:JRTemplateFrame.java   
/**
 * 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());
}
项目:jasperreports    文件:JRTemplateImage.java   
/**
 *
 */
protected JRTemplateImage(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRImage image)
{
    super(origin, defaultStyleProvider);

    setImage(image);
}
项目:jasperreports    文件:JRTemplateImage.java   
/**
 *
 */
protected JRTemplateImage(JROrigin origin, JRDefaultStyleProvider defaultStyleProvider, JRChart chart)
{
    super(origin, defaultStyleProvider);

    setChart(chart);
}
项目:jasperreports    文件:JRTemplateImage.java   
/**
 * 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);
}
项目:jasperreports    文件:BarcodeDesignEvaluator.java   
public BarcodeDesignEvaluator(
    JasperReportsContext jasperReportsContext,
    JRComponentElement componentElement,
    JRDefaultStyleProvider defaultStyleProvider
    )
{
    super(jasperReportsContext, componentElement, defaultStyleProvider);
}