/** * @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySection#createControls(org.eclipse.swt.widgets.Composite, * org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage) */ public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) { super.createControls(parent, tabbedPropertySheetPage); parent = getWidgetFactory().createSection(parent, "Paragraph", true, 2); section = (ExpandableComposite)parent.getParent(); createWidget4Property(parent, JRBaseParagraph.PROPERTY_LINE_SPACING); createWidget4Property(parent, JRBaseParagraph.PROPERTY_LINE_SPACING_SIZE); createWidget4Property(parent, JRBaseParagraph.PROPERTY_FIRST_LINE_INDENT); createWidget4Property(parent, JRBaseParagraph.PROPERTY_LEFT_INDENT); createWidget4Property(parent, JRBaseParagraph.PROPERTY_RIGHT_INDENT); createWidget4Property(parent, JRBaseParagraph.PROPERTY_SPACING_BEFORE); createWidget4Property(parent, JRBaseParagraph.PROPERTY_SPACING_AFTER); createWidget4Property(parent, JRBaseParagraph.PROPERTY_TAB_STOP_WIDTH); }
/** * Return the graphical properties for an MTextElement */ public HashSet<String> generateGraphicalProperties(){ HashSet<String> result = super.generateGraphicalProperties(); result.add(JRBaseStyle.PROPERTY_HORIZONTAL_ALIGNMENT); result.add(JRBaseStyle.PROPERTY_VERTICAL_ALIGNMENT); result.add(JRBaseStyle.PROPERTY_ROTATION); result.add(JRBaseParagraph.PROPERTY_LINE_SPACING); result.add(JRBaseParagraph.PROPERTY_LINE_SPACING_SIZE); result.add(JRBaseParagraph.PROPERTY_FIRST_LINE_INDENT); result.add(JRBaseParagraph.PROPERTY_LEFT_INDENT); result.add(JRBaseParagraph.PROPERTY_RIGHT_INDENT); result.add(JRBaseParagraph.PROPERTY_SPACING_BEFORE); result.add(JRBaseParagraph.PROPERTY_SPACING_AFTER); result.add(JRBaseParagraph.PROPERTY_TAB_STOP_WIDTH); result.add(JRBaseStyle.PROPERTY_VERTICAL_ALIGNMENT); result.add(JRBaseFont.PROPERTY_BOLD); result.add(JRBaseFont.PROPERTY_UNDERLINE); result.add(JRBaseFont.PROPERTY_STRIKE_THROUGH); result.add(JRBaseFont.PROPERTY_ITALIC); result.add(JRBaseFont.PROPERTY_FONT_SIZE); result.add(JRBaseFont.PROPERTY_FONT_NAME); return result; }
public Object getPropertyActualValue(Object id) { JRBaseParagraph jrElement = (JRBaseParagraph) getValue(); if (jrElement != null) { if (id.equals(JRBaseParagraph.PROPERTY_LINE_SPACING)) return lineSpacingD.getEnumValue(jrElement.getLineSpacing()); if (id.equals(JRBaseParagraph.PROPERTY_LINE_SPACING_SIZE)) return jrElement.getLineSpacingSize(); if (id.equals(JRBaseParagraph.PROPERTY_FIRST_LINE_INDENT)) return jrElement.getFirstLineIndent(); if (id.equals(JRBaseParagraph.PROPERTY_LEFT_INDENT)) return jrElement.getLeftIndent(); if (id.equals(JRBaseParagraph.PROPERTY_RIGHT_INDENT)) return jrElement.getRightIndent(); if (id.equals(JRBaseParagraph.PROPERTY_SPACING_BEFORE)) return jrElement.getSpacingBefore(); if (id.equals(JRBaseParagraph.PROPERTY_SPACING_AFTER)) return jrElement.getSpacingAfter(); if (id.equals(JRBaseParagraph.PROPERTY_TAB_STOP_WIDTH)) return jrElement.getTabStopWidth(); } return super.getPropertyActualValue(id); }
public void setPropertyValue(Object id, Object value) { JRBaseParagraph jrElement = (JRBaseParagraph) getValue(); if (jrElement != null) { if (id.equals(JRBaseParagraph.PROPERTY_LINE_SPACING)) jrElement.setLineSpacing((LineSpacingEnum) lineSpacingD.getEnumValue(value)); if (id.equals(JRBaseParagraph.PROPERTY_LINE_SPACING_SIZE)) jrElement.setLineSpacingSize((Float) value); if (id.equals(JRBaseParagraph.PROPERTY_FIRST_LINE_INDENT)) jrElement.setFirstLineIndent((Integer) value); if (id.equals(JRBaseParagraph.PROPERTY_LEFT_INDENT)) jrElement.setLeftIndent((Integer) value); if (id.equals(JRBaseParagraph.PROPERTY_RIGHT_INDENT)) jrElement.setRightIndent((Integer) value); if (id.equals(JRBaseParagraph.PROPERTY_SPACING_BEFORE)) jrElement.setSpacingBefore((Integer) value); if (id.equals(JRBaseParagraph.PROPERTY_SPACING_AFTER)) jrElement.setSpacingAfter((Integer) value); if (id.equals(JRBaseParagraph.PROPERTY_TAB_STOP_WIDTH)) jrElement.setTabStopWidth((Integer) value); if (id.equals(JRBaseParagraph.PROPERTY_TAB_STOPS)) { jrElement.addTabStop(null); } } }
private void init() { setDisplayName ( style.getName()); super.setName( style.getName() ); setIconBaseWithExtension("com/jaspersoft/ireport/designer/resources/style-16.png"); style.getEventSupport().addPropertyChangeListener(this); ((JRBasePen)style.getLinePen()).getEventSupport().addPropertyChangeListener(this); JRBaseLineBox baseBox = (JRBaseLineBox)style.getLineBox(); baseBox.getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getTopPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getBottomPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getLeftPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getRightPen()).getEventSupport().addPropertyChangeListener(this); ((JRBaseParagraph)style.getParagraph()).getEventSupport().addPropertyChangeListener(this); }
/** * Creates a new text element. */ protected JRDesignTextElement(JRDefaultStyleProvider defaultStyleProvider) { super(defaultStyleProvider); lineBox = new JRBaseLineBox(this); paragraph = new JRBaseParagraph(this); }
/** * 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); }
@Override protected void initializeProvidedProperties() { super.initializeProvidedProperties(); addProvidedProperties(JRBaseParagraph.PROPERTY_LINE_SPACING, Messages.common_line_spacing); addProvidedProperties(JRBaseParagraph.PROPERTY_LINE_SPACING_SIZE, Messages.MParagraph_lineSpacingSizeTitle); addProvidedProperties(JRBaseParagraph.PROPERTY_FIRST_LINE_INDENT, Messages.MParagraph_firstIdentTitle); addProvidedProperties(JRBaseParagraph.PROPERTY_LEFT_INDENT, Messages.MParagraph_leftIdentTitle); addProvidedProperties(JRBaseParagraph.PROPERTY_SPACING_BEFORE, Messages.MParagraph_spacingBeforeTitle); addProvidedProperties(JRBaseParagraph.PROPERTY_SPACING_AFTER, Messages.MParagraph_spacingAfterTitle); addProvidedProperties(JRBaseParagraph.PROPERTY_TAB_STOP_WIDTH, Messages.MParagraph_tabStopWidthTitle); addProvidedProperties(JRBaseParagraph.PROPERTY_RIGHT_INDENT, Messages.MParagraph_rightIdentTitle); }
@Override public Object getPropertyActualValue(Object id) { JRDesignTextElement jrElement = (JRDesignTextElement) getValue(); if (id.equals(JRDesignStyle.PROPERTY_MARKUP)) return jrElement.getMarkup(); if (id.equals(PARAGRAPH)) { if (mParagraph == null) { mParagraph = new MParagraph(this, (JRBaseParagraph) jrElement.getParagraph()); setChildListener(mParagraph); } return mParagraph; } if (id.equals(JRBaseStyle.PROPERTY_HORIZONTAL_ALIGNMENT)) return hAlignD.getEnumValue(jrElement.getHorizontalAlignmentValue()); if (id.equals(JRBaseStyle.PROPERTY_VERTICAL_ALIGNMENT)) return vAlignD.getEnumValue(jrElement.getVerticalAlignmentValue()); if (id.equals(JRBaseStyle.PROPERTY_ROTATION)) return rotationD.getEnumValue(jrElement.getRotationValue()); if (getMFont() != null) { Object val = tFont.getPropertyActualValue(id); if (val != null) return val; } return super.getPropertyActualValue(id); }
@Override public Object getPropertyValue(Object id) { JRDesignTextElement jrElement = (JRDesignTextElement) getValue(); if (id.equals(JRDesignStyle.PROPERTY_MARKUP)) return jrElement.getOwnMarkup(); if (id.equals(PARAGRAPH)) { if (mParagraph == null) { mParagraph = new MParagraph(this, (JRBaseParagraph) jrElement.getParagraph()); setChildListener(mParagraph); } return mParagraph; } if (id.equals(JRBaseStyle.PROPERTY_HORIZONTAL_ALIGNMENT)){ if (hAlignD == null) getPropertyDescriptors(); return hAlignD.getEnumValue(jrElement.getOwnHorizontalAlignmentValue()); } if (id.equals(JRBaseStyle.PROPERTY_VERTICAL_ALIGNMENT)){ if (vAlignD == null) getPropertyDescriptors(); return vAlignD.getEnumValue(jrElement.getOwnVerticalAlignmentValue()); } if (id.equals(JRBaseStyle.PROPERTY_ROTATION)){ if (rotationD == null) getPropertyDescriptors(); return rotationD.getEnumValue(jrElement.getOwnRotationValue()); } if (getMFont() != null) { Object val = tFont.getPropertyValue(id); if (val != null) return val; } return super.getPropertyValue(id); }
@Override public void trasnferProperties(JRElement target){ super.trasnferProperties(target); JRDesignTextElement jrSource = (JRDesignTextElement) getValue(); JRDesignTextElement jrTarget = (JRDesignTextElement)target; jrTarget.setHorizontalAlignment(jrSource.getOwnHorizontalAlignmentValue()); jrTarget.setVerticalAlignment(jrSource.getOwnVerticalAlignmentValue()); jrTarget.setMarkup(getStringClone(jrSource.getOwnMarkup())); jrTarget.setRotation(jrSource.getOwnRotationValue()); jrTarget.setBold(jrSource.isOwnBold()); jrTarget.setItalic(jrSource.isOwnItalic()); jrTarget.setUnderline(jrSource.isOwnUnderline()); jrTarget.setStrikeThrough(jrSource.isOwnStrikeThrough()); jrTarget.setPdfEmbedded(jrSource.isOwnPdfEmbedded()); jrTarget.setFontName(getStringClone(jrSource.getOwnFontName())); jrTarget.setFontSize(jrSource.getOwnFontsize()); jrTarget.setPdfFontName(getStringClone(jrSource.getOwnPdfFontName())); jrTarget.setPdfEncoding(getStringClone(jrSource.getOwnPdfEncoding())); JRBaseParagraph jrTargetParagraph = (JRBaseParagraph)jrTarget.getParagraph(); JRBaseParagraph jrSourceParagraph = (JRBaseParagraph) jrSource.getParagraph(); if (jrTargetParagraph != null && jrSourceParagraph != null){ jrTargetParagraph.setLineSpacing(jrSourceParagraph.getOwnLineSpacing()); jrTargetParagraph.setLineSpacingSize(jrSourceParagraph.getOwnLineSpacingSize()); jrTargetParagraph.setFirstLineIndent(jrSourceParagraph.getOwnFirstLineIndent()); jrTargetParagraph.setLeftIndent(jrSourceParagraph.getOwnLeftIndent()); jrTargetParagraph.setRightIndent(jrSourceParagraph.getOwnRightIndent()); jrTargetParagraph.setSpacingAfter(jrSourceParagraph.getOwnSpacingAfter()); jrTargetParagraph.setSpacingBefore(jrTargetParagraph.getOwnSpacingBefore()); jrTargetParagraph.setTabStopWidth(jrSourceParagraph.getOwnTabStopWidth()); } }
public Object getPropertyValue(Object id) { JRBaseParagraph jrElement = (JRBaseParagraph) getValue(); if (jrElement != null) { if (id.equals(JRBaseParagraph.PROPERTY_LINE_SPACING)) return lineSpacingD.getEnumValue(jrElement.getOwnLineSpacing()); if (id.equals(JRBaseParagraph.PROPERTY_LINE_SPACING_SIZE)) return jrElement.getOwnLineSpacingSize(); if (id.equals(JRBaseParagraph.PROPERTY_FIRST_LINE_INDENT)) return jrElement.getOwnFirstLineIndent(); if (id.equals(JRBaseParagraph.PROPERTY_LEFT_INDENT)) return jrElement.getOwnLeftIndent(); if (id.equals(JRBaseParagraph.PROPERTY_RIGHT_INDENT)) return jrElement.getOwnRightIndent(); if (id.equals(JRBaseParagraph.PROPERTY_SPACING_BEFORE)) return jrElement.getOwnSpacingBefore(); if (id.equals(JRBaseParagraph.PROPERTY_SPACING_AFTER)) return jrElement.getOwnSpacingAfter(); if (id.equals(JRBaseParagraph.PROPERTY_TAB_STOP_WIDTH)) return jrElement.getOwnTabStopWidth(); if (id.equals(JRBaseParagraph.PROPERTY_TAB_STOPS)) { TabStop[] tabStops = jrElement.getTabStops(); if (tabStops != null) return Arrays.asList(tabStops); return new ArrayList<TabStop>(); } } return null; }
private static void copyInheritedTextualAttributes(JRDesignElement target, JRStyle style){ JRDesignTextElement jrTarget = (JRDesignTextElement)target; if (jrTarget.getOwnHorizontalAlignmentValue() == null) jrTarget.setHorizontalAlignment(style.getHorizontalAlignmentValue()); if (jrTarget.getOwnVerticalAlignmentValue() == null) jrTarget.setVerticalAlignment(style.getVerticalAlignmentValue()); if (jrTarget.getOwnVerticalAlignmentValue() == null) jrTarget.setMarkup(getMarkup(style)); if (jrTarget.getOwnRotationValue() == null) jrTarget.setRotation(style.getRotationValue()); if (jrTarget.isOwnBold() == null) jrTarget.setBold(style.isBold()); if (jrTarget.isOwnItalic() == null) jrTarget.setItalic(style.isItalic()); if (jrTarget.isOwnUnderline() == null) jrTarget.setUnderline(style.isUnderline()); if (jrTarget.isOwnStrikeThrough() == null) jrTarget.setStrikeThrough(style.isStrikeThrough()); if (jrTarget.isOwnPdfEmbedded() == null) jrTarget.setPdfEmbedded(style.isPdfEmbedded()); if (jrTarget.getOwnFontName() == null) jrTarget.setFontName(getFontName(style)); if (jrTarget.getOwnFontsize() == null) jrTarget.setFontSize(style.getFontsize()); if (jrTarget.getOwnPdfFontName() == null) jrTarget.setPdfFontName(getPdfFontName(style)); if (jrTarget.getOwnPdfEncoding() == null) jrTarget.setPdfEncoding(getPdfEncoding(style)); JRBaseParagraph jrTargetParagraph = (JRBaseParagraph)jrTarget.getParagraph(); JRBaseParagraph jrStyleParagraph = (JRBaseParagraph) style.getParagraph(); if (jrTargetParagraph != null && jrStyleParagraph != null){ if (jrTargetParagraph.getOwnLineSpacing() == null) jrTargetParagraph.setLineSpacing(jrStyleParagraph.getLineSpacing()); if (jrTargetParagraph.getOwnLineSpacingSize() == null) jrTargetParagraph.setLineSpacingSize(jrStyleParagraph.getLineSpacingSize()); if (jrTargetParagraph.getOwnFirstLineIndent() == null) jrTargetParagraph.setFirstLineIndent(jrStyleParagraph.getFirstLineIndent()); if (jrTargetParagraph.getOwnLeftIndent() == null) jrTargetParagraph.setLeftIndent(jrStyleParagraph.getLeftIndent()); if (jrTargetParagraph.getOwnRightIndent() == null) jrTargetParagraph.setRightIndent(jrStyleParagraph.getRightIndent()); if (jrTargetParagraph.getOwnSpacingAfter() == null) jrTargetParagraph.setSpacingAfter(jrStyleParagraph.getSpacingAfter()); if (jrTargetParagraph.getOwnSpacingBefore() == null) jrTargetParagraph.setSpacingBefore(jrStyleParagraph.getSpacingBefore()); if (jrTargetParagraph.getOwnTabStopWidth() == null) jrTargetParagraph.setTabStopWidth(jrStyleParagraph.getTabStopWidth()); } }
public ElementNode(JasperDesign jd, JRDesignElement element, Children children, Index index, Lookup doLkp) { super (children, index, new ProxyLookup( doLkp, Lookups.fixed(jd,element))); elemenNameVisitor = new ElementNameVisitor(jd); this.jd = jd; this.element = element; element.getEventSupport().addPropertyChangeListener(this); IReportManager.getPreferences().addPreferenceChangeListener(new WeakPreferenceChangeListener(this,IReportManager.getInstance().getPreferences())); if (element instanceof JRDesignGraphicElement) { JRDesignGraphicElement gele = (JRDesignGraphicElement)element; ((JRBasePen)gele.getLinePen()).getEventSupport().addPropertyChangeListener(this); } if (element instanceof JRBoxContainer) { JRBoxContainer boxcontainer = (JRBoxContainer)element; JRBaseLineBox baseBox = (JRBaseLineBox)boxcontainer.getLineBox(); baseBox.getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getTopPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getBottomPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getLeftPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getRightPen()).getEventSupport().addPropertyChangeListener(this); } if (element instanceof JRDesignTextElement) { ((JRBaseParagraph)((JRDesignTextElement)element).getParagraph()).getEventSupport().addPropertyChangeListener(this); } }
@SuppressWarnings("unchecked") public TabStopsProperty(JRBaseStyle style) { super( JRBaseParagraph.PROPERTY_TAB_STOPS, List.class, I18n.getString("Global.Property.TabStops"),I18n.getString("Global.Property.TabStops.desc"), true,true); setValue("canEditAsText", Boolean.FALSE); setValue("useList", Boolean.TRUE); this.style = style; }
@SuppressWarnings("unchecked") public TabStopsProperty(JRDesignTextElement element) { super( JRBaseParagraph.PROPERTY_TAB_STOPS, List.class, I18n.getString("Global.Property.TabStops"),I18n.getString("Global.Property.TabStops.desc"), true,true); setValue("canEditAsText", Boolean.FALSE); setValue("useList", Boolean.TRUE); this.element = element; }
public MParagraph(ANode parent, JRBaseParagraph bParagraph) { super(); setJasperConfiguration(parent.getJasperConfiguration()); setValue(bParagraph); }
@Override public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) { lineSpacingD = new JSSEnumPropertyDescriptor(JRBaseParagraph.PROPERTY_LINE_SPACING, Messages.common_line_spacing, LineSpacingEnum.class, NullEnum.INHERITED); lineSpacingD.setDescription(Messages.MTextElement_line_spacing_description); desc.add(lineSpacingD); FloatPropertyDescriptor lineSpacingSize = new FloatPropertyDescriptor(JRBaseParagraph.PROPERTY_LINE_SPACING_SIZE, Messages.MParagraph_lineSpacingSizeTitle); lineSpacingSize.setDescription(Messages.MParagraph_lineSpacingSizeDescription); desc.add(lineSpacingSize); PixelPropertyDescriptor firstLineIdent = new PixelPropertyDescriptor( JRBaseParagraph.PROPERTY_FIRST_LINE_INDENT, Messages.MParagraph_firstIdentTitle); firstLineIdent.setDescription(Messages.MParagraph_firstIdentDescription); desc.add(firstLineIdent); PixelPropertyDescriptor leftIdent = new PixelPropertyDescriptor(JRBaseParagraph.PROPERTY_LEFT_INDENT, Messages.MParagraph_leftIdentTitle); leftIdent.setDescription(Messages.MParagraph_leftIdentDescription); desc.add(leftIdent); PixelPropertyDescriptor rightIdent = new PixelPropertyDescriptor(JRBaseParagraph.PROPERTY_RIGHT_INDENT, Messages.MParagraph_rightIdentTitle); rightIdent.setDescription(Messages.MParagraph_rightIdentDescription); desc.add(rightIdent); PixelPropertyDescriptor spacingBefore = new PixelPropertyDescriptor(JRBaseParagraph.PROPERTY_SPACING_BEFORE, Messages.MParagraph_spacingBeforeTitle); spacingBefore.setDescription(Messages.MParagraph_spacingBeforeDescription); desc.add(spacingBefore); PixelPropertyDescriptor spacingAfter = new PixelPropertyDescriptor(JRBaseParagraph.PROPERTY_SPACING_AFTER, Messages.MParagraph_spacingAfterTitle); spacingAfter.setDescription(Messages.MParagraph_spacingAfterDescription); desc.add(spacingAfter); PixelPropertyDescriptor tabStopWidth = new PixelPropertyDescriptor(JRBaseParagraph.PROPERTY_TAB_STOP_WIDTH, Messages.MParagraph_tabStopWidthTitle); tabStopWidth.setDescription(Messages.MParagraph_tabStopWidthDescription); desc.add(tabStopWidth); TabStopsPropertyDescriptor tabStops = new TabStopsPropertyDescriptor(JRBaseParagraph.PROPERTY_TAB_STOPS, Messages.MParagraph_tabStopsTitle); tabStops.setDescription(Messages.MParagraph_tabStopsDescription); desc.add(tabStops); tabStops.setCategory("Paragraph"); //$NON-NLS-1$ lineSpacingD.setCategory("Paragraph"); //$NON-NLS-1$ lineSpacingSize.setCategory("Paragraph"); //$NON-NLS-1$ firstLineIdent.setCategory("Paragraph"); //$NON-NLS-1$ leftIdent.setCategory("Paragraph"); //$NON-NLS-1$ rightIdent.setCategory("Paragraph"); //$NON-NLS-1$ spacingBefore.setCategory("Paragraph"); //$NON-NLS-1$ spacingAfter.setCategory("Paragraph"); //$NON-NLS-1$ tabStopWidth.setCategory("Paragraph"); //$NON-NLS-1$ setHelpPrefix(desc, "net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#paragraph"); //$NON-NLS-1$ }
public JRDesignElementWidget(AbstractReportObjectScene scene, JRDesignElement element) { super(scene); this.element = element; setBorder(new SimpleLineBorder(this)); updateBounds(); try { if (crosstabImage == null) crosstabImage = new javax.swing.ImageIcon(getClass().getResource("/com/jaspersoft/ireport/designer/resources/crosstab-32.png")); if (subreportImage == null) subreportImage = new javax.swing.ImageIcon(getClass().getResource("/com/jaspersoft/ireport/designer/resources/subreport-32.png")); if (multiaxisImage == null) multiaxisImage = new javax.swing.ImageIcon(getClass().getResource("/com/jaspersoft/ireport/designer/resources/chartaxis-32.png")); if (genericElementImage == null) genericElementImage = new javax.swing.ImageIcon(getClass().getResource("/com/jaspersoft/ireport/designer/resources/genericelement-48.png")); } catch (Exception ex) { } selectionWidget = new SelectionWidget(scene, this); notifyStateChanged(null, ObjectState.createNormal()); selectionWidget.addDependency(new Dependency() { public void revalidateDependency() { //setPreferredLocation(selectionWidget.getPreferredLocation() ); //setPreferredBounds(selectionWidget.getPreferredBounds()); //System.out.println("Revaludated"); } }); element.getEventSupport().addPropertyChangeListener(this); if (element instanceof JRDesignGraphicElement) { JRDesignGraphicElement gele = (JRDesignGraphicElement)element; ((JRBasePen)gele.getLinePen()).getEventSupport().addPropertyChangeListener(this); } if (element instanceof JRBoxContainer) { JRBoxContainer boxcontainer = (JRBoxContainer)element; JRBaseLineBox baseBox = (JRBaseLineBox)boxcontainer.getLineBox(); baseBox.getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getTopPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getBottomPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getLeftPen()).getEventSupport().addPropertyChangeListener(this); ((JRBasePen)baseBox.getRightPen()).getEventSupport().addPropertyChangeListener(this); } if (element instanceof JRDesignTextElement) { ((JRBaseParagraph)((JRDesignTextElement)element).getParagraph()).getEventSupport().addPropertyChangeListener(this); } }
@Override public String getName() { return JRBaseParagraph.PROPERTY_SPACING_BEFORE; }
@Override public String getName() { return JRBaseParagraph.PROPERTY_FIRST_LINE_INDENT; }
@Override public String getName() { return JRBaseParagraph.PROPERTY_TAB_STOP_WIDTH; }
@Override public String getName() { return JRBaseParagraph.PROPERTY_LEFT_INDENT; }
@Override public String getName() { return JRBaseParagraph.PROPERTY_RIGHT_INDENT; }
@Override public String getName() { return JRBaseParagraph.PROPERTY_SPACING_AFTER; }
@Override public String getName() { return JRBaseParagraph.PROPERTY_LINE_SPACING; }
@Override public String getName() { return JRBaseParagraph.PROPERTY_LINE_SPACING_SIZE; }