Java 类net.sf.jasperreports.engine.base.JRBaseStaticText 实例源码

项目:jasperreports    文件:JRDesignStaticText.java   
@Override
public void setText(String text)
{
    Object old = this.text;
    this.text = text;
    getEventSupport().firePropertyChange(JRBaseStaticText.PROPERTY_TEXT, old, this.text);
}
项目:PDFReporter-Studio    文件:MStaticText.java   
@Override
public void createPropertyDescriptors(List<IPropertyDescriptor> desc, Map<String, Object> defaultsMap) {
    super.createPropertyDescriptors(desc, defaultsMap);

    NTextPropertyDescriptor textD = new NTextPropertyDescriptor(JRBaseStaticText.PROPERTY_TEXT, Messages.common_text);
    desc.add(textD);
    textD.setCategory(Messages.MStaticText_text_description);

    textD
            .setHelpRefBuilder(new HelpReferenceBuilder("net.sf.jasperreports.doc/docs/schema.reference.html?cp=0_1#text"));
}
项目:PDFReporter-Studio    文件:MStaticText.java   
@Override
public Object getPropertyValue(Object id) {
    JRDesignStaticText jrElement = (JRDesignStaticText) getValue();
    if (id.equals(JRBaseStaticText.PROPERTY_TEXT))
        return jrElement.getText();
    return super.getPropertyValue(id);
}
项目:PDFReporter-Studio    文件:MStaticText.java   
@Override
public void setPropertyValue(Object id, Object value) {
    JRDesignStaticText jrElement = (JRDesignStaticText) getValue();

    if (id.equals(JRBaseStaticText.PROPERTY_TEXT)){
        jrElement.setText((String) value);
    }   else
        super.setPropertyValue(id, value);
}
项目:PDFReporter-Studio    文件:TextEditManager.java   
protected void initCellEditor() {
    // update text

    try {
        MStaticText model = (MStaticText) ((FigureEditPart) getEditPart()).getModel();
        getCellEditor().setValue(model.getPropertyValue(JRBaseStaticText.PROPERTY_TEXT));
        getCellEditor().getControl().setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));

        // update font
        ZoomManager zoomMgr = (ZoomManager) getEditPart().getViewer().getProperty(ZoomManager.class.toString());
        if (zoomMgr != null) { // this will force the font to be set cachedZoom = -1.0;
            updateScaledFont(zoomMgr.getZoom(), model);
            zoomMgr.addZoomListener(zoomListener);
        } // else
            // getCellEditor().getControl().setFont(stickyNote.getFont());
        // Hook the cell editor's copy/paste actions to the actionBars so that they can
        // be invoked via keyboard
        // shortcuts.
        actionBars = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()
                .getEditorSite().getActionBars();
        saveCurrentActions(actionBars);
        actionHandler = new CellEditorActionHandler(actionBars);
        actionHandler.addCellEditor(getCellEditor());
        actionBars.updateActionBars();
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}
项目:PDFReporter-Studio    文件:StaticTextSection.java   
@Override
protected void initializeProvidedProperties() {
    super.initializeProvidedProperties();
    addProvidedProperties(JRBaseStaticText.PROPERTY_TEXT, Messages.common_text);
}
项目:PDFReporter-Studio    文件:MStaticText.java   
/**
 * Return the graphical properties for an MStaticText
 */
public HashSet<String> generateGraphicalProperties(){
    HashSet<String> result = super.generateGraphicalProperties();
    result.add(JRBaseStaticText.PROPERTY_TEXT);
    return result;
}
项目:ireport-fork    文件:TextProperty.java   
@Override
public String getName()
{
    return JRBaseStaticText.PROPERTY_TEXT;
}
项目:PDFReporter-Studio    文件:StaticTextSection.java   
/**
 * @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.setLayout(new GridLayout(2, false));

    createWidget4Property(parent, JRBaseStaticText.PROPERTY_TEXT);


}