From 48579a32fdb7bc63817f14d54fbb3342a235e936 Mon Sep 17 00:00:00 2001 From: fortyone <1151438686@qq.com> Date: Thu, 17 Nov 2016 11:34:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E4=B8=AD=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/.classpath | 96 ++++++++++--------- designer_base/.classpath | 55 ++++++++++- .../connect/ConnectionTableProcedurePane.java | 84 +++++++++------- .../design/formula/FunctionManagerPane.java | 2 +- .../design/hyperlink/WebHyperNorthPane.java | 4 +- .../mainframe/toolbar/ToolBarMenuDock.java | 2 +- designer_chart/.classpath | 49 +++++++--- .../src/com/fr/start/Designer4Chart.java | 4 +- designer_form/.classpath | 44 +++++++-- 9 files changed, 233 insertions(+), 107 deletions(-) diff --git a/designer/.classpath b/designer/.classpath index f46ca27d3..5d73feddc 100644 --- a/designer/.classpath +++ b/designer/.classpath @@ -1,52 +1,62 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/designer_base/.classpath b/designer_base/.classpath index cc6f823ac..0c04bc6c6 100644 --- a/designer_base/.classpath +++ b/designer_base/.classpath @@ -3,8 +3,57 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java index 44b71999b..096f8a411 100644 --- a/designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java +++ b/designer_base/src/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java @@ -11,6 +11,7 @@ import com.fr.design.gui.itextfield.UITextField; import com.fr.design.gui.ilist.TableViewList; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicPane; +import com.fr.general.GeneralContext; import com.fr.general.Inter; import com.fr.stable.ArrayUtils; @@ -28,7 +29,7 @@ import java.awt.event.*; */ public class ConnectionTableProcedurePane extends BasicPane { private static int WIDTH = 155; - private ConnectionComboBoxPanel connectionComboBox; + private ConnectionComboBoxPanel connectionComboBox; private UICheckBox tableCheckBox; private UICheckBox viewCheckBox; private UITextField searchField; @@ -37,16 +38,16 @@ public class ConnectionTableProcedurePane extends BasicPane { public ConnectionTableProcedurePane() { this.setLayout(new BorderLayout(4, 4)); - connectionComboBox = new ConnectionComboBoxPanel(com.fr.data.impl.Connection.class){ - protected void refreshItems(){ - super.refreshItems(); - if (tableViewList != null) { - search(); - } - } - }; + connectionComboBox = new ConnectionComboBoxPanel(com.fr.data.impl.Connection.class) { + protected void refreshItems() { + super.refreshItems(); + if (tableViewList != null) { + search(); + } + } + }; tableViewList = new TableViewList(); - ToolTipManager.sharedInstance().registerComponent(tableViewList); + ToolTipManager.sharedInstance().registerComponent(tableViewList); connectionComboBox.addComboBoxActionListener(filter); tableViewList.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { @@ -54,8 +55,8 @@ public class ConnectionTableProcedurePane extends BasicPane { Object obj = tableViewList.getSelectedValue(); TableProcedure tableProcedure = null; if (obj instanceof TableProcedure) { - tableProcedure = (TableProcedure)obj; - }else { + tableProcedure = (TableProcedure) obj; + } else { return; } for (int i = 0; i < ConnectionTableProcedurePane.this.listeners.size(); i++) { @@ -79,7 +80,7 @@ public class ConnectionTableProcedurePane extends BasicPane { this.add(connectionComboBox, BorderLayout.NORTH); this.add(tableViewListPane, BorderLayout.CENTER); this.add(filterPane, BorderLayout.SOUTH); - this.setPreferredSize(new Dimension(WIDTH, getPreferredSize().height)); + this.setPreferredSize(new Dimension(WIDTH, getPreferredSize().height)); } protected JPanel createCheckBoxgroupPane() { @@ -89,28 +90,42 @@ public class ConnectionTableProcedurePane extends BasicPane { tableCheckBox.setSelected(true); tableCheckBox.addActionListener(filter); first.add(tableCheckBox); - first.add(new UILabel(Inter.getLocText("Table"), BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING)); JPanel second = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); viewCheckBox = new UICheckBox(); viewCheckBox.setSelected(true); viewCheckBox.addActionListener(filter); second.add(viewCheckBox); - second.add(new UILabel(Inter.getLocText("SQL-View"), BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING)); + // 根据环境是否为中文设置不同的显示 + if (GeneralContext.isChineseEnv()) { + first.add(new UILabel(Inter.getLocText("Table"), + BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING)); + second.add(new UILabel(Inter.getLocText("SQL-View"), + BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING)); + } else { + UILabel ui1 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING); + UILabel ui2 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING); + ui1.setToolTipText(Inter.getLocText("Table")); + ui2.setToolTipText(Inter.getLocText("SQL-View")); + first.add(ui1); + second.add(ui2); + } checkBoxgroupPane.add(first); checkBoxgroupPane.add(second); return checkBoxgroupPane; } - /** - * 给 itemComboBox 加上 itemListener - * @param itemListener - */ - public void addItemListener(ItemListener itemListener) { - connectionComboBox.itemComboBox.addItemListener(itemListener); - } + /** + * 给 itemComboBox 加上 itemListener + * + * @param itemListener + */ + public void addItemListener(ItemListener itemListener) { + connectionComboBox.itemComboBox.addItemListener(itemListener); + } + private DocumentListener searchListener = new DocumentListener() { @Override @@ -146,13 +161,13 @@ public class ConnectionTableProcedurePane extends BasicPane { String[] types = ArrayUtils.EMPTY_STRING_ARRAY; if (tableCheckBox != null) { if (tableCheckBox.isSelected()) { - types = (String[])ArrayUtils.add(types, TableProcedure.TABLE); + types = (String[]) ArrayUtils.add(types, TableProcedure.TABLE); } if (viewCheckBox.isSelected()) { - types = (String[])ArrayUtils.add(types, TableProcedure.VIEW); + types = (String[]) ArrayUtils.add(types, TableProcedure.VIEW); } } else { - types = (String[])ArrayUtils.add(types, TableProcedure.PROCEDURE); + types = (String[]) ArrayUtils.add(types, TableProcedure.PROCEDURE); } tableViewList.populate(selectedObj, searchField.getText().trim(), types); } @@ -162,10 +177,10 @@ public class ConnectionTableProcedurePane extends BasicPane { return "Connection"; } - /** - * - * @param l - */ + /** + * + * @param l + */ public void addDoubleClickListener(DoubleClickSelectedNodeOnTreeListener l) { this.listeners.add(l); } @@ -179,10 +194,11 @@ public class ConnectionTableProcedurePane extends BasicPane { } public static interface DoubleClickSelectedNodeOnTreeListener { - /** - * 处理双击事件 - * @param target - */ - public void actionPerformed(TableProcedure target); + /** + * 处理双击事件 + * + * @param target + */ + public void actionPerformed(TableProcedure target); } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/formula/FunctionManagerPane.java b/designer_base/src/com/fr/design/formula/FunctionManagerPane.java index fd41df325..3fffe594e 100644 --- a/designer_base/src/com/fr/design/formula/FunctionManagerPane.java +++ b/designer_base/src/com/fr/design/formula/FunctionManagerPane.java @@ -132,7 +132,7 @@ public class FunctionManagerPane extends BasicPane { JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); this.add(northPane, BorderLayout.NORTH); JPanel reportletNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); - classNameTextField = new UITextField(28); + classNameTextField = new UITextField(25); reportletNamePane.add(classNameTextField); UIButton browserButton = new UIButton(Inter.getLocText("FR-Designer_Select")); browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); diff --git a/designer_base/src/com/fr/design/hyperlink/WebHyperNorthPane.java b/designer_base/src/com/fr/design/hyperlink/WebHyperNorthPane.java index 585864d60..ee3adaf76 100644 --- a/designer_base/src/com/fr/design/hyperlink/WebHyperNorthPane.java +++ b/designer_base/src/com/fr/design/hyperlink/WebHyperNorthPane.java @@ -51,10 +51,10 @@ public class WebHyperNorthPane extends AbstractHyperlinkPane { urlPane.add(urlTextField); urlTextField.setText(ProductConstants.WEBSITE_URL); - UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"})); + //UILabel label = new UILabel(Inter.getLocText(new String[]{"Example","Or"}, new String[]{":http://www.baidu.com","/main.jsp"})); JPanel urlWithHelp = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2); urlWithHelp.add(GUICoreUtils.createNamedPane(urlPane, "URL:")); - urlWithHelp.add(label); + //urlWithHelp.add(label); if(this.needRenamePane){ headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE,LayoutConstants.VGAP_SMALL)); 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 4e1d1decd..b1dbe5355 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -300,7 +300,7 @@ public abstract class ToolBarMenuDock { //shortCuts.add(new TutorialAction()); shortCuts.add(SeparatorDef.DEFAULT); if (ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)) { - shortCuts.add(new FeedBackAction()); + //shortCuts.add(new FeedBackAction()); shortCuts.add(SeparatorDef.DEFAULT); shortCuts.add(SeparatorDef.DEFAULT); // shortCuts.add(new ForumAction()); diff --git a/designer_chart/.classpath b/designer_chart/.classpath index 9cb17f77c..865d0fd9a 100644 --- a/designer_chart/.classpath +++ b/designer_chart/.classpath @@ -1,20 +1,43 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/designer_chart/src/com/fr/start/Designer4Chart.java b/designer_chart/src/com/fr/start/Designer4Chart.java index 83de32da7..877319155 100644 --- a/designer_chart/src/com/fr/start/Designer4Chart.java +++ b/designer_chart/src/com/fr/start/Designer4Chart.java @@ -388,8 +388,8 @@ public class Designer4Chart extends BaseDesigner { return new ShortCut[]{ new ChartWebAction(), SeparatorDef.DEFAULT, - new ChartFeedBackAciton(), - SeparatorDef.DEFAULT, + //new ChartFeedBackAciton(), + //SeparatorDef.DEFAULT, new UpdateOnlineAction(), new AboutAction() }; diff --git a/designer_form/.classpath b/designer_form/.classpath index 4eb8d8868..21414c0fb 100644 --- a/designer_form/.classpath +++ b/designer_form/.classpath @@ -1,15 +1,43 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +