diff --git a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 5b1ed2febf..b0fba71c96 100644 --- a/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer_base/src/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -28,6 +28,7 @@ import com.fr.design.gui.syntax.ui.rtextarea.RTextScrollPane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.ToolBarDef; +import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.script.Calculator; @@ -47,8 +48,8 @@ import java.util.ArrayList; import java.util.List; public class DBTableDataPane extends AbstractTableDataPane { - private static final String PREVIEW_BUTTON = Inter.getLocText("Preview"); - private static final String REFRESH_BUTTON = Inter.getLocText("Refresh"); + private static final String PREVIEW_BUTTON = Inter.getLocText("FR-Designer_Preview"); + private static final String REFRESH_BUTTON = Inter.getLocText("FR-Designer_Refresh"); private ConnectionTableProcedurePane connectionTableProcedurePane; private UITableEditorPane editorPane; @@ -77,7 +78,7 @@ public class DBTableDataPane extends AbstractTableDataPane { JPanel paraMeanPane = new JPanel(new BorderLayout()); paraMeanPane.setPreferredSize(new Dimension(680, 90)); - UILabel paraMean = new UILabel(Inter.getLocText("Datasource-Param_DES")); + UILabel paraMean = new UILabel(Inter.getLocText("FR-Designer-Datasource-Param_DES")); paraMeanPane.add(paraMean, BorderLayout.CENTER); ParameterTableModel model = new ParameterTableModel() { @@ -125,9 +126,12 @@ public class DBTableDataPane extends AbstractTableDataPane { } } }); - - this.add(connectionTableProcedurePane, BorderLayout.WEST); - this.add(sqlSplitPane, BorderLayout.CENTER); + box.setMinimumSize(new Dimension(310, 400)); + // 使用SplitPane + JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, connectionTableProcedurePane, sqlSplitPane); + mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor())); + mainSplitPane.setOneTouchExpandable(true); + this.add(mainSplitPane, BorderLayout.CENTER); } private boolean isPreviewOrRefreshButton (FocusEvent e) { @@ -140,7 +144,7 @@ public class DBTableDataPane extends AbstractTableDataPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("DS-Database_Query"); + return Inter.getLocText("FR-Designer-DS-Database_Query"); } private void refresh() { @@ -160,7 +164,7 @@ public class DBTableDataPane extends AbstractTableDataPane { toolBarDef.addShortCut(new PreviewAction()); toolBarDef.addShortCut(SeparatorDef.DEFAULT); toolBarDef.addShortCut(new EditPageQueryAction()); - isShareCheckBox = new UICheckBox(Inter.getLocText("Is_Share_DBTableData")); + isShareCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Is_Share_DBTableData")); maxPanel = new MaxMemRowCountPanel(); maxPanel.setBorder(null); UIToolbar editToolBar = ToolBarDef.createJToolBar(); @@ -233,7 +237,7 @@ public class DBTableDataPane extends AbstractTableDataPane { String dbName = this.connectionTableProcedurePane.getSelectedDatabaseConnnectonName(); if (StringUtils.isBlank(dbName) || StringUtils.isBlank(this.sqlTextPane.getText())) { try { - throw new Exception(Inter.getLocText("Connect_SQL_Cannot_Null") + "."); + throw new Exception(Inter.getLocText("FR-Designer_Connect_SQL_Cannot_Null") + "."); } catch (Exception e) { // JOptionPane.showMessageDialog(DBTableDataPane.this, // Inter.getLocText("Connect_SQL_Cannot_Null") + "."); @@ -288,7 +292,7 @@ public class DBTableDataPane extends AbstractTableDataPane { private class EditPageQueryAction extends UpdateAction { public EditPageQueryAction() { - this.setName(Inter.getLocText("LayerPageReport_PageQuery")); + this.setName(Inter.getLocText("FR-Designer-LayerPageReport_PageQuery")); this.setMnemonic('L'); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/text.png")); } @@ -338,7 +342,7 @@ public class DBTableDataPane extends AbstractTableDataPane { @Override protected String title4PopupWindow() { - return Inter.getLocText("LayerPageReport_Define_PageQuerySQL"); + return Inter.getLocText("FR-Designer-LayerPageReport_Define_PageQuerySQL"); } } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index 4a4870ba23..ecaa34ea00 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -15,6 +15,7 @@ import com.fr.plugin.dependence.PluginDependenceUnit; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; import com.fr.stable.xml.XMLTools; @@ -47,6 +48,9 @@ public class PluginHelper { * @param p 下载百分比处理 */ public static void downloadPluginFile(String id, String username, String password, Process p) throws Exception { + if (!PluginHelper.invalidUser(id, username, password)) { + return; + } HttpClient httpClient = new HttpClient(getDownloadPath(id, username, password)); if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { int totalSize = httpClient.getContentLength(); @@ -72,6 +76,16 @@ public class PluginHelper { } } + private static boolean invalidUser(String id, String username, String password) { + if (StringUtils.isEmpty(id)) { + return false; + } else if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)){ + return false; + } else { + return true; + } + } + private static String getDownloadPath(String id, String username, String password) throws Exception { HashMap map = new HashMap(); map.put("id", id); diff --git a/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java b/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java index c5837727ed..b2e30f41f5 100644 --- a/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java +++ b/designer_base/src/com/fr/design/gui/frpane/UICorrelationComboBoxPane.java @@ -46,6 +46,7 @@ import com.fr.stable.StringUtils; import com.fr.design.utils.gui.GUICoreUtils; public class UICorrelationComboBoxPane extends JPanel implements UIObserver { + private static final Dimension DIALOG_SIZE = new Dimension(500, 500); private JPopupMenu popMenu; private UIMenuTable tablePane; private UIButton addButton; @@ -79,6 +80,9 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver { } } + protected Dimension getDialogSize() { + return DIALOG_SIZE; + } /** * 刷新下拉列表和按钮 @@ -120,7 +124,7 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver { fireTargetChanged(); } }); - dialog.setSize(500, 500); + dialog.setSize(getDialogSize()); GUICoreUtils.centerWindow(dialog); dialog.setVisible(true); } @@ -202,7 +206,7 @@ public class UICorrelationComboBoxPane extends JPanel implements UIObserver { fireTargetChanged(); } }); - dialog.setSize(500, 500); + dialog.setSize(getDialogSize()); dialog.setVisible(true); } else { popMenu.show(UICorrelationComboBoxPane.this, addButton.getX() + 1, addButton.getY() + addButton.getHeight()); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java index 052fee20db..92177a8e3c 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/ChartEditPane.java @@ -168,7 +168,9 @@ public class ChartEditPane extends BasicPane implements AttributeChange,Prepare4 } protected ChartDataPane createChartDataPane(String plotID) { - return ChartTypeInterfaceManager.getInstance().getChartDataPane(plotID, listener); + ChartDataPane chartDataPane = ChartTypeInterfaceManager.getInstance().getChartDataPane(plotID, listener); + chartDataPane.setSupportCellData(dataPane4SupportCell.isSupportCellData()); + return chartDataPane; } protected void addTypePane() {