diff --git a/designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index f707e0500..fd24573fe 100644 --- a/designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java @@ -1,17 +1,23 @@ package com.fr.design.report.freeze; -import java.awt.BorderLayout; -import java.awt.Color; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; -import javax.swing.BorderFactory; -import javax.swing.JPanel; +import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import com.fr.design.dialog.BasicPane; +import com.fr.design.dialog.UIDialog; +import com.fr.design.extra.PluginManagerPane; +import com.fr.design.extra.PluginShopDialog; +import com.fr.design.extra.PluginWebBridge; import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.DesignerContext; import com.fr.general.Inter; import com.fr.page.ReportPageAttrProvider; import com.fr.stable.ColumnRow; @@ -22,6 +28,10 @@ import com.fr.stable.bridge.StableFactory; * Sets Report Page Attributes */ public class RepeatAndFreezeSettingPane extends BasicPane { + + //边框高度 + private static final int LABEL_HEIGHT = 45; + // 重复标题行 private RepeatRowPane repeatTitleRowPane; // 重复标题列 @@ -206,7 +216,15 @@ public class RepeatAndFreezeSettingPane extends BasicPane { JPanel repeatPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); repeatPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); JPanel freezePanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + + //自适应插件 + JPanel infoPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Attention")); + + BoxCenterAligmentPane actionLabel = getURLActionLabel(Inter.getLocText("FR-Designer_Form-Fit-Tip")); + infoPane.add(actionLabel, BorderLayout.SOUTH); + outfreezePanel.add(freezePanel); + this.add(infoPane, BorderLayout.SOUTH); // 重复打印部分 // 重复打印标题的起始行 JPanel labelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); @@ -536,4 +554,58 @@ public class RepeatAndFreezeSettingPane extends BasicPane { return null; } + private BoxCenterAligmentPane getURLActionLabel(final String text) { + ActionLabel actionLabel = new ActionLabel(text); + + actionLabel.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + try { + //Desktop.getDesktop().browse(new URI(url)); + final PluginManagerPane managerPane = new PluginManagerPane(); + UIDialog dlg = new PluginShopDialog(DesignerContext.getDesignerFrame(),managerPane); + PluginWebBridge.getHelper().setDialogHandle(dlg); + dlg.setVisible(true); + RepeatAndFreezeSettingPane.this.getTopLevelAncestor().setVisible(false); + } catch (Exception exp) { + + } + } + }); + + return new BoxCenterAligmentPane(actionLabel); + } + + class BoxCenterAligmentPane extends JPanel { + + private UILabel textLabel; + + public BoxCenterAligmentPane(String text) { + this(new UILabel(text)); + } + + public BoxCenterAligmentPane(UILabel label) { + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + + JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + this.add(centerPane, BorderLayout.CENTER); + UILabel label1 = new UILabel(Inter.getLocText("FR-Designer_Form-Frozen-Tip")); + label1.setForeground(new Color(255, 0, 0)); + UILabel label2 = new UILabel(Inter.getLocText("FR-Designer_Form-Forzen-Speed")); + label2.setForeground(new Color(255, 0, 0)); + this.textLabel = label; + centerPane.add(label1); + centerPane.add(textLabel); + centerPane.add(label2); + } + + public void setFont(Font font) { + super.setFont(font); + + if (textLabel != null) { + textLabel.setFont(font); + } + } + } + } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index caa319088..680aa9b95 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -11,6 +11,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralUtils; import com.fr.general.Inter; +import com.fr.general.SiteCenter; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; import com.fr.stable.bridge.StableFactory; @@ -69,6 +70,8 @@ public class AboutPane extends JPanel { boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("Service_Phone") + ProductConstants.COMPARE_TELEPHONE); contentPane.add(boxCenterAlignmentPane); } + boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ:" + SiteCenter.getInstance().acquireUrlByKind("help.qq")); + contentPane.add(boxCenterAlignmentPane); BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL); BoxCenterAligmentPane emailLabel = getEmailActionLabel(ProductConstants.SUPPORT_EMAIL); diff --git a/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptor.java b/designer_base/src/com/fr/design/designer/creator/CRPropertyDescriptor.java similarity index 92% rename from designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptor.java rename to designer_base/src/com/fr/design/designer/creator/CRPropertyDescriptor.java index c56e150c0..315565324 100644 --- a/designer_form/src/com/fr/design/designer/creator/CRPropertyDescriptor.java +++ b/designer_base/src/com/fr/design/designer/creator/CRPropertyDescriptor.java @@ -3,7 +3,6 @@ */ package com.fr.design.designer.creator; -import com.fr.design.gui.xtable.AbstractPropertyGroupModel; import com.fr.stable.StringUtils; import com.fr.stable.core.PropertyChangeAdapter; @@ -15,6 +14,7 @@ import java.beans.PropertyDescriptor; * @since 6.5.3 */ public final class CRPropertyDescriptor extends PropertyDescriptor { + public static final String RENDERER = "renderer"; private PropertyChangeAdapter l; @@ -51,7 +51,7 @@ public final class CRPropertyDescriptor extends PropertyDescriptor { } public CRPropertyDescriptor setRendererClass(Class clazz) { - this.putKeyValue(AbstractPropertyGroupModel.RENDERER, clazz); + this.putKeyValue(RENDERER, clazz); return this; } diff --git a/designer_base/src/com/fr/design/fun/ParameterWindowEditorProcessor.java b/designer_base/src/com/fr/design/fun/ParameterWindowEditorProcessor.java new file mode 100644 index 000000000..d1eb60a88 --- /dev/null +++ b/designer_base/src/com/fr/design/fun/ParameterWindowEditorProcessor.java @@ -0,0 +1,20 @@ +package com.fr.design.fun; + +import com.fr.design.designer.creator.CRPropertyDescriptor; +import com.fr.stable.fun.mark.Immutable; + +/** + * Created by zpc on 16/7/21. + */ +public interface ParameterWindowEditorProcessor extends Immutable { + + String MARK_STRING = "ParameterWindowEditorProcessor"; + + int CURRENT_LEVEL = 1; + + /** + * 生成属性表 + */ + CRPropertyDescriptor[] createPropertyDescriptor(Class temp); +} + diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractParameterWindowEditorProcessor.java b/designer_base/src/com/fr/design/fun/impl/AbstractParameterWindowEditorProcessor.java new file mode 100644 index 000000000..0d449090f --- /dev/null +++ b/designer_base/src/com/fr/design/fun/impl/AbstractParameterWindowEditorProcessor.java @@ -0,0 +1,31 @@ +package com.fr.design.fun.impl; + +import com.fr.design.designer.creator.CRPropertyDescriptor; +import com.fr.design.fun.ParameterWindowEditorProcessor; +import com.fr.stable.fun.mark.API; + + +/** + * Created by zpc on 2016/7/21. + */ +@API(level = ParameterWindowEditorProcessor.CURRENT_LEVEL) +public abstract class AbstractParameterWindowEditorProcessor implements ParameterWindowEditorProcessor { + + public int currentAPILevel() { + return CURRENT_LEVEL; + } + + public int layerIndex() { + return DEFAULT_LAYER_INDEX; + } + + + + /** + * 生成属性表 + */ + @Override + public CRPropertyDescriptor[] createPropertyDescriptor(Class temp) { + return new CRPropertyDescriptor[0]; + } +} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index f0b1eac9f..d0177d404 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -301,7 +301,6 @@ public abstract class ToolBarMenuDock { if (ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)) { shortCuts.add(new FeedBackAction()); shortCuts.add(SeparatorDef.DEFAULT); - shortCuts.add(new SupportQQAction()); shortCuts.add(SeparatorDef.DEFAULT); // shortCuts.add(new ForumAction()); } diff --git a/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java b/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java index 9f92b9786..9e5520716 100644 --- a/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java @@ -3,6 +3,7 @@ */ package com.fr.design.designer.creator; +import com.fr.design.ExtraDesignClassManager; import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRParameterLayoutAdapter; import com.fr.design.form.util.XCreatorConstants; @@ -16,9 +17,12 @@ import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WParameterLayout; import com.fr.general.Background; import com.fr.general.Inter; +import com.fr.design.fun.ParameterWindowEditorProcessor; +import com.fr.stable.ArrayUtils; import java.awt.*; import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; /** * 表单参数界面container @@ -51,7 +55,7 @@ public class XWParameterLayout extends XWAbsoluteLayout { * @throws java.beans.IntrospectionException */ public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { - return new CRPropertyDescriptor[]{ + CRPropertyDescriptor[] propertyTableEditor = new CRPropertyDescriptor[]{ new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter .getLocText("FR-Designer_Form-Widget_Name")), new CRPropertyDescriptor("background", this.data.getClass()).setEditorClass(BackgroundEditor.class) @@ -61,9 +65,17 @@ public class XWParameterLayout extends XWAbsoluteLayout { .setI18NName(Inter.getLocText("FR-Designer_DisplayNothingBeforeQuery")) .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), new CRPropertyDescriptor("position", this.data.getClass()).setEditorClass(WidgetDisplayPosition.class) - .setRendererClass(WidgetDisplayPositionRender.class).setI18NName(Inter.getLocText("FR-Designer_WidgetDisplyPosition")) + .setRendererClass(WidgetDisplayPositionRender.class).setI18NName(Inter.getLocText("FR-Designer_WidgetDisplyPosition")) .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), }; + + ParameterWindowEditorProcessor processor = ExtraDesignClassManager.getInstance().getSingle(ParameterWindowEditorProcessor.MARK_STRING); + if (processor == null) { + return propertyTableEditor; + } + CRPropertyDescriptor[] extraEditor = processor.createPropertyDescriptor(this.data.getClass()); + + return ArrayUtils.addAll(propertyTableEditor, extraEditor); } @Override