From a97ae8cc0e487e76cff3cb0760cc1bbf7dbefe9e Mon Sep 17 00:00:00 2001 From: zpc Date: Thu, 21 Jul 2016 17:14:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89qq=E5=B8=AE=E5=8A=A9=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E5=9C=A8=E5=85=B3=E4=BA=8E=E8=BD=AF=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=E6=98=BE=E7=A4=BAqq=E5=8F=B7=E7=A0=81=EF=BC=8C=E5=86=BB?= =?UTF-8?q?=E7=BB=93=E6=97=B6=E7=BB=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 去掉qq帮助,并在关于软件中显示qq号码,冻结时给提示 --- .../freeze/RepeatAndFreezeSettingPane.java | 77 ++++++++++++++++++- .../com/fr/design/actions/help/AboutPane.java | 3 + .../mainframe/toolbar/ToolBarMenuDock.java | 2 +- 3 files changed, 77 insertions(+), 5 deletions(-) diff --git a/designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer/src/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index f707e0500f..3fa4d349a1 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; @@ -51,6 +57,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { // 填报冻结 private UICheckBox useWriteFrozenCCheckBox; private UICheckBox useWriteFrozenRCheckBox; + private static final int LABEL_HEIGHT = 45; /** * 重复标题行 @@ -206,7 +213,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("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 +551,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 caa3190889..680aa9b95b 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_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index f0b1eac9fb..364a11cee1 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,7 @@ 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(new SupportQQAction()); shortCuts.add(SeparatorDef.DEFAULT); // shortCuts.add(new ForumAction()); }