@Override public void setType(BreakTypeEnum typeValue) { Object old = this.typeValue; this.typeValue = typeValue; getEventSupport().firePropertyChange(PROPERTY_TYPE, old, this.typeValue); }
@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) { typeValue = BreakTypeEnum.getByValue(type); } }
/** * */ public void writeBreak(JRBreak breakElement) throws IOException { writer.startElement(JRXmlConstants.ELEMENT_break, getNamespace()); writer.addAttribute(JRXmlConstants.ATTRIBUTE_type, breakElement.getTypeValue(), BreakTypeEnum.PAGE); writeReportElement(breakElement); writer.closeElement(); }
@Override public Object createObject(Attributes atts) { JasperDesign jasperDesign = (JasperDesign)digester.peek(digester.getCount() - 2); JRDesignBreak breakElement = new JRDesignBreak(jasperDesign); BreakTypeEnum type = BreakTypeEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_type)); if (type != null) { breakElement.setType(type); } return breakElement; }
/** * */ public void writeBreak( JRBreak breakElement, String breakName) { if(breakElement != null) { write( "JRDesignBreak " + breakName + " = new JRDesignBreak(jasperDesign);\n"); write( breakName + ".setType({0});\n", breakElement.getTypeValue(), BreakTypeEnum.PAGE); writeReportElement( breakElement, breakName); flush(); } }
@Override public void setType(BreakTypeEnum typeValue) { Object old = this.typeValue; this.typeValue = typeValue; getEventSupport().firePropertyChange(JRBaseBreak.PROPERTY_TYPE, old, this.typeValue); }
/** * Creates the property descriptors. * * @param desc * the desc */ @Override public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) { super.createPropertyDescriptors(desc, defaultsMap); typeD = new JSSEnumPropertyDescriptor(JRBaseBreak.PROPERTY_TYPE, Messages.MBreak_type, BreakTypeEnum.class, NullEnum.NOTNULL); typeD.setDescription(Messages.MBreak_type_description); desc.add(typeD); typeD.setCategory(Messages.MBreak_break_properties_category); defaultsMap.put(JRBaseBreak.PROPERTY_TYPE, typeD.getEnumValue(BreakTypeEnum.PAGE)); setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#break"); }
@Override public void setPropertyValue(Object id, Object value) { JRDesignBreak jrElement = (JRDesignBreak) getValue(); if (id.equals(JRBaseBreak.PROPERTY_TYPE)) jrElement.setType((BreakTypeEnum) typeD.getEnumValue(value)); else super.setPropertyValue(id, value); }
/** * */ public void visitBreak(JRBreak breakElement) { if (breakElement.getTypeValue() == BreakTypeEnum.PAGE) name = "Page Break"; else name = "Column Break"; }
@Override public List getTagList() { List tags = new java.util.ArrayList(); tags.add(new Tag(BreakTypeEnum.PAGE, I18n.getString("Global.Property.BreakTypePage"))); tags.add(new Tag(BreakTypeEnum.COLUMN, I18n.getString("Global.Property.BreakTypeColumn"))); return tags; }
@Override public BreakTypeEnum getTypeValue() { return this.typeValue; }
@Override public BreakTypeEnum getTypeValue() { return ((JRBreak)parent).getTypeValue(); }
@Override public void setType(BreakTypeEnum type) { throw new UnsupportedOperationException(); }
@SuppressWarnings("unchecked") public BreakTypeProperty(JRDesignBreak breakElement) { super( BreakTypeEnum.class, breakElement); this.breakElement = breakElement; }
@Override public Object getDefaultValue() { return BreakTypeEnum.PAGE; }
@Override public void setPropertyValue(Object type) { breakElement.setType((BreakTypeEnum)type); }
/** * Gets the break type. * @return a value representing one of the break type constants in {@link BreakTypeEnum} */ public BreakTypeEnum getTypeValue();
/** * Sets the break type. * @param breakTypeEnum a value representing one of the break type constants in {@link BreakTypeEnum} */ public void setType(BreakTypeEnum breakTypeEnum);
public BreakTypeEnum getBreakTypeValue() { return (jRadioButtonPage.isSelected()) ? BreakTypeEnum.PAGE : BreakTypeEnum.COLUMN; }