@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 Object getPropertyValue(Object id) { JRDesignBreak jrElement = (JRDesignBreak) getValue(); if (id.equals(JRBaseBreak.PROPERTY_TYPE)) return typeD.getEnumValue(jrElement.getTypeValue()); return super.getPropertyValue(id); }
@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); }
@Override protected void initializeProvidedProperties() { super.initializeProvidedProperties(); addProvidedProperties(JRBaseBreak.PROPERTY_TYPE, Messages.MBreak_type); }
@Override public String getName() { return JRBaseBreak.PROPERTY_TYPE; }
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { super.createControls(parent, tabbedPropertySheetPage); parent.setLayout(new GridLayout(2, false)); createWidget4Property(parent, JRBaseBreak.PROPERTY_TYPE); }