/** * Creates the property descriptors. * * @param desc * the desc */ @Override public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) { super.createPropertyDescriptors(desc, defaultsMap); directionD = new JSSEnumPropertyDescriptor(JRBaseLine.PROPERTY_DIRECTION, Messages.MLine_direction, LineDirectionEnum.class, NullEnum.NULL); directionD.setDescription(Messages.MLine_direction_description); directionD.setCategory(Messages.MLine_line_category); desc.add(directionD); /* * fillD = new JSSEnumPropertyDescriptor(JRBaseStyle.PROPERTY_FILL, Messages.common_fill, FillEnum.class, * NullEnum.INHERITED); fillD.setDescription(Messages.MLine_fill_description); desc.add(fillD); */ defaultsMap.put(JRBaseLine.PROPERTY_DIRECTION, EnumHelper.getValue(LineDirectionEnum.TOP_DOWN, 1, true)); defaultsMap.put(JRBaseStyle.PROPERTY_FILL, null); setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#line"); }
@Override public void setDirection(LineDirectionEnum directionValue) { LineDirectionEnum old = this.directionValue; this.directionValue = directionValue; getEventSupport().firePropertyChange(JRBaseLine.PROPERTY_DIRECTION, old, this.directionValue); }
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { super.createControls(parent, tabbedPropertySheetPage); parent.setLayout(new GridLayout(2, false)); createWidget4Property(parent, JRBaseStyle.PROPERTY_FILL); createWidget4Property(parent, JRBaseLine.PROPERTY_DIRECTION); }
@Override public Object getPropertyValue(Object id) { JRDesignLine jrElement = (JRDesignLine) getValue(); if (id.equals(JRBaseLine.PROPERTY_DIRECTION)) return directionD.getEnumValue(jrElement.getDirectionValue()); if (id.equals(JRBaseStyle.PROPERTY_FILL)) return fillD.getEnumValue(jrElement.getOwnFillValue()); return super.getPropertyValue(id); }
@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); }
@Override protected void initializeProvidedProperties() { super.initializeProvidedProperties(); addProvidedProperties(JRBaseStyle.PROPERTY_FILL, Messages.common_fill); addProvidedProperties(JRBaseLine.PROPERTY_DIRECTION, Messages.MLine_direction); }
public HashSet<String> generateGraphicalProperties(){ HashSet<String> result = super.generateGraphicalProperties(); result.add(JRBaseLine.PROPERTY_DIRECTION); result.add(JRBaseStyle.PROPERTY_FILL); return result; }
@Override public String getName() { return JRBaseLine.PROPERTY_DIRECTION; }