Java 类net.sf.jasperreports.engine.type.FillEnum 实例源码

项目:jasperreports    文件:JRPrintGraphicElementFactory.java   
@Override
public Object createObject(Attributes atts)
{
    JRBasePrintGraphicElement graphicElement = (JRBasePrintGraphicElement)digester.peek();

    PenEnum pen = PenEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_pen));
    if (pen != null)
    {
        if (log.isWarnEnabled())
        {
            log.warn("The 'pen' attribute is deprecated. Use the <pen> tag instead.");
        }
        JRPenUtil.setLinePenFromPen(pen, graphicElement.getLinePen());
    }

    FillEnum fill = FillEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_fill));
    if (fill != null)
    {
        graphicElement.setFill(fill);
    }

    return graphicElement;
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public FillEnum getFillValue(JRCommonGraphicElement element)
{
    FillEnum ownFill = element.getOwnFillValue();
    if (ownFill != null)
    {
        return ownFill;
    }
    JRStyle baseStyle = getBaseStyle(element);
    if (baseStyle != null)
    {
        FillEnum fill = baseStyle.getFillValue();
        if (fill != null)
        {
            return fill;
        }
    }
    return FillEnum.SOLID;
}
项目:PDFReporter-Studio    文件:MRectangle.java   
/**
 * Creates the property descriptors.
 * 
 * @param desc
 *          the desc
 */
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
    super.createPropertyDescriptors(desc, defaultsMap);

    fillD = new JSSEnumPropertyDescriptor(JRBaseStyle.PROPERTY_FILL, Messages.common_fill, FillEnum.class,
            NullEnum.INHERITED);
    fillD.setDescription(Messages.MRectangle_fill_description);
    desc.add(fillD);

    setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#graphicElement");

    IntegerPropertyDescriptor rD = new IntegerPropertyDescriptor(JRBaseStyle.PROPERTY_RADIUS, Messages.common_radius);
    rD.setCategory(Messages.MRectangle_rectangle_properties_category);
    rD.setDescription(Messages.MRectangle_radius_description);
    desc.add(rD);

    defaultsMap.put(JRBaseStyle.PROPERTY_FILL, null);

    setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#rectangle");
}
项目:jasperreports    文件:JRBaseGraphicElement.java   
@Override
public void setFill(FillEnum fillValue)
{
    FillEnum old = this.fillValue;
    this.fillValue = fillValue;
    getEventSupport().firePropertyChange(JRBaseStyle.PROPERTY_FILL, old, this.fillValue);
}
项目:jasperreports    文件:JRBaseGraphicElement.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        fillValue = FillEnum.getByValue(fill);
        fill = null;
    }
}
项目:jasperreports    文件:JRBaseStyle.java   
@Override
public void setFill(FillEnum fillValue)
{
    Object old = this.fillValue;
    this.fillValue = fillValue;
    getEventSupport().firePropertyChange(PROPERTY_FILL, old, this.fillValue);
}
项目:jasperreports    文件:JRBasePrintGraphicElement.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        fillValue = FillEnum.getByValue(fill);
        fill = null;
    }
}
项目:jasperreports    文件:JRGraphicElementFactory.java   
@Override
public Object createObject(Attributes atts)
{
    JRDesignGraphicElement graphicElement = (JRDesignGraphicElement)digester.peek();

    StretchTypeEnum stretchType = StretchTypeEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_stretchType));
    if (stretchType != null)
    {
        if (log.isWarnEnabled())
        {
            log.warn("The 'stretchType' attribute in <graphicElement> tag is deprecated. Use the same attribut in <reportElement> tag instead.");
        }

        graphicElement.setStretchType(stretchType);
    }

    PenEnum pen = PenEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_pen));
    if (pen != null)
    {
        if (log.isWarnEnabled())
        {
            log.warn("The 'pen' attribute is deprecated. Use the <pen> tag instead.");
        }

        JRPenUtil.setLinePenFromPen(pen, graphicElement.getLinePen());
    }

    FillEnum fill = FillEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_fill));
    if (fill != null)
    {
        graphicElement.setFill(fill);
    }

    return graphicElement;
}
项目:jasperreports    文件:StyleResolver.java   
/**
 *
 */
public FillEnum getFillValue(JRStyle style)
{
    FillEnum ownFill = style.getOwnFillValue();
    if (ownFill != null)
    {
        return ownFill;
    }
    JRStyle baseStyle = getBaseStyle(style);
    if (baseStyle != null)
    {
        return baseStyle.getFillValue();
    }
    return null;
}
项目:jasperreports    文件:JRDesignGraphicElement.java   
@Override
public void setFill(FillEnum fillValue)
{
    FillEnum old = this.fillValue;
    this.fillValue = fillValue;
    getEventSupport().firePropertyChange(JRBaseStyle.PROPERTY_FILL, old, this.fillValue);
}
项目:jasperreports    文件:JRDesignGraphicElement.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        fillValue = FillEnum.getByValue(fill);
        fill = null;
    }
}
项目:jasperreports    文件:JRTemplateGraphicElement.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        fillValue = FillEnum.getByValue(fill);
        fill = null;
    }
}
项目:jasperreports    文件:JRTemplateRectangle.java   
/**
 *
 */
protected void setSubreport(JRSubreport subreport)
{
    super.setElement(subreport);

    // don't want to inherit mode because of different defaults for rectangles and subreports
    setMode(subreport.getModeValue());

    linePen = new JRBasePen(this);

    getLinePen().setLineWidth(0f);
    setFill(FillEnum.SOLID);
}
项目:jasperreports    文件:JRTemplateImage.java   
/**
 *
 */
protected void setChart(JRChart chart)
{
    super.setElement(chart);

    linePen = new JRBasePen(this);

    getLinePen().setLineWidth(0f);
    setFill(FillEnum.SOLID);

    copyLineBox(chart.getLineBox());

    setLinkType(chart.getLinkType());
    setLinkTarget(chart.getLinkTarget());
}
项目:PDFReporter-Studio    文件:MLine.java   
@Override
public void setPropertyValue(Object id, Object value) {
    JRDesignLine jrElement = (JRDesignLine) getValue();
    if (id.equals(JRBaseLine.PROPERTY_DIRECTION))
        jrElement.setDirection((LineDirectionEnum) directionD.getEnumValue(value));
    if (id.equals(JRBaseStyle.PROPERTY_FILL))
        jrElement.setFill((FillEnum) fillD.getEnumValue(value));
    else
        super.setPropertyValue(id, value);
}
项目:PDFReporter-Studio    文件:MRectangle.java   
@Override
public void setPropertyValue(Object id, Object value) {
    JRDesignRectangle jrElement = (JRDesignRectangle) getValue();
    if (id.equals(JRBaseStyle.PROPERTY_FILL))
        jrElement.setFill((FillEnum) fillD.getEnumValue(value));
    else if (id.equals(JRBaseStyle.PROPERTY_RADIUS)) {
        jrElement.setRadius(value != null ? ((Integer) value).intValue() : 0);

    } else
        super.setPropertyValue(id, value);
}
项目:PDFReporter-Studio    文件:MEllipse.java   
/**
 * Creates the property descriptors.
 * 
 * @param desc
 *          the desc
 */
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
    super.createPropertyDescriptors(desc, defaultsMap);

    ComboBoxPropertyDescriptor fillD = new ComboBoxPropertyDescriptor(JRBaseStyle.PROPERTY_FILL, Messages.common_fill,
            EnumHelper.getEnumNames(FillEnum.values(), NullEnum.INHERITED));
    fillD.setDescription(Messages.MEllipse_fill_description);
    desc.add(fillD);

    setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#graphicElement");
}
项目:PDFReporter-Studio    文件:MEllipse.java   
@Override
public void setPropertyValue(Object id, Object value) {
    JRDesignEllipse jrElement = (JRDesignEllipse) getValue();
    if (id.equals(JRBaseStyle.PROPERTY_FILL))
        jrElement.setFill((FillEnum) EnumHelper.getSetValue(FillEnum.values(), value, 1, true));
    else
        super.setPropertyValue(id, value);
}
项目:ireport-fork    文件:FillProperty.java   
@Override
public List getTagList() 
{
    List tags = new java.util.ArrayList();
    tags.add(new Tag(FillEnum.SOLID, I18n.getString("Global.Property.Solid")));
    return tags;
}
项目:ireport-fork    文件:FillProperty.java   
@Override
@SuppressWarnings(value = "unchecked")
public PropertyEditor getPropertyEditor() {
    if (editor == null) {
        ArrayList l = new ArrayList();
        l.add(new Tag(FillEnum.SOLID, I18n.getString("AbstractStyleNode.Property.Solid")));
        editor = new ComboBoxPropertyEditor(false, l);
    }
    return editor;
}
项目:ireport-fork    文件:FillProperty.java   
private void setPropertyValue(Object val) {
    if (val == null || val instanceof FillEnum) {
        FillEnum oldValue = style.getOwnFillValue() == null ? null : style.getOwnFillValue();
        FillEnum newValue = (FillEnum) val;
        style.setFill(newValue);
        ObjectPropertyUndoableEdit urob = new ObjectPropertyUndoableEdit(style, "Fill", Byte.class, oldValue, newValue);
        IReportManager.getInstance().addUndoableEdit(urob);
    }
}
项目:jasperreports    文件:JRBaseGraphicElement.java   
@Override
public FillEnum getFillValue()
{
    return getStyleResolver().getFillValue(this);
}
项目:jasperreports    文件:JRBaseGraphicElement.java   
@Override
public FillEnum getOwnFillValue()
{
    return this.fillValue;
}
项目:jasperreports    文件:JRBaseStyle.java   
@Override
public FillEnum getFillValue()
{
    return getStyleResolver().getFillValue(this);
}
项目:jasperreports    文件:JRBaseStyle.java   
@Override
public FillEnum getOwnFillValue()
{
    return fillValue;
}
项目:jasperreports    文件:JRBaseStyle.java   
@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2)
    {
        modeValue = ModeEnum.getByValue(mode);
        horizontalAlignmentValue = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getByValue(horizontalAlignment);
        verticalAlignmentValue = net.sf.jasperreports.engine.type.VerticalAlignEnum.getByValue(verticalAlignment);
        rotationValue = RotationEnum.getByValue(rotation);
        lineSpacingValue = LineSpacingEnum.getByValue(lineSpacing);
        scaleImageValue = ScaleImageEnum.getByValue(scaleImage);
        fillValue = FillEnum.getByValue(fill);

        mode = null;
        horizontalAlignment = null;
        verticalAlignment = null;
        rotation = null;
        lineSpacing = null;
        scaleImage = null;
        fill = null;
    }

    if (isStyledText != null)
    {
        markup = isStyledText.booleanValue() ? JRCommonText.MARKUP_STYLED_TEXT : JRCommonText.MARKUP_NONE;
        isStyledText = null;
    }

    if (paragraph == null)
    {
        paragraph = new JRBaseParagraph(this);
        paragraph.setLineSpacing(lineSpacingValue);
        lineSpacingValue = null;
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_5_5_2)
    {
        fontsize = fontSize == null ? null : fontSize.floatValue();

        fontSize = null;
    }

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_6_0_2)
    {
        horizontalTextAlign = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getHorizontalTextAlignEnum(horizontalAlignmentValue);
        verticalTextAlign = net.sf.jasperreports.engine.type.VerticalAlignEnum.getVerticalTextAlignEnum(verticalAlignmentValue);

        horizontalImageAlign = net.sf.jasperreports.engine.type.HorizontalAlignEnum.getHorizontalImageAlignEnum(horizontalAlignmentValue);
        verticalImageAlign = net.sf.jasperreports.engine.type.VerticalAlignEnum.getVerticalImageAlignEnum(verticalAlignmentValue);

        horizontalAlignmentValue = null;
        verticalAlignmentValue = null;
    }
}
项目:jasperreports    文件:JRBasePrintGraphicElement.java   
@Override
public FillEnum getFillValue()
{
    return getStyleResolver().getFillValue(this);
}
项目:jasperreports    文件:JRBasePrintGraphicElement.java   
@Override
public FillEnum getOwnFillValue()
{
    return this.fillValue;
}
项目:jasperreports    文件:JRBasePrintGraphicElement.java   
@Override
public void setFill(FillEnum fillValue)
{
    this.fillValue = fillValue;
}
项目:jasperreports    文件:JRStyleResolver.java   
/**
 *
 */
public static FillEnum getFillValue(JRCommonGraphicElement element)
{
    return styleResolver.getFillValue(element);
}
项目:jasperreports    文件:JRStyleResolver.java   
/**
 *
 */
public static FillEnum getFillValue(JRStyle style)
{
    return styleResolver.getFillValue(style);
}
项目:jasperreports    文件:JRDesignGraphicElement.java   
@Override
public FillEnum getFillValue()
{
    return getStyleResolver().getFillValue(this);
}
项目:jasperreports    文件:JRDesignGraphicElement.java   
@Override
public FillEnum getOwnFillValue()
{
    return this.fillValue;
}
项目:jasperreports    文件:JRTemplateGraphicElement.java   
@Override
public FillEnum getFillValue()
{
    return getStyleResolver().getFillValue(this);
}
项目:jasperreports    文件:JRTemplateGraphicElement.java   
@Override
public FillEnum getOwnFillValue()
{
    return this.fillValue;
}
项目:jasperreports    文件:JRTemplateGraphicElement.java   
@Override
public void setFill(FillEnum fillValue)
{
    this.fillValue = fillValue;
}
项目:jasperreports    文件:JRFillGraphicElement.java   
@Override
public FillEnum getFillValue()
{
    return getStyleResolver().getFillValue(this);
}
项目:jasperreports    文件:JRFillGraphicElement.java   
@Override
public FillEnum getOwnFillValue()
{
    return providerStyle == null || providerStyle.getOwnFillValue() == null ? ((JRGraphicElement)this.parent).getOwnFillValue() : providerStyle.getOwnFillValue();
}
项目:jasperreports    文件:JRFillGraphicElement.java   
@Override
public void setFill(FillEnum fill)
{
    throw new UnsupportedOperationException();
}
项目:jasperreports    文件:JRTemplatePrintGraphicElement.java   
@Override
public FillEnum getFillValue()
{
    return ((JRTemplateGraphicElement)this.template).getFillValue();
}