From b558e64cb7c819c99c6c867abaa7729bedf1fab2 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 18 Aug 2017 12:03:03 +0800 Subject: [PATCH 01/33] =?UTF-8?q?REPORT-3813=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E5=8D=95=E5=85=83=E6=A0=BC=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E5=86=85=E5=AE=B9=E6=8F=90=E7=A4=BA=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/widget/CellWidgetCardPane.java | 26 ++++++++-- .../ui/BasicWidgetPropertySettingPane.java | 1 - .../fr/design/widget/ui/ButtonDefinePane.java | 2 - .../design/widget/ui/CheckBoxDefinePane.java | 6 +-- .../widget/ui/FieldEditorDefinePane.java | 12 ++--- .../widget/ui/IframeEditorDefinePane.java | 6 +-- .../design/widget/ui/WaterMarkDictPane.java | 8 ++-- .../fr/design/extra/PluginOperateUtils.java | 2 +- .../src/com/fr/design/extra/PluginUtils.java | 8 ++-- .../com/fr/design/extra/WebViewDlgHelper.java | 19 +------- .../gui/itextfield/UIPropertyTextField.java | 47 +++++++++++++++++++ .../fr/design/gui/itextfield/UITextField.java | 14 ++++-- .../design/mainframe/WidgetPropertyPane.java | 4 +- .../widget/ui/FormWidgetCardPane.java | 28 +++++++++-- .../widget/ui/designer/ButtonDefinePane.java | 10 ++-- .../ui/designer/CheckBoxDefinePane.java | 6 +-- .../ui/designer/ComboBoxDefinePane.java | 6 +-- .../ui/designer/ComboCheckBoxDefinePane.java | 7 ++- .../CustomWritableRepeatEditorPane.java | 1 - .../ui/designer/FieldEditorDefinePane.java | 34 +++++++++++--- .../ui/designer/IframeEditorDefinePane.java | 6 +-- .../designer/TextFieldEditorDefinePane.java | 6 +-- .../TreeComboBoxEditorDefinePane.java | 6 +-- .../widget/ui/designer/WaterMarkDictPane.java | 6 +-- .../designer/btn/ButtonGroupDefinePane.java | 2 +- .../designer/component/PaddingBoundPane.java | 1 - 26 files changed, 179 insertions(+), 95 deletions(-) create mode 100644 designer_base/src/com/fr/design/gui/itextfield/UIPropertyTextField.java diff --git a/designer/src/com/fr/design/widget/CellWidgetCardPane.java b/designer/src/com/fr/design/widget/CellWidgetCardPane.java index b6c4c5318d..bfae041868 100644 --- a/designer/src/com/fr/design/widget/CellWidgetCardPane.java +++ b/designer/src/com/fr/design/widget/CellWidgetCardPane.java @@ -2,6 +2,7 @@ package com.fr.design.widget; import com.fr.design.data.DataCreatorUI; import com.fr.design.dialog.BasicPane; +import com.fr.design.dialog.BasicScrollPane; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.layout.FRGUIPaneFactory; @@ -48,10 +49,30 @@ public class CellWidgetCardPane extends BasicPane { this.removeAll(); this.setLayout(FRGUIPaneFactory.createBorderLayout()); + final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + + BasicScrollPane basicScrollPane = new BasicScrollPane() { + @Override + protected JPanel createContentPane() { + return jPanel; + } + + @Override + public void populateBean(Object ob) { + + } + + @Override + protected String title4PopupWindow() { + return null; + } + }; + this.add(basicScrollPane, BorderLayout.CENTER); + //k tabbedPane = new CardLayout(); center = new JPanel(tabbedPane); - this.add(center, BorderLayout.CENTER); + jPanel.add(center, BorderLayout.CENTER); attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); eventTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); @@ -70,7 +91,7 @@ public class CellWidgetCardPane extends BasicPane { } }; tabsHeaderIconPane.setNeedLeftRightOutLine(false); - this.add(tabsHeaderIconPane, BorderLayout.NORTH); + jPanel.add(tabsHeaderIconPane, BorderLayout.NORTH); widgetPropertyPane = new BasicWidgetPropertySettingPane(); @@ -82,7 +103,6 @@ public class CellWidgetCardPane extends BasicPane { attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); attriTabPane.add(attriCardPane, BorderLayout.CENTER); attriCardLayout = (CardLayout) attriCardPane.getLayout(); - this.setPreferredSize(new Dimension(600, 450)); } private void initPaneList() { diff --git a/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java b/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java index 5e95a9d09b..16876b6f04 100644 --- a/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java +++ b/designer/src/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java @@ -3,7 +3,6 @@ package com.fr.design.widget.ui; import com.fr.design.constants.LayoutConstants; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.dialog.BasicPane; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; diff --git a/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java b/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java index fcb3f2dcc6..3d2a703ddd 100644 --- a/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ButtonDefinePane.java @@ -5,8 +5,6 @@ import com.fr.design.widget.ui.btn.ButtonDetailPaneFactory; import com.fr.form.ui.Button; import com.fr.form.ui.FreeButton; import com.fr.design.widget.btn.ButtonDetailPane; - -import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.*; diff --git a/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java b/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java index 98a1539ada..bde3332b46 100644 --- a/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/CheckBoxDefinePane.java @@ -3,7 +3,7 @@ package com.fr.design.widget.ui; import com.fr.design.constants.LayoutConstants; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -14,7 +14,7 @@ import javax.swing.*; import java.awt.*; public class CheckBoxDefinePane extends AbstractDataModify { - private UITextField text; + private UIPropertyTextField text; public CheckBoxDefinePane() { this.iniComoponents(); @@ -22,7 +22,7 @@ public class CheckBoxDefinePane extends AbstractDataModify { private void iniComoponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - text = new UITextField(8); + text = new UIPropertyTextField(); JPanel panel = new JPanel(new BorderLayout()); panel.add(text, BorderLayout.CENTER); panel.setBorder(BorderFactory.createEmptyBorder(0, 35, 0, 0)); diff --git a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java index 6a646996f3..ceb3d6476e 100644 --- a/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java @@ -5,7 +5,7 @@ import com.fr.design.constants.LayoutConstants; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -24,7 +24,7 @@ public abstract class FieldEditorDefinePane extends Abstr private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30; protected UICheckBox allowBlankCheckBox; // richer:错误信息,是所有控件共有的属性,所以放到这里来 - protected UITextField errorMsgTextField; + protected UIPropertyTextField errorMsgTextField; protected JPanel validatePane; public FieldEditorDefinePane() { @@ -33,7 +33,6 @@ public abstract class FieldEditorDefinePane extends Abstr protected void initComponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - initErrorMsgPane(); JPanel contentPane = this.setFirstContentPane(); if (contentPane != null) { UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 24, contentPane); @@ -45,9 +44,8 @@ public abstract class FieldEditorDefinePane extends Abstr protected void initErrorMsgPane() { // 错误信息 - errorMsgTextField = new UITextField(10); - - // richer:主要为了方便查看比较长的错误信息 + errorMsgTextField = new UIPropertyTextField(); +// // richer:主要为了方便查看比较长的错误信息 errorMsgTextField.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { @@ -98,7 +96,7 @@ public abstract class FieldEditorDefinePane extends Abstr protected void addValidatePane() { validatePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); final UILabel uiLabel = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Error", "FR-Designer_Tooltips"})); - errorMsgTextField = new UITextField(10); + initErrorMsgPane(); allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Null")); allowBlankCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT)); diff --git a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java index 7416f314fc..218743c498 100644 --- a/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java @@ -9,7 +9,7 @@ import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -28,7 +28,7 @@ public class IframeEditorDefinePane extends AbstractDataModify { private static final int P_W = 610; private static final int P_H = 580; - private UITextField srcTextField; + private UIPropertyTextField srcTextField; private ReportletParameterViewPane parameterViewPane; private UICheckBox horizontalCheck; private UICheckBox verticalCheck; @@ -61,7 +61,7 @@ public class IframeEditorDefinePane extends AbstractDataModify { java.awt.Component[][] coms = { {horizontalCheck, null}, {verticalCheck, null}, - {new UILabel(Inter.getLocText("Form-Url")), srcTextField = new UITextField()}, + {new UILabel(Inter.getLocText("Form-Url")), srcTextField = new UIPropertyTextField()}, {new UILabel(Inter.getLocText("FR-Designer_Parameters")), parameterViewPaneButton}}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}}; JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, 45, LayoutConstants.VGAP_LARGE); diff --git a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java index ad9c212169..1f38129974 100644 --- a/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java +++ b/designer/src/com/fr/design/widget/ui/WaterMarkDictPane.java @@ -1,7 +1,7 @@ package com.fr.design.widget.ui; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.WaterMark; @@ -13,14 +13,12 @@ import java.awt.event.KeyListener; public class WaterMarkDictPane extends JPanel { - private UITextField waterMarkTextField; + private UIPropertyTextField waterMarkTextField; public WaterMarkDictPane() { this.setLayout(new BorderLayout()); -// this.setBorder(BorderFactory.createEmptyBorder(2,2,2,2)); -// this.add(new UILabel(Inter.getLocText("WaterMark") + ":")); - waterMarkTextField = new UITextField(13); + waterMarkTextField = new UIPropertyTextField(); UILabel emptyLabel = new UILabel(); emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); diff --git a/designer_base/src/com/fr/design/extra/PluginOperateUtils.java b/designer_base/src/com/fr/design/extra/PluginOperateUtils.java index 8ab6b3bbea..257c3ef34d 100644 --- a/designer_base/src/com/fr/design/extra/PluginOperateUtils.java +++ b/designer_base/src/com/fr/design/extra/PluginOperateUtils.java @@ -292,7 +292,7 @@ public class PluginOperateUtils { pluginInfo.append(PluginUtils.getMessageByErrorCode(pluginTaskResult.errorCode())); continue; } - PluginMarker pluginMarker = pluginTask.getMarker(); + PluginMarker pluginMarker = pluginTask.getToMarker(); PluginContext pluginContext = PluginManager.getContext(pluginMarker); if (pluginContext != null) { pluginInfo.append(pluginContext.getName()).append(PluginUtils.getMessageByErrorCode(pluginTaskResult.errorCode())); diff --git a/designer_base/src/com/fr/design/extra/PluginUtils.java b/designer_base/src/com/fr/design/extra/PluginUtils.java index 049ab28f98..186b466ddd 100644 --- a/designer_base/src/com/fr/design/extra/PluginUtils.java +++ b/designer_base/src/com/fr/design/extra/PluginUtils.java @@ -78,8 +78,8 @@ public class PluginUtils { return jsonArray.toString(); } - public static void downloadShopScripts(String id, String username, String password, Process p) throws Exception { - HttpClient httpClient = new HttpClient(getDownloadPath(id, username, password)); + public static void downloadShopScripts(String id, Process p) throws Exception { + HttpClient httpClient = new HttpClient(getDownloadPath(id)); if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { int totalSize = httpClient.getContentLength(); InputStream reader = httpClient.getResponseStream(); @@ -104,11 +104,9 @@ public class PluginUtils { } } - private static String getDownloadPath(String id, String username, String password) throws Exception { + private static String getDownloadPath(String id) throws Exception { HashMap map = new HashMap(); map.put("id", id); - map.put("username", username); - map.put("password", password); HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("shop.plugin.scripts")); httpClient.asGet(); String resText = httpClient.getResponseText(); diff --git a/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java b/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java index 84ecb10c38..8f5821d8f2 100644 --- a/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java +++ b/designer_base/src/com/fr/design/extra/WebViewDlgHelper.java @@ -1,7 +1,6 @@ package com.fr.design.extra; import com.fr.base.FRContext; -import com.fr.design.DesignerEnvManager; import com.fr.design.RestartHelper; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.UIDialog; @@ -171,10 +170,8 @@ public class WebViewDlgHelper { new SwingWorker() { @Override protected Boolean doInBackground() throws Exception { - String username = DesignerEnvManager.getEnvManager().getBBSName(); - String password = DesignerEnvManager.getEnvManager().getBBSPassword(); try { - PluginUtils.downloadShopScripts(scriptsId, username, password, new Process() { + PluginUtils.downloadShopScripts(scriptsId, new Process() { @Override public void process(Double integer) { } @@ -198,19 +195,7 @@ public class WebViewDlgHelper { IOUtils.unzip(new File(StableUtils.pathJoin(PluginConstants.DOWNLOAD_PATH, PluginConstants.TEMP_FILE)), installHome); copyMainFile(StableUtils.pathJoin(installHome, "index.html"), StableUtils.pathJoin(installHome, relativePath)); // TODO: 2017/4/17 删除之前存放在安装目录下的script - int rv = JOptionPane.showOptionDialog( - null, - Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), - Inter.getLocText("FR-Designer-Plugin_Warning"), - JOptionPane.YES_NO_OPTION, - JOptionPane.INFORMATION_MESSAGE, - null, - new String[]{Inter.getLocText("FR-Designer-Basic_Restart_Designer"), Inter.getLocText("FR-Designer-Basic_Restart_Designer_Later")}, - null - ); - if (rv == JOptionPane.OK_OPTION) { - RestartHelper.restart(); - } + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer-Plugin_Shop_Installed"), Inter.getLocText("FR-Designer_Tooltips"), JOptionPane.INFORMATION_MESSAGE); } } catch (InterruptedException | ExecutionException e) { FRContext.getLogger().error(e.getMessage(), e); diff --git a/designer_base/src/com/fr/design/gui/itextfield/UIPropertyTextField.java b/designer_base/src/com/fr/design/gui/itextfield/UIPropertyTextField.java new file mode 100644 index 0000000000..8a949d4a14 --- /dev/null +++ b/designer_base/src/com/fr/design/gui/itextfield/UIPropertyTextField.java @@ -0,0 +1,47 @@ +package com.fr.design.gui.itextfield; + +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import javax.swing.text.Document; + + +/** + * Created by ibm on 2017/8/16. + */ +public class UIPropertyTextField extends UITextField{ + + public UIPropertyTextField() { + super(); + } + + public UIPropertyTextField(int columns) { + super(columns); + } + + public UIPropertyTextField(String text, int columns) { + super(text, columns); + } + + public UIPropertyTextField(String text) { + super(text); + } + + public UIPropertyTextField(Document doc, String text, int columns) { + super(doc, text, columns); + } + + protected void initListener() { + if (shouldResponseChangeListener()) { + addFocusListener(new FocusListener() { + @Override + public void focusGained(FocusEvent e) { + } + + @Override + public void focusLost(FocusEvent e) { + attributeChange(); + } + }); + } + } +} diff --git a/designer_base/src/com/fr/design/gui/itextfield/UITextField.java b/designer_base/src/com/fr/design/gui/itextfield/UITextField.java index 71e6366baf..7df91335c2 100644 --- a/designer_base/src/com/fr/design/gui/itextfield/UITextField.java +++ b/designer_base/src/com/fr/design/gui/itextfield/UITextField.java @@ -13,8 +13,6 @@ import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.text.Document; import java.awt.*; -import java.awt.event.FocusEvent; -import java.awt.event.FocusListener; /** * @author Jerry @@ -61,13 +59,19 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs protected void initListener() { if (shouldResponseChangeListener()) { - addFocusListener(new FocusListener() { + getDocument().addDocumentListener(new DocumentListener() { @Override - public void focusGained(FocusEvent e) { + public void insertUpdate(DocumentEvent e) { + attributeChange(); + } + + @Override + public void removeUpdate(DocumentEvent e) { + attributeChange(); } @Override - public void focusLost(FocusEvent e) { + public void changedUpdate(DocumentEvent e) { attributeChange(); } }); diff --git a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java index 8d577d3fe2..d24e79c5ac 100644 --- a/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java @@ -326,9 +326,11 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope public void fireCreatorModified(DesignerEvent evt) { if (evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED || evt.getCreatorEventID() == DesignerEvent.CREATOR_DELETED - || evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED || evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED) { formWidgetCardPane.populate(); + }else if(evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED){ + formWidgetCardPane = new FormWidgetCardPane(designer); + formWidgetCardPane.populate(); } } diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 37593b88d4..425d9e5333 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe.widget.ui; import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.creator.*; +import com.fr.design.dialog.BasicScrollPane; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.frpane.AttributeChangeListener; @@ -46,7 +47,6 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { if (widgetBoundPane != null) { attriCardPane.add(widgetBoundPane, BorderLayout.CENTER); } - } public XLayoutContainer getParent(XCreator source) { @@ -102,9 +102,27 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { } private void initComponents() { - this.setLayout(FRGUIPaneFactory.createBorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + BasicScrollPane basicScrollPane = new BasicScrollPane() { + @Override + protected JPanel createContentPane() { + return jPanel; + } + + @Override + public void populateBean(Object ob) { + + } + + @Override + protected String title4PopupWindow() { + return null; + } + }; + this.add(basicScrollPane, BorderLayout.CENTER); + if (xCreator.supportSetVisibleOrEnable()) { widgetPropertyPane = new FormBasicWidgetPropertyPane(); } else { @@ -113,11 +131,11 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { UIExpandablePane uiExpandablePane = new UIExpandablePane("基本", 280, 20, widgetPropertyPane); - this.add(uiExpandablePane, BorderLayout.NORTH); + jPanel.add(uiExpandablePane, BorderLayout.NORTH); attriCardPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); - this.add(attriCardPane, BorderLayout.CENTER); + jPanel.add(attriCardPane, BorderLayout.CENTER); this.listener2 = new AttributeChangeListener() { @Override diff --git a/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java index 4ecf07da5f..588828255a 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/ButtonDefinePane.java @@ -3,7 +3,7 @@ package com.fr.design.widget.ui.designer; import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -17,8 +17,8 @@ import javax.swing.*; import java.awt.*; public abstract class ButtonDefinePane extends AbstractDataModify { - private UITextField hotkeysTextField; - private UITextField buttonNameTextField; + private UIPropertyTextField hotkeysTextField; + private UIPropertyTextField buttonNameTextField; private AccessibleIconEditor iconPane; @@ -35,8 +35,8 @@ public abstract class ButtonDefinePane extends AbstractDataMod double columnSize[] = {p, f}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}; iconPane = new AccessibleIconEditor(); - hotkeysTextField = new UITextField(); - buttonNameTextField = new UITextField(); + hotkeysTextField = new UIPropertyTextField(); + buttonNameTextField = new UIPropertyTextField(); Component[] backgroundCompPane = createBackgroundComp(); Component[] frFont = createFontPane(); UILabel backgroundLabel = new UILabel(Inter.getLocText("FR-Designer_Background")); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java index 6f60be68a1..18f0e0cedc 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/CheckBoxDefinePane.java @@ -4,7 +4,7 @@ import com.fr.design.designer.creator.XCreator; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -16,7 +16,7 @@ import javax.swing.*; import java.awt.*; public class CheckBoxDefinePane extends AbstractDataModify { - private UITextField text; + private UIPropertyTextField text; private UISpinner fontSizePane; private FormWidgetValuePane formWidgetValuePane; @@ -27,7 +27,7 @@ public class CheckBoxDefinePane extends AbstractDataModify { private void iniComoponents() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); - text = new UITextField(); + text = new UIPropertyTextField(); fontSizePane = new UISpinner(0, 20, 1, 0); formWidgetValuePane = new FormWidgetValuePane(creator.toData(), false); double f = TableLayout.FILL; diff --git a/designer_form/src/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java index 829736a651..08f73236a5 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/ComboBoxDefinePane.java @@ -4,7 +4,7 @@ import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.form.ui.ComboBox; import com.fr.general.Inter; @@ -13,7 +13,7 @@ import java.awt.*; public class ComboBoxDefinePane extends DictEditorDefinePane { private UICheckBox removeRepeatCheckBox; - private UITextField waterMarkField; + private UIPropertyTextField waterMarkField; public ComboBoxDefinePane(XCreator xCreator) { super(xCreator); @@ -26,7 +26,7 @@ public class ComboBoxDefinePane extends DictEditorDefinePane { } public Component[] createWaterMarkPane() { - waterMarkField = new UITextField(); + waterMarkField = new UIPropertyTextField(); return new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), waterMarkField}; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/ComboCheckBoxDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/ComboCheckBoxDefinePane.java index baa732557e..7a3ed0f224 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/ComboCheckBoxDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/ComboCheckBoxDefinePane.java @@ -3,10 +3,9 @@ package com.fr.design.widget.ui.designer; import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.ComboCheckBox; @@ -18,7 +17,7 @@ import java.awt.*; public class ComboCheckBoxDefinePane extends DictEditorDefinePane { private UICheckBox supportTagCheckBox; private UIButtonGroup returnType; - private UITextField waterMarkDictPane; + private UIPropertyTextField waterMarkDictPane; private UICheckBox removeRepeatCheckBox; public ComboCheckBoxDefinePane(XCreator xCreator) { @@ -32,7 +31,7 @@ public class ComboCheckBoxDefinePane extends DictEditorDefinePane } public Component[] createWaterMarkPane() { - waterMarkDictPane = new UITextField(); + waterMarkDictPane = new UIPropertyTextField(); return new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), waterMarkDictPane}; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java b/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java index 9328bc1b62..96b4cc46a6 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/CustomWritableRepeatEditorPane.java @@ -3,7 +3,6 @@ package com.fr.design.widget.ui.designer; import com.fr.base.GraphHelper; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; diff --git a/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java index 2bf1df46ec..ffc45d2664 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/FieldEditorDefinePane.java @@ -1,12 +1,11 @@ package com.fr.design.widget.ui.designer; -import com.fr.base.GraphHelper; import com.fr.design.designer.creator.*; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -14,16 +13,16 @@ import com.fr.form.ui.FieldEditor; import com.fr.general.Inter; import javax.swing.*; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; import java.awt.*; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; public abstract class FieldEditorDefinePane extends AbstractDataModify { - private static final int ALLOW_BLANK_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("FR-Designer_Allow_Null") + 30; - private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30; protected UICheckBox allowBlankCheckBox; // richer:错误信息,是所有控件共有的属性,所以放到这里来 - protected UITextField errorMsgTextField; + protected UIPropertyTextField errorMsgTextField; protected JPanel validatePane; protected UISpinner fontSizePane; @@ -40,9 +39,8 @@ public abstract class FieldEditorDefinePane extends Abstr this.setLayout(FRGUIPaneFactory.createBorderLayout()); allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Null")); allowBlankCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); -// allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT)); fontSizePane = new UISpinner(0, 20, 1, 0); - errorMsgTextField = new UITextField(); + errorMsgTextField = new UIPropertyTextField(); JPanel contentPane = this.setFirstContentPane(); if (contentPane != null) { UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Advanced"), 280, 20, contentPane); @@ -71,6 +69,27 @@ public abstract class FieldEditorDefinePane extends Abstr return e; } + protected void initErrorMsgPane() { + // 错误信息 + errorMsgTextField = new UIPropertyTextField(); +// // richer:主要为了方便查看比较长的错误信息 + errorMsgTextField.getDocument().addDocumentListener(new DocumentListener() { + + public void changedUpdate(DocumentEvent e) { + errorMsgTextField.setToolTipText(errorMsgTextField.getText()); + } + + public void insertUpdate(DocumentEvent e) { + errorMsgTextField.setToolTipText(errorMsgTextField.getText()); + } + + public void removeUpdate(DocumentEvent e) { + errorMsgTextField.setToolTipText(errorMsgTextField.getText()); + } + }); + + } + protected abstract T updateSubFieldEditorBean(); @@ -83,6 +102,7 @@ public abstract class FieldEditorDefinePane extends Abstr } protected void addValidatePane() { + initErrorMsgPane(); validatePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); final UILabel uiLabel = new UILabel(Inter.getLocText("FR-Designer_Widget_Error_Tip")); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/IframeEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/IframeEditorDefinePane.java index fb7399ef88..cbda1a2e3a 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/IframeEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/IframeEditorDefinePane.java @@ -5,7 +5,7 @@ import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -18,7 +18,7 @@ import java.awt.*; import java.util.List; public class IframeEditorDefinePane extends AbstractDataModify { - private UITextField srcTextField; + private UIPropertyTextField srcTextField; private ReportletParameterViewPane parameterViewPane; private UICheckBox horizontalCheck; private UICheckBox verticalCheck; @@ -44,7 +44,7 @@ public class IframeEditorDefinePane extends AbstractDataModify { Component[][] coms = { { horizontalCheck, null }, { verticalCheck, null }, - { new UILabel(Inter.getLocText("Form-Url") + ":"), srcTextField = new UITextField() }, + { new UILabel(Inter.getLocText("Form-Url") + ":"), srcTextField = new UIPropertyTextField() }, { new UILabel(Inter.getLocText("Parameter") + ":"), parameterViewPane = new ReportletParameterViewPane() } }; int[][] rowCount = {{1, 1},{1, 1},{1, 1}, {1, 1}}; JPanel panel = TableLayoutHelper.createGapTableLayoutPane(coms, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, 5); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java index 395ded7d17..46f62dac10 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/TextFieldEditorDefinePane.java @@ -3,7 +3,7 @@ package com.fr.design.widget.ui.designer; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.frpane.RegPane; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -18,7 +18,7 @@ import java.awt.event.KeyEvent; public class TextFieldEditorDefinePane extends FieldEditorDefinePane { protected RegPane regPane; - private UITextField waterMarkDictPane; + private UIPropertyTextField waterMarkDictPane; FormWidgetValuePane formWidgetValuePane; public TextFieldEditorDefinePane(XCreator xCreator) { @@ -47,7 +47,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane } }; regPane.addPhoneRegListener(pl); - waterMarkDictPane = new UITextField(13); + waterMarkDictPane = new UIPropertyTextField(); waterMarkDictPane.addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { regPane.removePhoneRegListener(pl); diff --git a/designer_form/src/com/fr/design/widget/ui/designer/TreeComboBoxEditorDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/TreeComboBoxEditorDefinePane.java index baabdac70e..68cac10377 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/TreeComboBoxEditorDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/TreeComboBoxEditorDefinePane.java @@ -3,7 +3,7 @@ package com.fr.design.widget.ui.designer; import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.creator.XCreator; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.form.ui.TreeEditor; import com.fr.general.Inter; @@ -11,14 +11,14 @@ import java.awt.*; public class TreeComboBoxEditorDefinePane extends TreeEditorDefinePane { - protected UITextField waterMarkDictPane; + protected UIPropertyTextField waterMarkDictPane; public TreeComboBoxEditorDefinePane(XCreator xCreator) { super(xCreator); } public Component[] createWaterMarkPane(){ - waterMarkDictPane = new UITextField(); + waterMarkDictPane = new UIPropertyTextField(); return new Component[]{new UILabel(Inter.getLocText("FR-Designer_WaterMark")), waterMarkDictPane}; } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/WaterMarkDictPane.java b/designer_form/src/com/fr/design/widget/ui/designer/WaterMarkDictPane.java index c0ec063af5..75d6d7d17b 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/WaterMarkDictPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/WaterMarkDictPane.java @@ -1,6 +1,6 @@ package com.fr.design.widget.ui.designer; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.form.ui.WaterMark; @@ -8,12 +8,12 @@ import javax.swing.*; public class WaterMarkDictPane extends JPanel{ - private UITextField waterMarkTextField; + private UIPropertyTextField waterMarkTextField; public WaterMarkDictPane() { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); - waterMarkTextField = new UITextField(); + waterMarkTextField = new UIPropertyTextField(); this.add(waterMarkTextField); } diff --git a/designer_form/src/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java index 99cc2b1437..e0df39eb1b 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java @@ -39,7 +39,7 @@ public abstract class ButtonGroupDefinePane extends Field double p = TableLayout.PREFERRED; Component[][] components = new Component[][]{ new Component[]{new UILabel(Inter.getLocText("FR-Designer-Estate_Widget_Value")), formWidgetValuePane}, - new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), new UITextField()}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictionaryEditor}, new Component[]{new UILabel(Inter.getLocText("FR-Designer_FRFont")), fontSizePane}, new Component[]{buttonGroupDictPane, null} }; diff --git a/designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java b/designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java index d7721e0b45..32d840f72c 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/component/PaddingBoundPane.java @@ -3,7 +3,6 @@ package com.fr.design.widget.ui.designer.component; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; -import com.fr.design.gui.itextfield.UITextField; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; From fa21593fcc68723a6d941f4e901ba3d1b46242ee Mon Sep 17 00:00:00 2001 From: MoMeak Date: Fri, 18 Aug 2017 14:50:38 +0800 Subject: [PATCH 02/33] =?UTF-8?q?REPORT-3895=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E6=B8=90=E5=8F=98=E8=89=B2=E5=B7=A6?= =?UTF-8?q?=E8=BE=B9=E7=AE=AD=E5=A4=B4=E4=B8=8D=E6=98=93=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=EF=BC=8C=E5=8F=B3=E8=BE=B9=E7=AE=AD=E5=A4=B4=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=A6=82=E9=99=84=E4=BB=B6=E5=9B=BE=E7=89=87=20REPORT?= =?UTF-8?q?-3896=20[9.0=E4=B8=80=E8=BD=AE=E5=9B=9E=E5=BD=92]=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=8D=95=E5=85=83=E6=A0=BC=E8=83=8C=E6=99=AF=E5=9B=BE?= =?UTF-8?q?=E6=A1=88=E7=9A=84=E5=89=8D=E6=99=AF=E5=92=8C=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=8C=89=E9=92=AE=E5=8F=AA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=80=E5=8D=8A=E5=A6=82=E9=99=84=E4=BB=B6=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cell/settingpane/CellOtherSetPane.java | 2 - .../GradientBackgroundQuickPane.java | 4 +- .../ImageBackgroundQuickPane.java | 7 +- .../PatternBackgroundQuickPane.java | 372 +++++++++--------- .../TextureBackgroundQuickPane.java | 1 - 5 files changed, 196 insertions(+), 190 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 411ef87a92..751acbf464 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -248,8 +248,6 @@ public class CellOtherSetPane extends AbstractCellAttrPane { } } }); - tooltipTextField = new UITextField(); - tooltipTextField.getUI(); return fileNamePane; } diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java index 08ef9e61c4..97ba9cbe7c 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java @@ -22,7 +22,7 @@ import java.awt.*; public class GradientBackgroundQuickPane extends BackgroundQuickPane { private static final long serialVersionUID = -6854603990673031897L; - private static final int DEFAULT_GRADIENT_WIDTH = 185; + private static final int DEFAULT_GRADIENT_WIDTH = 150 ; private int gradientBarWidth = DEFAULT_GRADIENT_WIDTH; @@ -52,7 +52,7 @@ public class GradientBackgroundQuickPane extends BackgroundQuickPane { Component[][] components = new Component[][]{ new Component[]{gradientBar, null}, - new Component[]{new UILabel(Inter.getLocText("Gradient-Direction") + ":"), directionPane} + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Gradient_Direction")), directionPane} }; JPanel Gradient = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); this.setLayout(new BorderLayout()); diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java index 114b704c05..4dafe476a4 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java @@ -61,17 +61,14 @@ public class ImageBackgroundQuickPane extends BackgroundQuickPane { contentPane.add(southPane, BorderLayout.NORTH); this.add(contentPane, BorderLayout.CENTER); - JPanel selectFilePane = new JPanel(new GridLayout(0, 2)); UIButton selectPictureButton = new UIButton(Inter.getLocText("Image-Select_Picture")); - selectFilePane.add(new JPanel()); - selectFilePane.add(selectPictureButton); selectPictureButton.addActionListener(selectPictureActionListener); if(hasImageLayout){ - southPane.add(imageLayoutPane, BorderLayout.CENTER); + southPane.add(imageLayoutPane, BorderLayout.SOUTH); } - southPane.add(selectFilePane, BorderLayout.SOUTH); + southPane.add(selectPictureButton, BorderLayout.CENTER); imageLayoutPane.addChangeListener(new ChangeListener() { diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java index 16b294955c..86a96a2cbf 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java @@ -2,14 +2,17 @@ package com.fr.design.mainframe.backgroundpane; import com.fr.base.GraphHelper; import com.fr.base.background.PatternBackground; -import com.fr.design.constants.UIConstants; import com.fr.design.border.UIRoundedBorder; +import com.fr.design.constants.LayoutConstants; +import com.fr.design.constants.UIConstants; import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.style.color.ColorSelectBox; import com.fr.general.Background; import com.fr.general.Inter; -import com.fr.design.style.color.ColorSelectBox; import javax.swing.*; import javax.swing.event.ChangeEvent; @@ -25,182 +28,191 @@ import java.awt.geom.Rectangle2D; */ public class PatternBackgroundQuickPane extends BackgroundQuickPane { - private int patternIndex = 0; // pattern setIndex. - private final static int DEFAULT_DIM_HEIGHT = 190; - private ColorSelectBox foregroundColorPane; - private ColorSelectBox backgroundColorPane; - private PatternButton[] patternButtonArray; - - public PatternBackgroundQuickPane() { - this.setLayout(new BorderLayout(0, 4)); - JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); - this.add(contentPane, BorderLayout.NORTH); - contentPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5)); - JPanel typePane2 = new JPanel(); - contentPane.add(typePane2); - typePane2.setLayout(new GridLayout(0, 8, 1, 1)); - typePane2.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8)); - ButtonGroup patternButtonGroup = new ButtonGroup(); - patternButtonArray = new PatternButton[PatternBackground.PATTERN_COUNT]; - for (int i = 0; i < PatternBackground.PATTERN_COUNT; i++) { - patternButtonArray[i] = new PatternButton(i); - patternButtonGroup.add(patternButtonArray[i]); - typePane2.add(patternButtonArray[i]); - } - JPanel colorPane = new JPanel(new GridLayout(0, 2)); - foregroundColorPane = new ColorSelectBox(70); - backgroundColorPane = new ColorSelectBox(70); - colorPane.add(this.createLabelColorPane(Inter.getLocText("FR-Designer_Foreground") + ":", foregroundColorPane)); - colorPane.add(this.createLabelColorPane(Inter.getLocText("FR-Designer_Background") + ":", backgroundColorPane)); - this.add(colorPane, BorderLayout.CENTER); - foregroundColorPane.addSelectChangeListener(colorChangeListener); - backgroundColorPane.addSelectChangeListener(colorChangeListener); - } - - @Override - public Dimension getPreferredSize() { - Dimension dim = super.getPreferredSize(); - dim.height = DEFAULT_DIM_HEIGHT; - return dim; - } - - private JPanel createLabelColorPane(String text, JComponent colorPane) { - JPanel labelColorPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); - labelColorPane.add(new UILabel(text)); - labelColorPane.add(colorPane); - - return labelColorPane; - } - - public void populateBean(Background background) { - PatternBackground patternBackground = (PatternBackground) background; - int patternIndex = patternBackground.getPatternIndex(); - - if (patternIndex >= 0 && patternIndex < this.patternButtonArray.length) { - this.patternButtonArray[patternIndex].setSelected(true); - this.patternIndex = patternIndex; - } else { - this.patternIndex = 0; - } - - foregroundColorPane.setSelectObject(patternBackground.getForeground()); - backgroundColorPane.setSelectObject(patternBackground.getBackground()); - } - - public Background updateBean() { - return new PatternBackground(patternIndex, foregroundColorPane.getSelectObject(), backgroundColorPane.getSelectObject()); - } - - - /** - * 给组件登记一个观察者监听事件 - * - * @param listener 观察者监听事件 - */ - public void registerChangeListener(final UIObserverListener listener) { - foregroundColorPane.addSelectChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - listener.doChange(); - } - }); - backgroundColorPane.addSelectChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - listener.doChange(); - } - }); - for (int i = 0, count = patternButtonArray.length; i < count; i ++) { - patternButtonArray[i].addChangeListener(new ChangeListener() { - public void stateChanged(ChangeEvent e) { - listener.doChange(); - } - }); - } - } - - - // Foreground or Background changed. - ChangeListener colorChangeListener = new ChangeListener() { - - public void stateChanged(ChangeEvent e) { - for (int i = 0; i < patternButtonArray.length; i++) { - patternButtonArray[i].setPatternForeground(foregroundColorPane.getSelectObject()); - patternButtonArray[i].setPatternBackground(backgroundColorPane.getSelectObject()); - } - - PatternBackgroundQuickPane.this.repaint();// repaint - } - }; - - /** - * Pattern type button. - */ - class PatternButton extends JToggleButton implements ActionListener { - - public PatternButton(int pIndex) { - this.pIndex = pIndex; - this.addActionListener(this); - - this.setCursor(new Cursor(Cursor.HAND_CURSOR)); - this.setBorder(null); - this.patternBackground = new PatternBackground(this.pIndex, Color.lightGray, Color.black); - } - - public void paintComponent(Graphics g) { - Graphics2D g2d = (Graphics2D) g; - - Dimension d = getSize(); - this.patternBackground.paint(g2d, new Rectangle2D.Double(0, 0, d.width - 1, d.height - 1)); - - if (this.pIndex == patternIndex) {// it's selected. - g2d.setPaint(UIConstants.LINE_COLOR); - GraphHelper.draw(g2d, new Rectangle2D.Double(0, 0, d.width - 1, d.height - 1)); - } - } - - public Dimension getPreferredSize() { - return new Dimension(super.getPreferredSize().width, 20); - } - - public void setPatternForeground(Color foreground) { - this.patternBackground.setForeground(foreground); - } - - public void setPatternBackground(Color background) { - this.patternBackground.setBackground(background); - } - - /** - * set Pattern setIndex. - */ - public void actionPerformed(ActionEvent evt) { - PatternBackgroundQuickPane.this.patternIndex = pIndex; - - fireChagneListener(); - PatternBackgroundQuickPane.this.repaint();// repaint - } - - public void addChangeListener(ChangeListener changeListener) { - this.changeListener = changeListener; - } - - private void fireChagneListener() { - if (this.changeListener != null) { - ChangeEvent evt = new ChangeEvent(this); - this.changeListener.stateChanged(evt); - } - } - - private int pIndex = 0; - private PatternBackground patternBackground; - } - - @Override - public boolean accept(Background background) { - return background instanceof PatternBackground; - } - - @Override - public String title4PopupWindow() { - return Inter.getLocText("FR-Designer_Background-Pattern"); - } + private int patternIndex = 0; // pattern setIndex. + private final static int DEFAULT_DIM_HEIGHT = 210; + private ColorSelectBox foregroundColorPane; + private ColorSelectBox backgroundColorPane; + private PatternButton[] patternButtonArray; + + public PatternBackgroundQuickPane() { + this.setLayout(new BorderLayout(0, 4)); + JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); + this.add(contentPane, BorderLayout.NORTH); + contentPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5)); + JPanel typePane2 = new JPanel(); + contentPane.add(typePane2); + typePane2.setLayout(new GridLayout(0, 8, 1, 1)); + typePane2.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8)); + ButtonGroup patternButtonGroup = new ButtonGroup(); + patternButtonArray = new PatternButton[PatternBackground.PATTERN_COUNT]; + for (int i = 0; i < PatternBackground.PATTERN_COUNT; i++) { + patternButtonArray[i] = new PatternButton(i); + patternButtonGroup.add(patternButtonArray[i]); + typePane2.add(patternButtonArray[i]); + } + foregroundColorPane = new ColorSelectBox(60); + backgroundColorPane = new ColorSelectBox(60); + + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{null, null}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Foreground"), UILabel.LEFT), foregroundColorPane}, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_Background"), UILabel.LEFT), backgroundColorPane}, + }; + double[] rowSize = {p, p, p}; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; + JPanel colorPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, LayoutConstants.VGAP_LARGE); + this.add(colorPane, BorderLayout.CENTER); + foregroundColorPane.addSelectChangeListener(colorChangeListener); + backgroundColorPane.addSelectChangeListener(colorChangeListener); + } + + @Override + public Dimension getPreferredSize() { + Dimension dim = super.getPreferredSize(); + dim.height = DEFAULT_DIM_HEIGHT; + return dim; + } + + private JPanel createLabelColorPane(String text, JComponent colorPane) { + JPanel labelColorPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); + labelColorPane.add(new UILabel(text)); + labelColorPane.add(colorPane); + + return labelColorPane; + } + + public void populateBean(Background background) { + PatternBackground patternBackground = (PatternBackground) background; + int patternIndex = patternBackground.getPatternIndex(); + + if (patternIndex >= 0 && patternIndex < this.patternButtonArray.length) { + this.patternButtonArray[patternIndex].setSelected(true); + this.patternIndex = patternIndex; + } else { + this.patternIndex = 0; + } + + foregroundColorPane.setSelectObject(patternBackground.getForeground()); + backgroundColorPane.setSelectObject(patternBackground.getBackground()); + } + + public Background updateBean() { + return new PatternBackground(patternIndex, foregroundColorPane.getSelectObject(), backgroundColorPane.getSelectObject()); + } + + + /** + * 给组件登记一个观察者监听事件 + * + * @param listener 观察者监听事件 + */ + public void registerChangeListener(final UIObserverListener listener) { + foregroundColorPane.addSelectChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + backgroundColorPane.addSelectChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + for (int i = 0, count = patternButtonArray.length; i < count; i++) { + patternButtonArray[i].addChangeListener(new ChangeListener() { + public void stateChanged(ChangeEvent e) { + listener.doChange(); + } + }); + } + } + + + // Foreground or Background changed. + ChangeListener colorChangeListener = new ChangeListener() { + + public void stateChanged(ChangeEvent e) { + for (int i = 0; i < patternButtonArray.length; i++) { + patternButtonArray[i].setPatternForeground(foregroundColorPane.getSelectObject()); + patternButtonArray[i].setPatternBackground(backgroundColorPane.getSelectObject()); + } + + PatternBackgroundQuickPane.this.repaint();// repaint + } + }; + + /** + * Pattern type button. + */ + class PatternButton extends JToggleButton implements ActionListener { + + public PatternButton(int pIndex) { + this.pIndex = pIndex; + this.addActionListener(this); + + this.setCursor(new Cursor(Cursor.HAND_CURSOR)); + this.setBorder(null); + this.patternBackground = new PatternBackground(this.pIndex, Color.lightGray, Color.black); + } + + public void paintComponent(Graphics g) { + Graphics2D g2d = (Graphics2D) g; + + Dimension d = getSize(); + this.patternBackground.paint(g2d, new Rectangle2D.Double(0, 0, d.width - 1, d.height - 1)); + + if (this.pIndex == patternIndex) {// it's selected. + g2d.setPaint(UIConstants.LINE_COLOR); + GraphHelper.draw(g2d, new Rectangle2D.Double(0, 0, d.width - 1, d.height - 1)); + } + } + + public Dimension getPreferredSize() { + return new Dimension(super.getPreferredSize().width, 20); + } + + public void setPatternForeground(Color foreground) { + this.patternBackground.setForeground(foreground); + } + + public void setPatternBackground(Color background) { + this.patternBackground.setBackground(background); + } + + /** + * set Pattern setIndex. + */ + public void actionPerformed(ActionEvent evt) { + PatternBackgroundQuickPane.this.patternIndex = pIndex; + + fireChagneListener(); + PatternBackgroundQuickPane.this.repaint();// repaint + } + + public void addChangeListener(ChangeListener changeListener) { + this.changeListener = changeListener; + } + + private void fireChagneListener() { + if (this.changeListener != null) { + ChangeEvent evt = new ChangeEvent(this); + this.changeListener.stateChanged(evt); + } + } + + private int pIndex = 0; + private PatternBackground patternBackground; + } + + @Override + public boolean accept(Background background) { + return background instanceof PatternBackground; + } + + @Override + public String title4PopupWindow() { + return Inter.getLocText("FR-Designer_Background-Pattern"); + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java b/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java index dcd386343e..33e09057b6 100644 --- a/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java +++ b/designer_base/src/com/fr/design/mainframe/backgroundpane/TextureBackgroundQuickPane.java @@ -33,7 +33,6 @@ public class TextureBackgroundQuickPane extends BackgroundQuickPane { this.add(borderPane, BorderLayout.NORTH); contentPane.setLayout(new GridLayout(0, 8, 1, 1)); contentPane.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8)); - borderPane.setPreferredSize(new Dimension(0, 145)); ButtonGroup patternButtonGroup = new ButtonGroup(); textureButtonArray = new TextureButton[EMBED_TEXTURE_PAINT_ARRAY.length]; for (int i = 0; i < EMBED_TEXTURE_PAINT_ARRAY.length; i++) { From 64f3b4d8c2fa9a706365d95fce1ec60679d25fd0 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Fri, 18 Aug 2017 15:14:02 +0800 Subject: [PATCH 03/33] =?UTF-8?q?rollback,=E8=BF=99=E4=B8=AAbug=E7=9A=84pr?= =?UTF-8?q?=E7=BB=99kerry=E9=82=A3=E8=BE=B9=E4=B8=80=E8=B5=B7=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/cell/settingpane/CellOtherSetPane.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 751acbf464..411ef87a92 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -248,6 +248,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane { } } }); + tooltipTextField = new UITextField(); + tooltipTextField.getUI(); return fileNamePane; } From 038d141b069769b37bcc899bd07dd73ac41a88dd Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 18 Aug 2017 15:18:51 +0800 Subject: [PATCH 04/33] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/cell/settingpane/CellOtherSetPane.java | 12 +++++------- .../mainframe/widget/ui/FormWidgetCardPane.java | 3 ++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 411ef87a92..e8d82c5102 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -10,7 +10,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.gui.itextfield.UIPropertyTextField; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.JTemplate; @@ -47,9 +47,9 @@ public class CellOtherSetPane extends AbstractCellAttrPane { private UIComboBox showContent; - private UITextField tooltipTextField; + private UIPropertyTextField tooltipTextField; - private UITextField fileNameTextField; + private UIPropertyTextField fileNameTextField; // 分页 private UICheckBox pageBeforeRowCheckBox; @@ -228,8 +228,8 @@ public class CellOtherSetPane extends AbstractCellAttrPane { final JPanel fileNamePane = new JPanel(fileNameLayout); JPanel fileNameCCPane = new JPanel(new BorderLayout(4, 0)); fileNameCCPane.add(new UILabel(Inter.getLocText("FR-Designer_File_Name_For_Download")), BorderLayout.WEST); - fileNameTextField = new UITextField(); - tooltipTextField = new UITextField(); + fileNameTextField = new UIPropertyTextField(); + tooltipTextField = new UIPropertyTextField(); tooltipTextField.getUI(); fileNamePane.add(new JPanel(), "none"); fileNamePane.add(fileNameCCPane, "content"); @@ -248,8 +248,6 @@ public class CellOtherSetPane extends AbstractCellAttrPane { } } }); - tooltipTextField = new UITextField(); - tooltipTextField.getUI(); return fileNamePane; } diff --git a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java index 425d9e5333..2a8e1de2b6 100644 --- a/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java +++ b/designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java @@ -18,6 +18,7 @@ import com.fr.form.ui.Widget; import com.fr.form.ui.container.WScaleLayout; import com.fr.form.ui.container.WTitleLayout; import com.fr.form.ui.widget.CRBoundsWidget; +import com.fr.general.Inter; import javax.swing.*; import java.awt.*; @@ -129,7 +130,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane { widgetPropertyPane = new FormBasicPropertyPane(); } - UIExpandablePane uiExpandablePane = new UIExpandablePane("基本", 280, 20, widgetPropertyPane); + UIExpandablePane uiExpandablePane = new UIExpandablePane(Inter.getLocText("FR-Designer_Basic"), 280, 20, widgetPropertyPane); jPanel.add(uiExpandablePane, BorderLayout.NORTH); From 4dd959fb1900ab5b2265506d1fe2ade79f31b9a4 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Sun, 20 Aug 2017 21:58:11 +0800 Subject: [PATCH 05/33] =?UTF-8?q?9.0=E6=96=B0=E5=9B=BE=E8=A1=A8=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=BF=AE=E6=94=B9=20=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=85=8D=E7=BD=AE=E9=9D=A2=E6=9D=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/gui/data/ChartDataFilterPane.java | 172 ++++++++++-------- .../chart/gui/data/DatabaseTableDataPane.java | 2 + .../chart/gui/data/NormalChartDataPane.java | 12 +- .../chart/gui/data/TableDataPane.java | 11 +- .../report/AbstractReportDataContentPane.java | 1 + .../BubblePlotReportDataContentPane.java | 9 +- ...goryPlotMoreCateReportDataContentPane.java | 12 +- .../CategoryPlotReportDataContentPane.java | 15 +- .../MeterPlotReportDataContentPane.java | 17 +- .../table/AbstractTableDataContentPane.java | 18 +- ...egoryPlotMoreCateTableDataContentPane.java | 14 +- .../CategoryPlotTableDataContentPane.java | 12 +- .../table/GanttPlotTableDataContentPane.java | 14 +- .../table/MeterPlotTableDataContentPane.java | 17 +- .../table/SeriesNameUseFieldNamePane.java | 2 - .../table/SeriesNameUseFieldValuePane.java | 18 +- .../data/table/SeriesTypeUseComboxPane.java | 10 +- .../chart/gui/style/ThirdTabPane.java | 8 +- ...anChartBubblePlotTableDataContentPane.java | 17 +- .../designer/AbstractVanChartScrollPane.java | 4 + .../data/GanttPlotReportDataContentPane.java | 2 + .../data/GanttPlotTableDataContentPane.java | 5 +- .../component/ComboBoxWithButtonPane.java | 2 +- .../component/GanttReportDataContentPane.java | 8 +- .../component/GanttTableDataContentPane.java | 26 ++- .../component/GanttTableDataProjectPane.java | 2 +- .../component/TinyFormulaWithButtonPane.java | 2 +- .../link/GanttLinkReportDataContentPane.java | 7 +- .../link/GanttLinkTableDataContentPane.java | 18 +- .../data/component/report/AreaPane.java | 2 +- .../component/report/LineMapAreaPane.java | 6 +- .../component/report/LongLatAreaPane.java | 8 +- .../data/component/table/AreaPane.java | 4 +- .../data/component/table/LineMapAreaPane.java | 6 +- .../data/component/table/LongLatAreaPane.java | 8 +- .../VanAreaMapPlotReportDataContentPane.java | 3 +- .../VanPointMapPlotReportDataContentPane.java | 19 +- .../VanAreaMapPlotTableDataContentPane.java | 29 ++- .../VanPointMapPlotTableDataContentPane.java | 17 +- .../VanChartMapConditionAttrContentPane.java | 14 +- .../other/VanChartMapConditionAttrPane.java | 4 +- .../other/VanChartMapInteractivePane.java | 5 +- .../type/VanChartMapSourceChoosePane.java | 67 ++++--- .../MultiPiePlotReportDataContentPane.java | 18 +- .../MultiPiePlotTableDataContentPane.java | 20 +- .../StructurePlotReportDataContentPane.java | 13 +- .../StructurePlotTableDataContentPane.java | 27 ++- .../WordCloudPlotReportDataContentPane.java | 10 +- .../WordCloudPlotTableDataContentPane.java | 21 +-- 49 files changed, 437 insertions(+), 321 deletions(-) diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java index f0a6d67bb0..f4a2381e7c 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java @@ -2,18 +2,20 @@ package com.fr.design.mainframe.chart.gui.data; import com.fr.base.Utils; import com.fr.base.chart.chartdata.TopDefinitionProvider; -import com.fr.chart.chartdata.TopDefinition; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.Plot; +import com.fr.chart.chartdata.TopDefinition; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; +import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.style.AbstractChartTabPane; import com.fr.design.mainframe.chart.gui.style.ThirdTabPane; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.stable.StringUtils; import javax.swing.*; @@ -31,8 +33,8 @@ import java.util.List; */ public class ChartDataFilterPane extends ThirdTabPane { private static final long serialVersionUID = 3650522989381790194L; - private static final int PAN_WIDTH = 210; - private static final int FIL_HEIGHT = 130; + private static final int PAN_WIDTH = 234; + private static final int FIL_HEIGHT = 150; private CategoryFilterPane categoryPane; private SeriesFilterPane seriesPane; @@ -45,6 +47,18 @@ public class ChartDataFilterPane extends ThirdTabPane { this.isNeedPresent = true; } + protected void initTabPane() { + if (!paneList.isEmpty()) { + tabPane = new UIHeadGroup(nameArray) { + @Override + public void tabChanged(int index) { + cardLayout.show(centerPane, nameArray[index]); + } + }; + tabPane.setPreferredSize(new Dimension(200, 20)); + } + } + protected List initPaneList(Plot plot, AbstractAttrNoScrollPane parent) { plot4Pane = plot; @@ -99,6 +113,8 @@ public class ChartDataFilterPane extends ThirdTabPane { this.removeAll(); paneList = initPaneList4NoPresent(plot4Pane, parentPane); initAllPane(); + tabPane.setPreferredSize(new Dimension(200, 20)); + centerPane.setPreferredSize(new Dimension(getContentPaneWidth(), 200)); this.validate(); } @@ -160,6 +176,10 @@ public class ChartDataFilterPane extends ThirdTabPane { private PresentComboBox present; private AbstractAttrNoScrollPane parent; + + private JPanel preDataNumPane; + private JPanel presentPane; + public CategoryFilterPane(AbstractAttrNoScrollPane parent) { super(true); this.parent = parent; @@ -175,59 +195,59 @@ public class ChartDataFilterPane extends ThirdTabPane { @Override protected JPanel createContentPane() { this.setLayout(new BorderLayout()); - JPanel pane = new JPanel(); + JPanel pane = initOtherPane(); this.add(pane, BorderLayout.NORTH); - pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); - pane.setPreferredSize(new Dimension(200, 110)); - initOtherPane(pane); - initPresentPane(pane); return pane; } - protected void initOtherPane(JPanel pane) { - JPanel prePane = new JPanel(); - prePane.setLayout(new FlowLayout(FlowLayout.LEFT)); - prePane.setPreferredSize(new Dimension(200, 20)); - pane.add(prePane); - onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore")); + protected JPanel initOtherPane() { + onlyPreData = new UICheckBox(Inter.getLocText("Plugin-ChartF_OnlyUseBeforeRecords")); + JPanel panel1 = new JPanel(new BorderLayout()); + JPanel panel2 = new JPanel(new BorderLayout()); + panel1.add(onlyPreData, BorderLayout.NORTH); preDataNum = new UITextField(); - preDataNum.setPreferredSize(new Dimension(50, 20)); - prePane.add(onlyPreData); - prePane.add(preDataNum); - prePane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Data_Records"))); - JPanel otherPane = new JPanel(); - otherPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); - pane.add(otherPane); + UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_RecordsNum")); combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther")); combineOther.setSelected(true); - otherPane.add(combineOther); - JPanel catePane = new JPanel(); - pane.add(catePane); - catePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p,f}; + double[] rowSize = {p, p}; + Component[][] components = new Component[][]{ + new Component[]{label,preDataNum}, + new Component[]{combineOther,null} + }; + + preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); + panel1.add(preDataNumPane, BorderLayout.CENTER); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowCate")); - catePane.add(notShowNull); + panel2.add(notShowNull, BorderLayout.NORTH); onlyPreData.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { checkBoxUse(); } }); - } - private void initPresentPane(JPanel pane) { - JPanel presentPane = new JPanel(); - presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0)); - pane.add(presentPane); present = new PresentComboBox() { protected void fireChange() { fire(); } }; - present.setPreferredSize(new Dimension(70, 20)); - presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":")); - presentPane.add(present); + presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("FR-Chart-Style_Present") ,present); + panel2.add(presentPane, BorderLayout.SOUTH); + + double[] column = {f}; + double[] row = {p, p}; + Component[][] coms = new Component[][]{ + new Component[]{panel1}, + new Component[]{panel2} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(coms, row,column); } + private void fire() { if (this.parent != null) { this.parent.attributeChanged(); @@ -245,9 +265,7 @@ public class ChartDataFilterPane extends ThirdTabPane { * 检查分类过滤界面 Box是否可用. */ public void checkBoxUse() { - preDataNum.setEnabled(onlyPreData.isSelected()); - combineOther.setEnabled(onlyPreData.isSelected()); - ; + preDataNumPane.setVisible(onlyPreData.isSelected()); } /** @@ -320,6 +338,9 @@ public class ChartDataFilterPane extends ThirdTabPane { private AbstractAttrNoScrollPane parent; + private JPanel preDataNumPane; + private JPanel presentPane; + public SeriesFilterPane(AbstractAttrNoScrollPane parent) { super(true); this.parent = parent; @@ -335,62 +356,60 @@ public class ChartDataFilterPane extends ThirdTabPane { @Override protected JPanel createContentPane() { this.setLayout(new BorderLayout()); - JPanel pane = new JPanel(); + JPanel pane = initOtherPane(); this.add(pane, BorderLayout.NORTH); - pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); - pane.setPreferredSize(new Dimension(200, 110)); - initOtherPane(pane); - initPresentPane(pane); return pane; } - protected void initOtherPane(JPanel pane) { - JPanel prePane = new JPanel(); - prePane.setLayout(new FlowLayout(FlowLayout.LEFT)); - prePane.setPreferredSize(new Dimension(200, 20)); - pane.add(prePane); - onlyPreData = new UICheckBox(Inter.getLocText("FR-Chart-Data_OnlyUseBefore")); + protected JPanel initOtherPane() { + onlyPreData = new UICheckBox(Inter.getLocText("Plugin-ChartF_OnlyUseBeforeRecords")); + JPanel panel1 = new JPanel(new BorderLayout()); + JPanel panel2 = new JPanel(new BorderLayout()); + panel1.add(onlyPreData, BorderLayout.NORTH); preDataNum = new UITextField(); - preDataNum.setPreferredSize(new Dimension(50, 20)); - prePane.add(onlyPreData); - prePane.add(preDataNum); - prePane.add(new UILabel(Inter.getLocText("FR-Chart-Data_Records"))); - JPanel otherPane = new JPanel(); - otherPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0)); - pane.add(otherPane); - + UILabel label = new UILabel(Inter.getLocText("Plugin-ChartF_RecordsNum")); combineOther = new UICheckBox(Inter.getLocText("FR-Chart-Data_CombineOther")); combineOther.setSelected(true); - otherPane.add(combineOther); - JPanel catePane = new JPanel(); - pane.add(catePane); + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p,f}; + double[] rowSize = {p, p}; + Component[][] components = new Component[][]{ + new Component[]{label,preDataNum}, + new Component[]{combineOther,null} + }; - catePane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); + preDataNumPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + preDataNumPane.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); + panel1.add(preDataNumPane, BorderLayout.CENTER); notShowNull = new UICheckBox(Inter.getLocText("FR-Chart-Data_NotShowSeries")); - catePane.add(notShowNull); + panel2.add(notShowNull, BorderLayout.NORTH); onlyPreData.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { checkBoxUse(); } }); - } - private void initPresentPane(JPanel pane) { - JPanel presentPane = new JPanel(); - presentPane.setLayout(new FlowLayout(FlowLayout.LEFT, 8, 0)); - pane.add(presentPane); present = new PresentComboBox() { protected void fireChange() { fire(); } }; - present.setPreferredSize(new Dimension(70, 20)); - presentPane.add(new BoldFontTextLabel(Inter.getLocText("FR-Chart-Style_Present") + ":")); - presentPane.add(present); + presentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("FR-Chart-Style_Present") ,present); + panel2.add(presentPane, BorderLayout.SOUTH); + + double[] column = {f}; + double[] row = {p, p}; + Component[][] coms = new Component[][]{ + new Component[]{panel1}, + new Component[]{panel2} + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(coms, row,column); } + private void fire() { if (this.parent != null) { parent.attributeChanged(); @@ -409,8 +428,7 @@ public class ChartDataFilterPane extends ThirdTabPane { * 检查Box是否可用 */ public void checkBoxUse() { - preDataNum.setEnabled(onlyPreData.isSelected()); - combineOther.setEnabled(onlyPreData.isSelected()); + preDataNumPane.setVisible(onlyPreData.isSelected()); } /** @@ -480,11 +498,8 @@ public class ChartDataFilterPane extends ThirdTabPane { @Override protected JPanel createContentPane() { this.setLayout(new BorderLayout()); - JPanel pane = new JPanel(); + JPanel pane = new JPanel(new BorderLayout()); this.add(pane, BorderLayout.NORTH); - pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); - pane.setPreferredSize(new Dimension(200, 110)); - initOtherPane(pane); return pane; } @@ -516,11 +531,8 @@ public class ChartDataFilterPane extends ThirdTabPane { @Override protected JPanel createContentPane() { this.setLayout(new BorderLayout()); - JPanel pane = new JPanel(); + JPanel pane = initOtherPane(); this.add(pane, BorderLayout.NORTH); - pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); - pane.setPreferredSize(new Dimension(200, 110)); - initOtherPane(pane); return pane; } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java index 6c74211b8a..7138071c1a 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/DatabaseTableDataPane.java @@ -41,6 +41,8 @@ public class DatabaseTableDataPane extends BasicPane{ pane.add(reviewButton,BorderLayout.EAST); this.add(pane,BorderLayout.CENTER); + + this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); } /** diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java index 6a33c6df96..8c464454a0 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/NormalChartDataPane.java @@ -3,13 +3,13 @@ package com.fr.design.mainframe.chart.gui.data; import com.fr.chart.chartattr.ChartCollection; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.constants.LayoutConstants; -import com.fr.design.dialog.BasicScrollPane; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.AbstractVanChartScrollPane; import javax.swing.*; import java.awt.*; @@ -46,7 +46,12 @@ public class NormalChartDataPane extends DataContentsPane { @Override protected JPanel createContentPane() { - return new BasicScrollPane() { + return new AbstractVanChartScrollPane() { + + protected void layoutContentPane() { + leftcontentPane = createContentPane(); + this.add(leftcontentPane); + } @Override protected JPanel createContentPane() { @@ -56,9 +61,10 @@ public class NormalChartDataPane extends DataContentsPane { this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE,6)); JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE,0)); northPane.add(jcb, BorderLayout.CENTER); - UILabel label1 = new UILabel(Inter.getLocText("Chart-Data_Resource") + ":", SwingConstants.RIGHT); + UILabel label1 = new UILabel(Inter.getLocText("Chart-Data_Resource")); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); + northPane.setBorder(BorderFactory.createEmptyBorder(0,10,0,15)); this.add(northPane, BorderLayout.NORTH); this.add(cardPane, BorderLayout.CENTER); diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java index 382ca853d1..081b19db70 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/TableDataPane.java @@ -1,7 +1,8 @@ package com.fr.design.mainframe.chart.gui.data; import com.fr.base.TableData; -import com.fr.chart.chartattr.*; +import com.fr.chart.chartattr.ChartCollection; +import com.fr.chart.chartattr.Plot; import com.fr.chart.chartdata.TableDataDefinition; import com.fr.chart.chartdata.TopDefinition; import com.fr.data.impl.NameTableData; @@ -11,7 +12,7 @@ import com.fr.design.data.tabledata.wrapper.TableDataWrapper; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.chart.gui.ChartDataPane; -import com.fr.design.mainframe.chart.gui.data.table.*; +import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.general.Inter; import javax.swing.*; @@ -35,7 +36,7 @@ public class TableDataPane extends FurtherBasicBeanPane{ } private void initDataPane() { - UILabel label = new BoldFontTextLabel(Inter.getLocText("Chart-DS_TableData") + ":", SwingConstants.RIGHT) ; + UILabel label = new BoldFontTextLabel(Inter.getLocText("Chart-DS_TableData")) ; label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH,ChartDataPane.LABEL_HEIGHT)); tableDataPane = new DatabaseTableDataPane(label) { @Override @@ -45,9 +46,7 @@ public class TableDataPane extends FurtherBasicBeanPane{ } }; - tableDataPane.setBorder(BorderFactory.createMatteBorder(0,6,0, 0, getBackground())); - tableDataPane.setBorder(BorderFactory.createEmptyBorder(0,1,0,1)); - tableDataPane.setPreferredSize(new Dimension(205 , 20)); + tableDataPane.setPreferredSize(new Dimension(246 , 20)); this.setBorder(BorderFactory.createEmptyBorder(TOP,0,0,0)); this.add(tableDataPane, BorderLayout.NORTH); } diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java index 768ecb7e87..35aa92b37e 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/data/report/AbstractReportDataContentPane.java @@ -45,6 +45,7 @@ public abstract class AbstractReportDataContentPane extends BasicBeanPane{ private boolean isNeedSummaryCaculateMethod = true; @@ -134,4 +136,10 @@ public abstract class AbstractTableDataContentPane extends BasicBeanPane { protected void initLayout() { this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM)); JPanel northPane = new JPanel(new BorderLayout(4, 0)); - UILabel label1 = new UILabel(Inter.getLocText("ChartF-Series_Name_From") + ":", SwingConstants.RIGHT); + UILabel label1 = new UILabel(Inter.getLocText("ChartF-Series_Name_From")); label1.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); northPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{jcb, null, null, label1, null})); - northPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); + northPane.setBorder(BorderFactory.createEmptyBorder(10, 24, 0, 15)); + cardPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15)); this.add(northPane, BorderLayout.NORTH); this.add(cardPane, BorderLayout.CENTER); - this.add(dataScreeningPane = new ChartDataFilterPane(this.initplot, parent), BorderLayout.SOUTH); + dataScreeningPane = new ChartDataFilterPane(this.initplot, parent); + JPanel panel = new UIExpandablePane(Inter.getLocText("FR-Chart-Data_Filter"), 290, 24, dataScreeningPane); + this.add(panel, BorderLayout.SOUTH); } /** diff --git a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java index 9d3f9756e3..ad03f3c521 100644 --- a/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java +++ b/designer_chart/src/com/fr/design/mainframe/chart/gui/style/ThirdTabPane.java @@ -39,6 +39,11 @@ public abstract class ThirdTabPane extends BasicBeanPane{ nameArray[i] = np.name; centerPane.add(np.pane, nameArray[i]); } + initTabPane(); + initLayout(); + } + + protected void initTabPane() { if (!paneList.isEmpty()) { tabPane = new UIHeadGroup(nameArray) { @Override @@ -48,8 +53,7 @@ public abstract class ThirdTabPane extends BasicBeanPane{ }; centerPane.setBorder(myBorder); } - initLayout(); - } + } @Override public void paint(Graphics g) { diff --git a/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java index 007a1490db..f9cda412e5 100644 --- a/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/bubble/data/VanChartBubblePlotTableDataContentPane.java @@ -6,7 +6,6 @@ import com.fr.chart.chartattr.BubblePlot; import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartdata.BubbleTableDefinition; import com.fr.design.gui.icombobox.UIComboBox; -import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; @@ -15,6 +14,7 @@ import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; +import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; @@ -56,20 +56,19 @@ public class VanChartBubblePlotTableDataContentPane extends AbstractTableDataCon double[] rowSize_north = {p, p, p, p}; Component[][] components_north = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")+":", SwingConstants.RIGHT), seriesName}, - new Component[]{new UILabel("x :", SwingConstants.RIGHT), xCombox}, - new Component[]{new UILabel("y :", SwingConstants.RIGHT), yCombox}, - new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), bubbleSize}, + new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")), seriesName}, + new Component[]{new UILabel("x" ), xCombox}, + new Component[]{new UILabel("y"), yCombox}, + new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), bubbleSize}, }; JPanel north = TableLayoutHelper.createTableLayoutPane(components_north,rowSize_north,columnSize_north); - north.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 1)); + north.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15)); + JPanel filterPane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Chart-Data_Filter"),dataScreeningPane); Component[][] components = new Component[][]{ new Component[]{north}, - new Component[]{new JSeparator()}, - new Component[]{new BoldFontTextLabel(Inter.getLocText("Chart-Data_Filter"))}, - new Component[]{dataScreeningPane} + new Component[]{filterPane} }; diff --git a/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java b/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java index 7d9eae143f..4ca6938601 100644 --- a/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java +++ b/designer_chart/src/com/fr/plugin/chart/designer/AbstractVanChartScrollPane.java @@ -27,4 +27,8 @@ public abstract class AbstractVanChartScrollPane extends BasicScrollPane { leftcontentPane.setBounds(0, 0, width, height); } } + public void reloaPane(JPanel pane){ + super.reloaPane(pane); + leftcontentPane.setBorder(BorderFactory.createEmptyBorder()); + } } diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java index 92f6d939c5..2401deca7b 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java @@ -5,6 +5,7 @@ import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPa import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataContentPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttReportDataProjectPane; +import javax.swing.*; import java.awt.*; /** @@ -18,6 +19,7 @@ public class GanttPlotReportDataContentPane extends AbstractReportDataContentPan public GanttPlotReportDataContentPane() { initComponent(); this.setLayout(new BorderLayout(0, V_GAP)); + projectPane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); this.add(projectPane, BorderLayout.NORTH); this.add(contentPane, BorderLayout.CENTER); } diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java index b07f637098..4af06f8c69 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java @@ -5,6 +5,7 @@ import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataContentPane; import com.fr.plugin.chart.gantt.designer.data.data.component.GanttTableDataProjectPane; +import javax.swing.*; import java.awt.*; import java.util.List; @@ -19,8 +20,10 @@ public class GanttPlotTableDataContentPane extends AbstractTableDataContentPane public GanttPlotTableDataContentPane() { initComponent(); this.setLayout(new BorderLayout(0, V_GAP)); + projectPane.setBorder(BorderFactory.createEmptyBorder(0,17,0,15)); this.add(projectPane, BorderLayout.NORTH); - this.add(contentPane, BorderLayout.CENTER); + this.add(new JSeparator(), BorderLayout.CENTER); + this.add(contentPane, BorderLayout.SOUTH); } private void initComponent() { diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java index bd1d887139..54bb8cb826 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java @@ -33,7 +33,7 @@ public abstract class ComboBoxWithButtonPane extends JPanel { button.setPreferredSize(new Dimension(20, 20)); button.addActionListener(getButtonListener()); - UILabel title = new UILabel(getTitleText(), SwingConstants.RIGHT); + UILabel title = new UILabel(getTitleText()); title.setPreferredSize(new Dimension(60, 20)); this.setLayout(new BorderLayout(H_GAP, 0)); diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java index f87c8e1626..24c85d96e3 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java @@ -28,7 +28,11 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{ public GanttReportDataContentPane() { this.setLayout(new BorderLayout()); initAllComponent(); - this.add(getContentPane(), BorderLayout.CENTER); + JPanel panel = getContentPane(); + panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + this.add(panel, BorderLayout.CENTER); + this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight())); + } private void initAllComponent() { @@ -51,7 +55,7 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{ protected void initLayout() { this.setLayout(new BorderLayout(4, 0)); - UILabel label = new UILabel(title + ":", SwingConstants.RIGHT); + UILabel label = new UILabel(title); label.setPreferredSize(new Dimension(75, 20)); this.add(label, BorderLayout.WEST); diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java index 570199b4c2..ff2aaee225 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java @@ -33,29 +33,27 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{ public GanttTableDataContentPane() { this.setLayout(new BorderLayout()); initAllComponent(); - this.add(getContentPane(), BorderLayout.CENTER); + JPanel panel = getContentPane(); + panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + this.add(panel, BorderLayout.CENTER); + this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight())); + } private void initAllComponent() { seriesComboBox = new UIComboBox(); - seriesComboBox.setPreferredSize(new Dimension(100,20)); startTimeComboBox = new UIComboBox(); - startTimeComboBox.setPreferredSize(new Dimension(100,20)); endTimeComboBox = new UIComboBox(); - endTimeComboBox.setPreferredSize(new Dimension(100,20)); markerTimeComboBox = new UIComboBox(); - markerTimeComboBox.setPreferredSize(new Dimension(100,20)); markerTimeComboBox.addItem(NONE); processComboBox = new UIComboBox(); - processComboBox.setPreferredSize(new Dimension(100,20)); processComboBox.addItem(NONE); taskIDComboBox = new UIComboBox(); - taskIDComboBox.setPreferredSize(new Dimension(100,20)); taskIDComboBox.addItem(NONE); taskIDComboBox.setToolTipText(Inter.getLocText("Plugin-ChartF_Task_ID_Tooltip")); } @@ -67,15 +65,15 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{ double[] col = {p,f}; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")+":", SwingConstants.RIGHT), seriesComboBox}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Time")+":", SwingConstants.RIGHT), startTimeComboBox}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Time")+":", SwingConstants.RIGHT), endTimeComboBox}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Marker_Time")+":", SwingConstants.RIGHT), markerTimeComboBox}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Process")+":", SwingConstants.RIGHT), processComboBox}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Task_ID")+":", SwingConstants.RIGHT), taskIDComboBox} + new Component[]{new UILabel(Inter.getLocText("Chart-Series_Name")), seriesComboBox}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Time")), startTimeComboBox}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Time")), endTimeComboBox}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Marker_Time")), markerTimeComboBox}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Process")), processComboBox}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Task_ID")), taskIDComboBox} }; - return TableLayoutHelper.createTableLayoutPane(components, row, col); + return TableLayoutHelper.createGapTableLayoutPane(components, row, col,24,6); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java index 5714b22e6a..76e8f09ee1 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java @@ -38,7 +38,7 @@ public class GanttTableDataProjectPane extends AbstractTableDataContentPane impl projectName = new ComboBoxWithButtonPane(){ @Override protected String getTitleText() { - return Inter.getLocText("Plugin-ChartF_Project_Name") + ":"; + return Inter.getLocText("Plugin-ChartF_Project_Name"); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java index 014893f9ac..1cb2416156 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java @@ -27,7 +27,7 @@ public abstract class TinyFormulaWithButtonPane extends JPanel implements UIObse } public TinyFormulaWithButtonPane(String text, String iconUrl) { - editLabel = new UIEditLabel(text,SwingConstants.RIGHT){ + editLabel = new UIEditLabel(text,SwingConstants.LEFT){ protected void doAfterMousePress(){ clearAllBackground(); } diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java index 31ca34d0e6..ad32fd1433 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java @@ -25,8 +25,9 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan public GanttLinkReportDataContentPane() { this.setLayout(new BorderLayout()); initAllComponent(); - this.add(getContentPane(), BorderLayout.CENTER); - } + JPanel panel = getContentPane(); + panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + this.add(panel, BorderLayout.CENTER); } private void initAllComponent() { startTaskID = createTinyFormulaPaneWithTitle(Inter.getLocText("Plugin-ChartF_Start_Task_ID")); @@ -42,7 +43,7 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan protected void initLayout() { this.setLayout(new BorderLayout(4, 0)); - UILabel label = new UILabel(title + ":", SwingConstants.RIGHT); + UILabel label = new UILabel(title ); label.setPreferredSize(new Dimension(75, 20)); this.add(label, BorderLayout.WEST); diff --git a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java index e760e9cd24..f3d627bdc1 100644 --- a/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java @@ -8,7 +8,6 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.general.Inter; -import com.fr.plugin.chart.gantt.data.VanGanttDefinitionHelper; import com.fr.plugin.chart.gantt.data.VanGanttLinkTableDefinition; import com.fr.plugin.chart.gantt.designer.data.data.GanttDataPaneHelper; import com.fr.stable.StringUtils; @@ -28,18 +27,19 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane public GanttLinkTableDataContentPane() { this.setLayout(new BorderLayout()); initAllComponent(); - this.add(getContentPane(), BorderLayout.CENTER); + JPanel panel = getContentPane(); + panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + this.add(panel, BorderLayout.CENTER); + this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight())); + } private void initAllComponent() { startTaskIDComboBox = new UIComboBox(); - startTaskIDComboBox.setPreferredSize(new Dimension(100,20)); endTaskIDComboBox = new UIComboBox(); - endTaskIDComboBox.setPreferredSize(new Dimension(100,20)); linkTypeComboBox = new UIComboBox(); - linkTypeComboBox.setPreferredSize(new Dimension(100,20)); } @@ -50,12 +50,12 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane double[] col = {p,f}; Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Task_ID")+":", SwingConstants.RIGHT), startTaskIDComboBox}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Task_ID")+":", SwingConstants.RIGHT), endTaskIDComboBox}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Link_Type")+":", SwingConstants.RIGHT), linkTypeComboBox} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Start_Task_ID")), startTaskIDComboBox}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_End_Task_ID")), endTaskIDComboBox}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Link_Type")), linkTypeComboBox} }; - return TableLayoutHelper.createTableLayoutPane(components, row, col); + return TableLayoutHelper.createGapTableLayoutPane(components, row, col,24,6); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java index 7e10def23d..f7714b4e42 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/AreaPane.java @@ -31,7 +31,7 @@ public class AreaPane extends AbstractReportDataContentPane { double[] columnSize = {p, f}; double[] rowSize = {p}; Component[][] components = new Component[][]{ - new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaName} + new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaName} }; return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java index d342c62c11..43f09c6f0e 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LineMapAreaPane.java @@ -2,8 +2,8 @@ package com.fr.plugin.chart.map.designer.data.component.report; import com.fr.general.Inter; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; -import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea; import com.fr.plugin.chart.map.data.VanMapReportDefinition; +import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea; import javax.swing.*; import java.awt.*; @@ -19,8 +19,8 @@ public class LineMapAreaPane extends PointMapAreaPane { protected JPanel createContentPane() { initAreaPane(); initEndAreaPane(); - JPanel panel1 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point")+":", areaPane, LEFT_GAP); - JPanel panel2 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point")+":", endAreaPane, LEFT_GAP); + JPanel panel1 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point"), areaPane, LEFT_GAP); + JPanel panel2 = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point"), endAreaPane, LEFT_GAP); JPanel content = new JPanel(new BorderLayout(0, V_GAP)); content.add(panel1, BorderLayout.NORTH); diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java index f8123f7865..40191317d4 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/report/LongLatAreaPane.java @@ -34,11 +34,11 @@ public class LongLatAreaPane extends AreaPane { double[] columnSize = {p, f}; double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ - new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude") + ":", SwingConstants.RIGHT), longitude}, - new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude") + ":", SwingConstants.RIGHT), latitude}, - new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaName} + new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaName} }; - return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); } @Override diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java index f9dd177924..96557be51f 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/AreaPane.java @@ -46,9 +46,9 @@ public class AreaPane extends AbstractTableDataContentPane { double[] columnSize = {p, f}; double[] rowSize = {p}; Component[][] components = new Component[][]{ - new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaNameCom} + new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaNameCom} }; - return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); } protected void initAreaNameCom() { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java index 867417e36c..d28defd399 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LineMapAreaPane.java @@ -2,8 +2,8 @@ package com.fr.plugin.chart.map.designer.data.component.table; import com.fr.general.Inter; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; -import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; +import com.fr.plugin.chart.map.designer.data.component.LongitudeLatitudeAndArea; import com.fr.plugin.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane; import javax.swing.*; @@ -25,8 +25,8 @@ public class LineMapAreaPane extends PointMapAreaPane { initAreaPane(parentPane); initEndAreaPane(parentPane); - JPanel startPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point")+":", areaPane, LEFT_GAP); - JPanel endPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point")+":", endAreaPane, LEFT_GAP); + JPanel startPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_Start_Point"), areaPane, LEFT_GAP); + JPanel endPane = TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("Plugin-ChartF_End_Point"), endAreaPane, LEFT_GAP); JPanel content = new JPanel(new BorderLayout(0, V_GAP)); content.add(startPane, BorderLayout.NORTH); diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java index 21a8cfbdc5..23b0dc7735 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/component/table/LongLatAreaPane.java @@ -36,12 +36,12 @@ public class LongLatAreaPane extends AreaPane { double[] columnSize = {p, f}; double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ - new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude") + ":", SwingConstants.RIGHT), longitudeCom}, - new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude") + ":", SwingConstants.RIGHT), latitudeCom}, - new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT), areaNameCom} + new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitudeCom}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitudeCom}, + new Component[]{new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")), areaNameCom} }; - return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + return TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,50,6); } public void refreshBoxListWithSelectTableData(List list) { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java index bfb382e627..ba183ef56e 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java @@ -25,6 +25,7 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte initAreaName(); this.add(getContent(), "0,0,2,0"); + this.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); } protected void initAreaName() { @@ -33,7 +34,7 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte protected void initLayout() { this.setLayout(new BorderLayout(4, 0)); - UILabel label = new UILabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT); + UILabel label = new UILabel(Inter.getLocText("FR-Chart-Area_Name")); label.setPreferredSize(new Dimension(75, 20)); this.add(label, BorderLayout.WEST); diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java index 067e312bdf..50b86590c2 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java @@ -2,6 +2,9 @@ package com.fr.plugin.chart.map.designer.data.contentpane.report; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.general.Inter; import com.fr.plugin.chart.map.data.VanMapReportDefinition; @@ -48,6 +51,10 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa //================================public class=================================== public class LongLatReportFormulaPane extends BasicBeanPane { + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + private UIButtonGroup locationType; private JPanel centerPane; @@ -85,7 +92,17 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa locationType.setSelectedIndex(0); - this.add(locationType, BorderLayout.NORTH); + double[] columnSize = {p, f}; + double[] rowSize = {p}; + + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Geographical_Position")),locationType}, + }; + + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,30,6); + + + this.add(panel, BorderLayout.NORTH); this.add(centerPane, BorderLayout.CENTER); } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java index f3f5add45b..4f978fb4a8 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java @@ -5,9 +5,10 @@ import com.fr.chart.chartattr.ChartCollection; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; @@ -33,11 +34,16 @@ public class VanAreaMapPlotTableDataContentPane extends AbstractTableDataContent initAreaNameCom(); JPanel areaNamePane = createAreaNamePane(); + JSeparator jSeparator = new JSeparator(); + areaNamePane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + jSeparator.setPreferredSize(new Dimension(246,2)); - this.add(areaNamePane, BorderLayout.CENTER); + this.add(areaNamePane, BorderLayout.NORTH); + this.add(jSeparator, BorderLayout.CENTER); seriesTypeUseComboxPane = new SeriesTypeUseComboxPaneWithOutFilter(parent, new VanChartMapPlot()); this.add(seriesTypeUseComboxPane, BorderLayout.SOUTH); + } protected void initAreaNameCom() { @@ -53,14 +59,21 @@ public class VanAreaMapPlotTableDataContentPane extends AbstractTableDataContent } protected JPanel createAreaNamePane() { - JPanel areaNamePane = new JPanel(new BorderLayout(4, 0)); - areaNamePane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); - UILabel label = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name") + ":", SwingConstants.RIGHT); - label.setPreferredSize(new Dimension(75, 20)); + UILabel label = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Area_Name")); + label.setPreferredSize(new Dimension(80, 20)); areaNameCom.setPreferredSize(new Dimension(100, 20)); - areaNamePane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{areaNameCom, null, null, label, null})); - return areaNamePane; + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p}; + + Component[][] components = new Component[][]{ + new Component[]{label, areaNameCom}, + }; + + return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + } protected void makeToolTipUse(UIComboBox comBox) { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java index b5ab74fa6b..67bc3dd42b 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java @@ -2,6 +2,9 @@ package com.fr.plugin.chart.map.designer.data.contentpane.table; import com.fr.design.beans.BasicBeanPane; import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.general.Inter; import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider; @@ -80,6 +83,10 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData public LongLatAreaTableComboPane() { + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + this.setLayout(new BorderLayout(0, 5)); centerPane = new JPanel(new CardLayout()){ @Override @@ -110,7 +117,15 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData locationType.setSelectedIndex(0); - this.add(locationType, BorderLayout.NORTH); + double[] columnSize = {p, f}; + double[] rowSize = {p}; + Component[][] components = new Component[][]{ + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Geographical_Position")),locationType}, + }; + + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,30,6); + + this.add(panel, BorderLayout.NORTH); this.add(centerPane, BorderLayout.CENTER); } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrContentPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrContentPane.java index 3a9783bde7..547241ef52 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrContentPane.java @@ -3,14 +3,18 @@ package com.fr.plugin.chart.map.designer.other; import com.fr.chart.chartattr.Plot; import com.fr.chart.chartglyph.ConditionCollection; import com.fr.design.condition.ConditionAttributesPane; -import com.fr.plugin.chart.designer.other.AbstractConditionAttrContentPane; import com.fr.plugin.chart.designer.other.VanChartConditionAttrContentPane; -import com.fr.plugin.chart.map.designer.other.condition.pane.*; -import com.fr.plugin.chart.type.MapMarkerType; -import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.designer.VanMapAreaAndPointGroupPane; import com.fr.plugin.chart.map.designer.VanMapAreaPointAndLineGroupPane; +import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartBubblePointMapConditionPane; +import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartCommonPointMapConditionPane; +import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartDefaultPointMapConditionPane; +import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartImagePointMapConditionPane; +import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartLineMapConditionPane; +import com.fr.plugin.chart.map.designer.other.condition.pane.VanChartMapConditionPane; +import com.fr.plugin.chart.type.MapMarkerType; +import com.fr.plugin.chart.type.MapType; import javax.swing.*; import java.awt.*; @@ -19,7 +23,7 @@ import java.awt.*; * Created by Mitisky on 16/5/23. * 组合地图时有两个 */ -public class VanChartMapConditionAttrContentPane extends AbstractConditionAttrContentPane { +public class VanChartMapConditionAttrContentPane extends VanChartConditionAttrContentPane { private VanChartConditionAttrContentPane pointConditionPane; private VanChartConditionAttrContentPane areaConditionPane; private VanChartConditionAttrContentPane lineConditionPane; diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrPane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrPane.java index 3a1089c302..14009eb6de 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrPane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapConditionAttrPane.java @@ -1,13 +1,13 @@ package com.fr.plugin.chart.map.designer.other; -import com.fr.plugin.chart.designer.other.AbstractConditionAttrContentPane; +import com.fr.plugin.chart.designer.other.VanChartConditionAttrContentPane; import com.fr.plugin.chart.designer.other.VanChartConditionAttrPane; /** * Created by Mitisky on 16/5/20. */ public class VanChartMapConditionAttrPane extends VanChartConditionAttrPane{ - protected AbstractConditionAttrContentPane createConditionAttrContentPane() { + protected VanChartConditionAttrContentPane createConditionAttrContentPane() { return new VanChartMapConditionAttrContentPane(); } } diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapInteractivePane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapInteractivePane.java index 36c3d5fc85..e732825692 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapInteractivePane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/other/VanChartMapInteractivePane.java @@ -2,15 +2,14 @@ package com.fr.plugin.chart.map.designer.other; import com.fr.chart.chartattr.Plot; import com.fr.general.Inter; -import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.attr.plot.VanChartPlot; import com.fr.plugin.chart.designer.PlotFactory; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.other.AutoRefreshPane; import com.fr.plugin.chart.designer.other.AutoRefreshPaneWithoutTooltip; import com.fr.plugin.chart.designer.other.VanChartInteractivePaneWithMapZoom; -import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.map.VanChartMapPlot; +import com.fr.plugin.chart.type.MapType; import com.fr.plugin.chart.vanchart.VanChart; import javax.swing.*; @@ -24,7 +23,7 @@ public class VanChartMapInteractivePane extends VanChartInteractivePaneWithMapZo @Override protected JPanel createHyperlinkPane() { hyperlinkPane = new VanChartMapHyperLinkPane(); - return TableLayout4VanChartHelper.createTitlePane(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane, HYPERLINK_LEFT_GAP); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("M_Insert-Hyperlink"), hyperlinkPane); } @Override protected void populateHyperlink(Plot plot) { diff --git a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java index 0d401855a7..cb3980d491 100644 --- a/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java +++ b/designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java @@ -7,6 +7,7 @@ import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icombobox.FRTreeComboBox; import com.fr.design.gui.icombobox.UIComboBox; @@ -81,7 +82,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { private UITextArea attribution; private UIComboBox zoomLevel; - private UIComboBox viewCenterCom; + private UIButtonGroup viewCenterCom; private JPanel longAndLatPane; private UISpinner longitude; private UISpinner latitude; @@ -112,18 +113,20 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { public VanChartMapSourceChoosePane() { this.setLayout(new BorderLayout()); - this.setBorder(BorderFactory.createEmptyBorder(10,0,0,10)); + this.setBorder(BorderFactory.createEmptyBorder(10,0,0,0)); double p = TableLayout.PREFERRED; - double[] columnSize = {226}; + double[] columnSize = {246}; double[] rowSize = {p,p,p,p,p,p,p,p}; + JPanel panel = new JPanel(new BorderLayout()); + panel.add(createMapSourcesPane(), BorderLayout.NORTH); + panel.add(createGISLayerPane(), BorderLayout.CENTER); + + JPanel BasePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("FR-Designer_Basic"), panel); + Component[][] comps = new Component[][]{ - new Component[]{new JSeparator()}, - new Component[]{createMapSourcesPane()}, - new Component[]{new JSeparator()}, - new Component[]{createGISLayerPane()}, - new Component[]{new JSeparator()}, + new Component[]{BasePane}, new Component[]{createMapInitStatusPane()} }; JPanel contentPane = TableLayoutHelper.createTableLayoutPane(comps,rowSize,columnSize); @@ -190,7 +193,17 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { sourceComboBox.addPopupMenuListener(popupMenuListener); sourceTitleLabel = createSourceTitleLabel(); - return TableLayout4VanChartHelper.createTableLayoutPaneWithUILabel(sourceTitleLabel, sourceComboBox); + + double p = TableLayout.PREFERRED; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; + double[] rowSize = {p,p}; + Component[][] components = new Component[][]{ + new Component[]{null,null}, + new Component[]{sourceTitleLabel,sourceComboBox}, + + }; + return TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize, columnSize); } private JPanel createGISLayerPane() { @@ -259,7 +272,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { panel.add(gisLayer, BorderLayout.CENTER); panel.add(layerCardPane, BorderLayout.SOUTH); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Gis_Layer"), panel); + return TableLayout4VanChartHelper.createGapTableLayoutPane(Inter.getLocText("Plugin-ChartF_Gis_Layer"), panel); } private JPanel createCustomTileLayer() { @@ -391,24 +404,26 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { private JPanel createMapInitStatusPane() { zoomLevel = new UIComboBox(ZOOM_LEVELS); - viewCenterCom = new UIComboBox(new String[]{AUTO_CENTER_STRING, CUSTOM_CENTER_STRING}); + viewCenterCom = new UIButtonGroup(new String[]{AUTO_CENTER_STRING, CUSTOM_CENTER_STRING}); longitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0); latitude = new UISpinner(-Double.MAX_VALUE,Double.MAX_VALUE,1,0.0); double p = TableLayout.PREFERRED; - double[] rowSize = {p,p}; + double[] rowSize = {p,p,p}; Component[][] comps = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer"), SwingConstants.RIGHT), zoomLevel}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_View_Center"), SwingConstants.RIGHT), viewCenterCom}, + new Component[]{null, null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Zoom_Layer")), zoomLevel}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_View_Center")), viewCenterCom}, }; - final JPanel northPane = TableLayoutHelper.createTableLayoutPane(comps,rowSize,COLUMN_SIZE); + final JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps,rowSize,COLUMN_SIZE); Component[][] longAndLatComps = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Longitude"), SwingConstants.RIGHT), longitude}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Latitude"), SwingConstants.RIGHT), latitude} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Longitude")), longitude}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Latitude")), latitude} }; - longAndLatPane = TableLayoutHelper.createTableLayoutPane(longAndLatComps,rowSize,COLUMN_SIZE); + longAndLatPane =TableLayout4VanChartHelper.createGapTableLayoutPane(longAndLatComps,rowSize,COLUMN_SIZE); + longAndLatPane.setBorder(BorderFactory.createEmptyBorder(0,12,0,0)); longAndLatPane.setVisible(false); JPanel contentPane = new JPanel(new BorderLayout(0, 6)){ @@ -425,17 +440,17 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { contentPane.add(northPane, BorderLayout.NORTH); contentPane.add(longAndLatPane, BorderLayout.CENTER); - viewCenterCom.addItemListener(new ItemListener() { + viewCenterCom.addActionListener(new ActionListener() { @Override - public void itemStateChanged(ItemEvent e) { + public void actionPerformed(ActionEvent e) { longAndLatPane.setVisible(!isAutoViewCenter()); } }); - return TableLayout4VanChartHelper.createTableLayoutPaneWithTitle(Inter.getLocText("Plugin-ChartF_Map_Init_Status"), contentPane); + return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Inter.getLocText("Plugin-ChartF_Map_Init_Status"), contentPane); } private boolean isAutoViewCenter() { - return ComparatorUtils.equals(viewCenterCom.getSelectedItem(), AUTO_CENTER_STRING); + return viewCenterCom.getSelectedIndex()==0; } private PopupMenuListener popupMenuListener = new PopupMenuListener() { @@ -534,7 +549,7 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { private void resetViewCenter(VanChartMapPlot mapPlot) { mapPlot.getViewCenter().setAuto(true); - viewCenterCom.setSelectedItem(AUTO_CENTER_STRING); + viewCenterCom.setSelectedIndex(0); } private void resetZoomLevel(VanChartMapPlot mapPlot) { @@ -575,15 +590,17 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver { ViewCenter viewCenter = mapPlot.getViewCenter(); if(viewCenter.isAuto()){ - viewCenterCom.setSelectedItem(AUTO_CENTER_STRING); + viewCenterCom.setSelectedIndex(0); longitude.setValue(0); latitude.setValue(0); } else { - viewCenterCom.setSelectedItem(CUSTOM_CENTER_STRING); + viewCenterCom.setSelectedIndex(1); longitude.setValue(viewCenter.getLongitude()); latitude.setValue(viewCenter.getLatitude()); } + longAndLatPane.setVisible(!isAutoViewCenter()); + checkLayerCardPane(); } diff --git a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java index 80e3b4d284..6933d39d5a 100644 --- a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotReportDataContentPane.java @@ -62,7 +62,7 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize_north = {p, f}; - double[] rowSize_north = {p, p}; + double[] rowSize_north = {p, p, p}; levelNumEdit = new UISpinner(1, 15, 1, levelNum){ @Override @@ -87,8 +87,9 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent nameField.setPreferredSize(new Dimension(WD, HT)); Component[][] components_north = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")+":", SwingConstants.RIGHT), levelNumEdit}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")+":", SwingConstants.RIGHT), nameField}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), nameField}, + new Component[]{new JSeparator(), null}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")), levelNumEdit}, }; return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north); @@ -115,22 +116,23 @@ public class MultiPiePlotReportDataContentPane extends AbstractReportDataContent double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize_center = {p, f}; - double[] rowSize_center = new double[levelNum + 1]; + double[] rowSize_center = new double[levelNum + 2]; initLevelNameList(); - for (int i = 0; i < levelNum + 1; i++){ + for (int i = 0; i < levelNum + 2; i++){ rowSize_center[i] = p; } - Component[][] components_center = new Component[levelNum + 1][]; + Component[][] components_center = new Component[levelNum + 2][]; for (int i = 0; i < levelNum; i++){ - components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1) +":", SwingConstants.RIGHT), levelNameList.get(i)}; + components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1)), levelNameList.get(i)}; } value = new TinyFormulaPane(); - components_center[levelNum] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), value}; + components_center[levelNum] = new Component[]{new JSeparator(), null}; + components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), value}; registerListener4Center(); diff --git a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java index 6953a94907..a82873aaaa 100644 --- a/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/multilayer/data/MultiPiePlotTableDataContentPane.java @@ -84,17 +84,17 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize_center = {p, f}; - double[] rowSize_center = new double[levelNum + 2]; + double[] rowSize_center = new double[levelNum + 3]; initLevelNameList(); - for (int i = 0; i < levelNum + 2; i++){ + for (int i = 0; i < levelNum + 3; i++){ rowSize_center[i] = p; } - Component[][] components_center = new Component[levelNum + 2][]; + Component[][] components_center = new Component[levelNum + 3][]; for (int i = 0; i < levelNum; i++){ - components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1) +":", SwingConstants.RIGHT), levelNameList.get(i)}; + components_center[i] = new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level") + String.valueOf(i+1)), levelNameList.get(i)}; } value = new UIComboBox(); @@ -103,8 +103,9 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa calculateCombox.reset(); calculateCombox.setPreferredSize(new Dimension(WD, HT)); - components_center[levelNum] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")+":", SwingConstants.RIGHT), value}; - components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method") + ":", SwingConstants.RIGHT), calculateCombox}; + components_center[levelNum] = new Component[]{new JSeparator(), null}; + components_center[levelNum+1] = new Component[]{new UILabel(Inter.getLocText("FR-Chart_Bubble_Size")), value}; + components_center[levelNum+2] = new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox}; initCenterItemListener(); @@ -147,7 +148,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa double p = TableLayout.PREFERRED; double f = TableLayout.FILL; double[] columnSize_north = {p, f}; - double[] rowSize_north = {p, p}; + double[] rowSize_north = {p, p, p}; levelNumEdit = new UISpinner(1, 15, 1, levelNum){ @Override @@ -173,8 +174,9 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa nameField.setPreferredSize(new Dimension(WD, HT)); Component[][] components_north = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")+":", SwingConstants.RIGHT), levelNumEdit}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")+":", SwingConstants.RIGHT), nameField}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), nameField}, + new Component[]{new JSeparator(),null }, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Level_Number")), levelNumEdit}, }; return TableLayoutHelper.createTableLayoutPane(components_north, rowSize_north, columnSize_north); diff --git a/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotReportDataContentPane.java index f5d611ee12..feeecf8b2a 100644 --- a/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotReportDataContentPane.java @@ -38,14 +38,15 @@ public class StructurePlotReportDataContentPane extends AbstractReportDataConten nodeValue = new TinyFormulaPane(); Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name"), SwingConstants.RIGHT), nodeName}, - new Component[]{new UILabel("id", SwingConstants.RIGHT), nodeID}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID"), SwingConstants.RIGHT), parentID}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), seriesName}, - new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value"), SwingConstants.RIGHT), nodeValue}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name")), nodeName}, + new Component[]{new UILabel("id"), nodeID}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID")), parentID}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), seriesName}, + new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value")), nodeValue}, }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6); + panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); this.setLayout(new BorderLayout()); this.add(panel, BorderLayout.CENTER); diff --git a/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java index ed2fcf8c04..26ad1dbae0 100644 --- a/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/structure/desinger/data/StructurePlotTableDataContentPane.java @@ -30,7 +30,8 @@ public class StructurePlotTableDataContentPane extends AbstractTableDataContentP public StructurePlotTableDataContentPane() { double p = TableLayout.PREFERRED; - double[] columnSize = {p, p}; + double f = TableLayout.FILL; + double[] columnSize = {p, f}; double[] rowSize = {p, p, p, p, p, p}; nodeName = new UIComboBox(); @@ -40,26 +41,20 @@ public class StructurePlotTableDataContentPane extends AbstractTableDataContentP nodeValue = new UIComboBox(); calculateCombox = new CalculateComboBox(); - nodeName.setPreferredSize(new Dimension(100, 20)); - nodeId.setPreferredSize(new Dimension(100, 20)); - parenrId.setPreferredSize(new Dimension(100, 20)); - seriesName.setPreferredSize(new Dimension(100, 20)); - nodeValue.setPreferredSize(new Dimension(100, 20)); - calculateCombox.setPreferredSize(new Dimension(100, 20)); - Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name"), SwingConstants.RIGHT), nodeName}, - new Component[]{new UILabel("id", SwingConstants.RIGHT), nodeId}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID"), SwingConstants.RIGHT), parenrId}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), seriesName}, - new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value"), SwingConstants.RIGHT), nodeValue}, - new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method"), SwingConstants.RIGHT), calculateCombox} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Node_Name")), nodeName}, + new Component[]{new UILabel("id"), nodeId}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Parent_ID")), parenrId}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), seriesName}, + new Component[]{new UILabel(Inter.getLocText("Chart-Series_Value")), nodeValue}, + new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox} }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); - + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6); + panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); this.setLayout(new BorderLayout()); this.add(panel, BorderLayout.CENTER); + this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight())); } diff --git a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java index 1d54647ed5..c171e12b4d 100644 --- a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotReportDataContentPane.java @@ -34,12 +34,14 @@ public class WordCloudPlotReportDataContentPane extends AbstractReportDataConten wordValue = new TinyFormulaPane(); Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), name}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name"), SwingConstants.RIGHT), wordName}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value"), SwingConstants.RIGHT), wordValue} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), name}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name")), wordName}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value")), wordValue} }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6); + panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); + this.setLayout(new BorderLayout()); this.add(panel, BorderLayout.CENTER); diff --git a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java index 270f160186..0ff9535662 100644 --- a/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java +++ b/designer_chart/src/com/fr/plugin/chart/wordcloud/designer/data/WordCloudPlotTableDataContentPane.java @@ -28,7 +28,8 @@ public class WordCloudPlotTableDataContentPane extends AbstractTableDataContentP public WordCloudPlotTableDataContentPane() { double p = TableLayout.PREFERRED; - double[] columnSize = { p, p }; + double f = TableLayout.FILL; + double[] columnSize = { p, f}; double[] rowSize = { p, p, p, p}; name = new UITextField(); @@ -37,22 +38,20 @@ public class WordCloudPlotTableDataContentPane extends AbstractTableDataContentP calculateCombox = new CalculateComboBox(); - name.setPreferredSize(new Dimension(100, 20)); - wordName.setPreferredSize(new Dimension(100, 20)); - wordValue.setPreferredSize(new Dimension(100, 20)); - calculateCombox.setPreferredSize(new Dimension(100, 20)); - Component[][] components = new Component[][]{ - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name"), SwingConstants.RIGHT), name}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name"), SwingConstants.RIGHT), wordName}, - new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value"), SwingConstants.RIGHT), wordValue}, - new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method"), SwingConstants.RIGHT), calculateCombox} + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_MultiPie_Series_Name")), name}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Name")), wordName}, + new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Word_Value")), wordValue}, + new Component[]{new UILabel(Inter.getLocText("Chart-Summary_Method")), calculateCombox} }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components,rowSize,columnSize,24,6); this.setLayout(new BorderLayout()); + panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15)); this.add(panel, BorderLayout.CENTER); + this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight())); + } @Override From c6c494a28db7dc632912b748016d2eaae47edb36 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 21 Aug 2017 10:01:16 +0800 Subject: [PATCH 06/33] =?UTF-8?q?REPORT-3721=20=E5=8A=A0=E4=B8=AA=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E7=82=B9=E6=A3=80=E6=B5=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/errorinfo/ErrorInfoUploader.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java index 7865f6d525..a3033ee881 100644 --- a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java @@ -1,6 +1,7 @@ package com.fr.design.mainframe.errorinfo; import com.fr.base.FRContext; +import com.fr.base.FRCoreContext; import com.fr.general.*; import com.fr.general.http.HttpClient; import com.fr.json.JSONException; @@ -27,6 +28,7 @@ public class ErrorInfoUploader { public static final String FOLDER_NAME = "errorInfo"; private static ErrorInfoUploader collector; + private static boolean licSupport = true; static { GeneralContext.addEnvChangedListener(new EnvChangedListener() { @@ -35,6 +37,9 @@ public class ErrorInfoUploader { FRLogger.getLogger().addLogAppender(new ErrorInfoLogAppender()); } }); + + // 这个控制没啥意义, 主要在于宣传功能. + licSupport = VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support(); } private ErrorInfoUploader() { @@ -51,6 +56,11 @@ public class ErrorInfoUploader { // 从云中心更新最新的解决方案文件 private void checkUpdateSolution(){ + if (!licSupport) { + return; + } + + Thread updateThread = new Thread(new Runnable() { @Override public void run() { From 66fc37a0f226eda2a3ca069a4889bbc055e4d781 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 21 Aug 2017 10:01:35 +0800 Subject: [PATCH 07/33] 1 --- build.dev.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.dev.gradle b/build.dev.gradle index 1efdd55cc8..4add13aff8 100644 --- a/build.dev.gradle +++ b/build.dev.gradle @@ -3,7 +3,7 @@ tasks.withType(JavaCompile){ options.encoding = "UTF-8" } -def basicDir="../../" +def basicDir="../../ " def libDir="${basicDir}/finereport-lib-stable" //获取什么分支名 FileTree files =fileTree(dir:"./",include:"build.*.gradle") From e7132750d64795050329e6a6e3db85f858e1d68c Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Mon, 21 Aug 2017 10:01:59 +0800 Subject: [PATCH 08/33] 1 --- build.dev.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.dev.gradle b/build.dev.gradle index 4add13aff8..1efdd55cc8 100644 --- a/build.dev.gradle +++ b/build.dev.gradle @@ -3,7 +3,7 @@ tasks.withType(JavaCompile){ options.encoding = "UTF-8" } -def basicDir="../../ " +def basicDir="../../" def libDir="${basicDir}/finereport-lib-stable" //获取什么分支名 FileTree files =fileTree(dir:"./",include:"build.*.gradle") From d4de2ea2c82c38a4bcc5266530c36121f8e40b8f Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 21 Aug 2017 10:09:08 +0800 Subject: [PATCH 09/33] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=92=8C=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/UIDefaultTheme.java | 4 ++-- .../com/fr/design/images/buttonicon/minus.png | Bin 148 -> 177 bytes .../com/fr/design/images/buttonicon/plus.png | Bin 172 -> 165 bytes .../src/com/fr/start/BaseDesigner.java | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer_base/src/com/fr/design/gui/UIDefaultTheme.java b/designer_base/src/com/fr/design/gui/UIDefaultTheme.java index 7a9a523fc5..ae18ce654f 100644 --- a/designer_base/src/com/fr/design/gui/UIDefaultTheme.java +++ b/designer_base/src/com/fr/design/gui/UIDefaultTheme.java @@ -170,8 +170,8 @@ public class UIDefaultTheme extends DefaultMetalTheme { table.put("Tree.textForeground", ThemeUtils.NORMAL_FOREGROUND); table.put("Tree.selectionBackground", ThemeUtils.TEXT_SELECTED_BG_COLOR); table.put("Tree.selectionForeground", ThemeUtils.TEXT_SELECTED_TEXT_COLOR); - table.put("Tree.hash", new ColorUIResource(208, 205, 190)); - table.put("Tree.line", new ColorUIResource(208, 205, 190)); + table.put("Tree.hash", new ColorUIResource(240, 240,243)); + table.put("Tree.line", new ColorUIResource(240, 240,243)); } diff --git a/designer_base/src/com/fr/design/images/buttonicon/minus.png b/designer_base/src/com/fr/design/images/buttonicon/minus.png index 569e998491d9abb662bc63d42794b375b165e03d..4c428c07bc2b7f4aa2a7dbfa8a1ab7ded9ad0cbc 100644 GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}*`6+rAsV8| z2@<~=1fR90o}MPkd~=_HozdA7Cw{cgoolP5q47eL+lNVG$G89g|L=6zXXC@una85Z z_VJ-vgT?9T`r!;&RtzbJOc{BzdU|?t7`hr6yVxdhY*H&ZDxe$TF+pv?e69^1yl#pN Ysu7Bk4i_)!01|%O$WD@{VjKx9jP7LeL$-D$|{5)M8LnI`V zZ7M(A31e&fAID?C_}EPC50``0|7u22K{gl7q{f+xmoGnh;NU^V$3}mCd~AMrX=!$X uU5ua)!#b``$0?;pw36<$r5Kq#3u7qM6zXqqktEO?%p6k4yeVmpRDq`3b)IL;&c~%!v+QhQc=tnTYhQZoa-dZV Mp00i_>zopr01vS{RsaA1 literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VjKx9jP7LeL$-D$|(mY)pLnI`V zZ7M(A31e&fAID?C_}EPC50``0|7u3jg-o`#x*?1T{LX^x?CfnyVly~Su*_gGHdbzv zx34pZ*;T@;!yC>b%%Eve`bx$}f5x#5d?`#;2Lf1(1tS#$1RtBFFzUQn%TTjd+VN0G ROEb_$22WQ%mvv4FO#ttNE=T|X diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index c393237a77..e2c3a717d6 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -93,7 +93,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { initDefaultFont(); //PluginManager要在环境切换和模块启动之前初始化 - PluginManager.registerEnvListener(); +// PluginManager.registerEnvListener(); // 必须先初始化Env再去startModule, 不然会导致lic读取不到 ModuleContext.startModule(module2Start()); From 611702cb73a1663661dedf00f4e43d7da2efa36f Mon Sep 17 00:00:00 2001 From: hzzz Date: Mon, 21 Aug 2017 10:45:51 +0800 Subject: [PATCH 10/33] tmp --- designer_base/src/com/fr/start/BaseDesigner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/start/BaseDesigner.java b/designer_base/src/com/fr/start/BaseDesigner.java index e2c3a717d6..c393237a77 100644 --- a/designer_base/src/com/fr/start/BaseDesigner.java +++ b/designer_base/src/com/fr/start/BaseDesigner.java @@ -93,7 +93,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock { initDefaultFont(); //PluginManager要在环境切换和模块启动之前初始化 -// PluginManager.registerEnvListener(); + PluginManager.registerEnvListener(); // 必须先初始化Env再去startModule, 不然会导致lic读取不到 ModuleContext.startModule(module2Start()); From 5cdf4a3788f7c9b4074d1a5b10a221fd01fdd7b6 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 21 Aug 2017 11:07:52 +0800 Subject: [PATCH 11/33] =?UTF-8?q?REPORT-2897=209.0=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E4=BF=AE=E6=94=B9=20=E6=8E=A7=E4=BB=B6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=BD=91=E9=A1=B5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/actions/insert/flot/ChartFloatAction.java | 1 - .../design/mainframe/cell/settingpane/CellExpandAttrPane.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java index 80ce315255..afab2c69f3 100644 --- a/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java +++ b/designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java @@ -96,7 +96,6 @@ public class ChartFloatAction extends ElementCaseAction { } reportPane.getEditingElementCase().addFloatElement(newFloatElement); reportPane.setSelection(new FloatSelection(newFloatElement.getName())); - reportPane.fireTargetModified(); reportPane.fireSelectionChangeListener(); } catch (CloneNotSupportedException e) { FRLogger.getLogger().error("Error in Float"); diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java index 79c224ea32..0901bb31b9 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java @@ -199,7 +199,7 @@ public class CellExpandAttrPane extends AbstractCellAttrPane { // extendable - if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD-Expandable"))) { + if (ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_ExpandD_Expandable"))) { if (horizontalExpandableCheckBox.isSelected()) { if (verticalExpandableCheckBox.isSelected()) { cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE); From 26fe7472860806acb947b328635a33ce7eecb07a Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 21 Aug 2017 11:22:13 +0800 Subject: [PATCH 12/33] =?UTF-8?q?REPORT-3894=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E9=A2=9C=E8=89=B2=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E6=A1=86=E5=90=8D=E7=A7=B0=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/locale/designer.properties | 3 ++- .../src/com/fr/design/locale/designer_en_US.properties | 3 ++- .../src/com/fr/design/locale/designer_ja_JP.properties | 1 + .../src/com/fr/design/locale/designer_ko_KR.properties | 3 ++- .../src/com/fr/design/locale/designer_zh_CN.properties | 3 ++- .../src/com/fr/design/locale/designer_zh_TW.properties | 1 + .../src/com/fr/design/style/color/ColorSelectDetailPane.java | 2 +- .../src/com/fr/design/style/color/ColorSelectDialog.java | 3 ++- 8 files changed, 13 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/locale/designer.properties b/designer_base/src/com/fr/design/locale/designer.properties index 34857cbecc..d4aa147fa9 100644 --- a/designer_base/src/com/fr/design/locale/designer.properties +++ b/designer_base/src/com/fr/design/locale/designer.properties @@ -2126,4 +2126,5 @@ FS-Designer_DS_Filter_Even_Tip=Even_Tip FS-Designer_DS_Filter_Specify_Tip=Specify_Tip FR-Designer_Mobile-Height-Percent=Max Percent FR-Designer_Mobile-Height-Limit=Height Limit -FR-Designer-AlphaFine_NO_Result=no search result \ No newline at end of file +FR-Designer-AlphaFine_NO_Result=no search result +FR-Designer_Select_Color=Select Color \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_en_US.properties b/designer_base/src/com/fr/design/locale/designer_en_US.properties index e92cb1119c..b91d1d5b83 100644 --- a/designer_base/src/com/fr/design/locale/designer_en_US.properties +++ b/designer_base/src/com/fr/design/locale/designer_en_US.properties @@ -2122,4 +2122,5 @@ FR-Designer_Barcode_Size=Barcode_Size FS-Designer_DS_Filter_Odd_Tip=Odd_Tip FS-Designer_DS_Filter_Even_Tip=Even_Tip FS-Designer_DS_Filter_Specify_Tip=Specify_Tip -FR-Designer-AlphaFine_NO_Result=no search result \ No newline at end of file +FR-Designer-AlphaFine_NO_Result=no search result +FR-Designer_Select_Color=Select Color \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties index a6a3a7aa35..9a7fce54d2 100644 --- a/designer_base/src/com/fr/design/locale/designer_ja_JP.properties +++ b/designer_base/src/com/fr/design/locale/designer_ja_JP.properties @@ -2121,3 +2121,4 @@ FS-Designer_DS_Filter_Even_Tip= FS-Designer_DS_Filter_Specify_Tip= FR-Designer_Mobile-Height-Percent= FR-Designer_Mobile-Height-Limit= +FR-Designer_Select_Color= diff --git a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties index db819f4308..625f2aa42d 100644 --- a/designer_base/src/com/fr/design/locale/designer_ko_KR.properties +++ b/designer_base/src/com/fr/design/locale/designer_ko_KR.properties @@ -2121,4 +2121,5 @@ FS-Designer_DS_Filter_Odd_Tip= FS-Designer_DS_Filter_Even_Tip= FS-Designer_DS_Filter_Specify_Tip= FR-Designer_Mobile-Height-Percent= -FR-Designer_Mobile-Height-Limit= \ No newline at end of file +FR-Designer_Mobile-Height-Limit= +FR-Designer_Select_Color= \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties index 19bfad99a0..b8ce55213c 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_CN.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_CN.properties @@ -2133,4 +2133,5 @@ FR-Designer_Barcode_Size=\u6761\u5F62\u7801\u5927\u5C0F FS-Designer_DS_Filter_Odd_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5947\u6570\u96C6(1,3,5...) FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u9009\u62E9\u4E86\u5076\u6570\u96C6(2,4,6...) FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u4E3A1,2-3,5,8\uFF0C\u5E8F\u53F7\u4ECE1\u5F00\u59CB\uFF0C\u5185\u503C\u53C2\u6570$_count_\u8868\u793A\u603B\u4E2A\u6570 -FR-Designer-AlphaFine_NO_Result=\u65E0\u641C\u7D22\u7ED3\u679C \ No newline at end of file +FR-Designer-AlphaFine_NO_Result=\u65E0\u641C\u7D22\u7ED3\u679C +FR-Designer_Select_Color=\u9009\u62E9\u989C\u8272 \ No newline at end of file diff --git a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties index 4ae23d014d..86e2aeb7a6 100644 --- a/designer_base/src/com/fr/design/locale/designer_zh_TW.properties +++ b/designer_base/src/com/fr/design/locale/designer_zh_TW.properties @@ -2126,3 +2126,4 @@ FS-Designer_DS_Filter_Even_Tip=\u63D0\u793A\uFF1A\u5E8F\u865F\u5F9E1\u958B\u59CB FS-Designer_DS_Filter_Specify_Tip=\u63D0\u793A\uFF1A\u683C\u5F0F\u70BA1,2-3,5,8\uFF0C\u5E8F\u865F\u5F9E1\u958B\u59CB\uFF0C\u5185\u7F6E\u53C3\u6578$_count_\u8868\u793A\u7E02\u500B\u6578 M-New_FormBook=\u65B0\u589E\u6C7A\u7B56\u5831\u8868 FR-Designer-AlphaFine_NO_Result=\u7121\u641C\u7D22\u7D50\u679C +FR-Designer_Select_Color= diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java b/designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java index d2f4028f8a..58671be0a8 100644 --- a/designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java +++ b/designer_base/src/com/fr/design/style/color/ColorSelectDetailPane.java @@ -56,7 +56,7 @@ public class ColorSelectDetailPane extends BasicPane { @Override protected String title4PopupWindow() { - return null; + return Inter.getLocText("FR-Designer_Select_Color"); } protected void initComponents() { diff --git a/designer_base/src/com/fr/design/style/color/ColorSelectDialog.java b/designer_base/src/com/fr/design/style/color/ColorSelectDialog.java index 11a243b6cd..3d986fa718 100644 --- a/designer_base/src/com/fr/design/style/color/ColorSelectDialog.java +++ b/designer_base/src/com/fr/design/style/color/ColorSelectDialog.java @@ -112,7 +112,8 @@ public class ColorSelectDialog extends MiddleChartDialog{ doCancel(); } }); - + + this.setTitle(pane.title4PopupWindow()); GUICoreUtils.setWindowCenter(getOwner(), this); } From 1cf98eee4ef22e5742be5915b7097467727fd234 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 21 Aug 2017 14:51:32 +0800 Subject: [PATCH 13/33] =?UTF-8?q?REPORT-3736=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E8=AE=BE=E7=BD=AE=E7=AE=80=E4=BD=93=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E5=90=8E=E6=8B=AC=E5=8F=B7=E5=86=85=E5=AE=B9=E6=9C=AA=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/PreferencePane.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/file/PreferencePane.java b/designer_base/src/com/fr/design/actions/file/PreferencePane.java index bae1414524..51b8c374ae 100644 --- a/designer_base/src/com/fr/design/actions/file/PreferencePane.java +++ b/designer_base/src/com/fr/design/actions/file/PreferencePane.java @@ -75,13 +75,6 @@ public class PreferencePane extends BasicPane { private static final FRLevel[] LOG = {FRLevel.SEVERE, FRLevel.WARNING, FRLevel.INFO, FRLevel.DEBUG}; private static java.util.List LANGUAGE = new ArrayList<>(); - static { - Map map = Inter.getSupportLocaleMap(); - LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default")); - for(Locale locale : map.keySet()){ - LANGUAGE.add(getLocaledLanguage(map.get(locale), locale)); - } - }; private static int designerEnvLanguageIndex; // 打开设置对话框时,设计器使用的语言 private boolean languageChanged; // 是否修改了设计器语言设置 @@ -116,6 +109,17 @@ public class PreferencePane extends BasicPane { public PreferencePane() { this.initComponents(); + this.initLanguageItems(); + } + + // 语言选项 + private void initLanguageItems() { + LANGUAGE.clear(); + Map map = Inter.getSupportLocaleMap(); + LANGUAGE.add(Inter.getLocText("FR-Designer_Language_Default")); + for(Locale locale : map.keySet()){ + LANGUAGE.add(getLocaledLanguage(map.get(locale), locale)); + } } protected void initComponents() { From cdeebddccd2ee44ba785598849d77befe4300cd3 Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 21 Aug 2017 17:15:05 +0800 Subject: [PATCH 14/33] =?UTF-8?q?REPORT-2354=20=E5=B0=86=E5=8E=9F=E6=9D=A5?= =?UTF-8?q?=E5=AD=98=E5=9C=A8finereportEnv=E4=B8=AD=E7=9A=84=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E4=BF=A1=E6=81=AF=E7=A7=BB=E5=88=B0config.xml?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/ActiveKeyGenerator.java | 5 +- .../mainframe/InformationCollector.java | 5 +- .../alphafine/component/AlphaFineDialog.java | 3 +- .../design/mainframe/bbs/BBSLoginDialog.java | 8 ++- .../fr/design/mainframe/bbs/ExitLabel.java | 6 +- .../design/mainframe/bbs/UserInfoLabel.java | 26 +++---- .../fr/design/mainframe/bbs/UserInfoPane.java | 12 ++-- .../errorinfo/ErrorInfoLogAppender.java | 3 +- .../src/com/fr/design/DesignerEnvManager.java | 70 +------------------ .../src/com/fr/design/bbs/BBSLoginUtils.java | 31 ++++++++ .../com/fr/design/extra/LoginWebBridge.java | 60 ++++++++-------- .../fr/design/extra/PluginFromStorePane.java | 8 +-- .../fr/design/extra/PluginOperateUtils.java | 7 +- .../com/fr/design/extra/PluginUpdatePane.java | 7 +- .../com/fr/design/extra/PluginWebBridge.java | 20 +++--- .../templateinfo/TemplateInfoCollector.java | 3 +- 16 files changed, 114 insertions(+), 160 deletions(-) create mode 100644 designer_base/src/com/fr/design/bbs/BBSLoginUtils.java diff --git a/designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java b/designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java index 3a57b11ec5..a941660aa1 100644 --- a/designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java +++ b/designer/src/com/fr/design/mainframe/ActiveKeyGenerator.java @@ -1,7 +1,6 @@ package com.fr.design.mainframe; -import com.fr.base.BaseUtils; +import com.fr.base.ConfigManager; import com.fr.design.DesignerEnvManager; -import com.fr.design.mainframe.bbs.BBSConstants; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.stable.StableUtils; @@ -102,7 +101,7 @@ public class ActiveKeyGenerator { HashMap para = new HashMap(); para.put("uuid", envManager.getUUID()); para.put("key", key); - para.put("username", envManager.getBBSName()); + para.put("username", ConfigManager.getProviderInstance().getBbsUsername()); HttpClient hc = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("verify.code"), para); if (timeout != -1) { hc.setTimeout(timeout); diff --git a/designer/src/com/fr/design/mainframe/InformationCollector.java b/designer/src/com/fr/design/mainframe/InformationCollector.java index 4bac9a15b0..a5912da56b 100644 --- a/designer/src/com/fr/design/mainframe/InformationCollector.java +++ b/designer/src/com/fr/design/mainframe/InformationCollector.java @@ -3,6 +3,7 @@ */ package com.fr.design.mainframe; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.data.core.db.DBUtils; import com.fr.data.core.db.dialect.DialectFactory; @@ -134,7 +135,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { content.put(XML_UUID, envManager.getUUID()); content.put(XML_JAR, GeneralUtils.readBuildNO()); content.put(XML_VERSION, ProductConstants.RELEASE_VERSION); - content.put(XML_USERNAME, envManager.getBBSName()); + content.put(XML_USERNAME, ConfigManager.getProviderInstance().getBbsUsername()); content.put(XML_KEY, envManager.getActivationKey()); content.put(XML_OS, System.getProperty("os.name")); @@ -254,7 +255,7 @@ public class InformationCollector implements XMLReadable, XMLWriter { } DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); - content.put("username", envManager.getBBSName()); + content.put("username", ConfigManager.getProviderInstance().getBbsUsername()); content.put("uuid", envManager.getUUID()); content.put("functions", functionArray); diff --git a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java index 83945d324e..ed0bc57316 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java +++ b/designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.alphafine.component; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.dialog.UIDialog; @@ -776,7 +777,7 @@ public class AlphaFineDialog extends UIDialog { */ private void sendToServer(String searchKey, AlphaCellModel cellModel) { if (cellModel.isNeedToSendToServer()) { - String username = DesignerEnvManager.getEnvManager().getBBSName(); + String username = ConfigManager.getProviderInstance().getBbsUsername(); String uuid = DesignerEnvManager.getEnvManager().getUUID(); String activityKey = DesignerEnvManager.getEnvManager().getActivationKey(); String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime()); diff --git a/designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java b/designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java index 3946b73e5d..f5401c0282 100644 --- a/designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java +++ b/designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java @@ -1,6 +1,8 @@ package com.fr.design.mainframe.bbs; -import com.fr.design.DesignerEnvManager; +import com.fr.base.ConfigManager; +import com.fr.base.FRContext; +import com.fr.design.bbs.BBSLoginUtils; import com.fr.design.dialog.UIDialog; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.ActionLabel; @@ -207,8 +209,8 @@ public class BBSLoginDialog extends UIDialog { // 登录成功 private void loginSuccess() { - DesignerEnvManager.getEnvManager().setBBSPassword(String.valueOf(passField.getPassword())); - userInfoLabel.setUserName(nameField.getText()); + String password = String.valueOf(passField.getPassword()); + BBSLoginUtils.bbsLogin(nameField.getText(), password); userInfoLabel.getUserInfoPane().markSignIn(nameField.getText()); BBSLoginDialog.this.setVisible(false); } diff --git a/designer/src/com/fr/design/mainframe/bbs/ExitLabel.java b/designer/src/com/fr/design/mainframe/bbs/ExitLabel.java index c3436755a2..a830d3332d 100644 --- a/designer/src/com/fr/design/mainframe/bbs/ExitLabel.java +++ b/designer/src/com/fr/design/mainframe/bbs/ExitLabel.java @@ -9,14 +9,13 @@ import java.awt.event.MouseEvent; import com.fr.base.BaseUtils; -import com.fr.design.DesignerEnvManager; +import com.fr.design.bbs.BBSLoginUtils; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.Inter; -import com.fr.stable.StringUtils; /** * @author neil @@ -61,8 +60,7 @@ public class ExitLabel extends UILabel{ } private void clearLoingInformation(){ - DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY); - DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY); + BBSLoginUtils.bbsLogout(); } private void updateInfoPane(){ diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java index 4d58b3db67..b4ba82399d 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java @@ -3,8 +3,10 @@ */ package com.fr.design.mainframe.bbs; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; +import com.fr.design.bbs.BBSLoginUtils; import com.fr.design.extra.*; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.imenu.UIMenuItem; @@ -16,12 +18,7 @@ import com.fr.general.DateUtils; import com.fr.general.Inter; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; -import com.fr.plugin.manage.bbs.BBSPluginLogin; -import com.fr.plugin.manage.bbs.BBSUserInfo; -import com.fr.stable.EncodeConstants; -import com.fr.stable.OperatingSystem; -import com.fr.stable.StableUtils; -import com.fr.stable.StringUtils; +import com.fr.stable.*; import javax.swing.*; import java.awt.*; @@ -77,7 +74,7 @@ public class UserInfoLabel extends UILabel { public UserInfoLabel(UserInfoPane userInfoPane) { this.userInfoPane = userInfoPane; - String userName = DesignerEnvManager.getEnvManager().getBBSName(); + String userName = ConfigManager.getProviderInstance().getBbsUsername(); this.addMouseListener(userInfoAdapter); this.setHorizontalAlignment(SwingConstants.CENTER); this.setText(userName); @@ -117,10 +114,9 @@ public class UserInfoLabel extends UILabel { } private void clearLoginInformation() { - DesignerEnvManager.getEnvManager().setBBSName(StringUtils.EMPTY); - DesignerEnvManager.getEnvManager().setBBSPassword(StringUtils.EMPTY); - DesignerEnvManager.getEnvManager().setInShowBBsName(StringUtils.EMPTY); - DesignerEnvManager.getEnvManager().setBbsUid(DEFAULT_BBS_UID); + ConfigManager.getProviderInstance().setInShowBBsName(StringUtils.EMPTY); + ConfigManager.getProviderInstance().setBbsUid(DEFAULT_BBS_UID); + BBSLoginUtils.bbsLogout(); } private void updateInfoPane() { @@ -192,8 +188,6 @@ public class UserInfoLabel extends UILabel { return; } - //往designerenvmanger里写一下 - DesignerEnvManager.getEnvManager().setBBSName(userName); this.userName = userName; } @@ -238,8 +232,7 @@ public class UserInfoLabel extends UILabel { @Override public void mouseClicked(MouseEvent e) { - BBSUserInfo bbsUserInfo = BBSPluginLogin.getInstance().getUserInfo(); - userName = bbsUserInfo == null ? "" : bbsUserInfo.getUserName(); + userName = ConfigManager.getProviderInstance().getBbsUsername(); if (StringUtils.isNotEmpty(userName)) { UIPopupMenu menu = new UIPopupMenu(); menu.setOnlyText(true); @@ -265,10 +258,9 @@ public class UserInfoLabel extends UILabel { UIMenuItem closeOther = new UIMenuItem(Inter.getLocText("FR-Designer-BBSLogin_Switch-Account")); closeOther.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { - BBSPluginLogin.getInstance().logOut(); + BBSLoginUtils.bbsLogout(); UserLoginContext.fireLoginContextListener(); } - }); menu.add(priviteMessage); menu.add(closeOther); diff --git a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java index a638ac3e42..711fd634dd 100644 --- a/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java +++ b/designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java @@ -11,6 +11,7 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.design.dialog.BasicPane; @@ -18,8 +19,6 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.general.DateUtils; import com.fr.general.FRLogger; import com.fr.general.Inter; -import com.fr.plugin.manage.bbs.BBSPluginLogin; -import com.fr.plugin.manage.bbs.BBSUserInfo; import com.fr.stable.StringUtils; @@ -77,9 +76,8 @@ public class UserInfoPane extends BasicPane{ @Override public void run() { - String username = DesignerEnvManager.getEnvManager().getBBSName(); - String inShowUsername = DesignerEnvManager.getEnvManager().getInShowBBsName(); - if (StringUtils.isEmpty(username) && StringUtils.isEmpty(inShowUsername)){ + String username = ConfigManager.getProviderInstance().getBbsUsername(); + if (StringUtils.isEmpty(username)){ markUnSignIn(); } else { markSignIn(username); @@ -133,7 +131,7 @@ public class UserInfoPane extends BasicPane{ FRContext.getLogger().error(e.getMessage()); } - String userName = DesignerEnvManager.getEnvManager().getBBSName(); + String userName = ConfigManager.getProviderInstance().getBbsUsername(); if(StringUtils.isNotEmpty(userName)){ return; } @@ -169,8 +167,6 @@ public class UserInfoPane extends BasicPane{ * */ public void markSignIn(String userName){ - String password = DesignerEnvManager.getEnvManager().getBBSPassword(); - BBSPluginLogin.getInstance().login(new BBSUserInfo(userName, password)); this.userInfoLabel.setText(userName); this.userInfoLabel.setUserName(userName); this.userInfoLabel.setOpaque(true); diff --git a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java index f01bb669e6..26ae4d61fd 100644 --- a/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java +++ b/designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.errorinfo; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.base.io.IOFile; import com.fr.base.io.XMLReadHelper; @@ -38,7 +39,7 @@ public class ErrorInfoLogAppender extends AppenderSkeleton { this.layout = new org.apache.log4j.PatternLayout("%d{HH:mm:ss} %t %p [%c] %m%n"); DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); - this.username = envManager.getBBSName(); + this.username = ConfigManager.getProviderInstance().getBbsUsername(); this.uuid = envManager.getUUID(); this.activekey = envManager.getActivationKey(); } diff --git a/designer_base/src/com/fr/design/DesignerEnvManager.java b/designer_base/src/com/fr/design/DesignerEnvManager.java index d02d41abf4..0725f8e833 100644 --- a/designer_base/src/com/fr/design/DesignerEnvManager.java +++ b/designer_base/src/com/fr/design/DesignerEnvManager.java @@ -89,14 +89,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { private int westRegionContainerWidth = 240; private String encryptionKey; private String jdkHome; - //当前设计器用户的论坛昵称 - private String bbsName; - //当前设计器用户的论坛密码 - private String bbsPassword; - //当前设计器用户的论坛ID - private int bbsUid; - //当前设计器用户的昵称显示(带消息) - private String inShowBBsName; + //上一次登录弹窗的时间, 为了控制一天只弹一次窗口 private String lastShowBBSTime; //上一次资讯弹窗时间, 为了控制一天只弹一次 @@ -1145,37 +1138,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { this.jdkHome = home; } - public String getBBSName() { - return bbsName; - } - - public void setBBSName(String bbsName) { - this.bbsName = bbsName; - } - - public String getBBSPassword() { - return bbsPassword; - } - - public void setBBSPassword(String bbsPassword) { - this.bbsPassword = bbsPassword; - } - - public int getBbsUid() { - return bbsUid; - } - - public void setBbsUid(int bbsUid) { - this.bbsUid = bbsUid; - } - - public void setInShowBBsName(String inShowBBsName) { - this.inShowBBsName = inShowBBsName; - } - - public String getInShowBBsName() { - return inShowBBsName; - } public String getLastShowBBSTime() { return lastShowBBSTime; @@ -1256,19 +1218,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } } - private void readBBSName(XMLableReader reader){ - String tmpVal; - if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { - this.bbsName = tmpVal; - } - } - private void readBBSPassword(XMLableReader reader){ - String tmpVal; - if (StringUtils.isNotBlank(tmpVal = reader.getElementValue())) { - this.bbsPassword = CodeUtils.passwordDecode(tmpVal); - } - } private void readLastBBSTime(XMLableReader reader){ String tmpVal; @@ -1325,11 +1275,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { readEncrytionKey(reader); } else if ("jdkHome".equals(name)) { this.jdkHome = reader.getElementValue(); - } else if ("bbsName".equals(name)){ - readBBSName(reader); - } else if ("bbsPassword".equals(name)){ - readBBSPassword(reader); - } else if ("lastBBSTime".equals(name)){ + }else if ("lastBBSTime".equals(name)){ readLastBBSTime(reader); } else if ("lastBBSNewsTime".equals(name)){ readLastBBSNewsTime(reader); @@ -1736,18 +1682,6 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { //写论坛相关的两个属性 private void writeBBSRelated(XMLPrintWriter writer){ - if (StringUtils.isNotBlank(bbsName)) { - writer.startTAG("bbsName"); - writer.textNode(bbsName); - writer.end(); - } - - if (StringUtils.isNotBlank(bbsPassword)){ - writer.startTAG("bbsPassword"); - writer.textNode(CodeUtils.passwordEncode(bbsPassword)); - writer.end(); - } - if (StringUtils.isNotEmpty(this.lastShowBBSTime)){ writer.startTAG("lastBBSTime"); writer.textNode(lastShowBBSTime); diff --git a/designer_base/src/com/fr/design/bbs/BBSLoginUtils.java b/designer_base/src/com/fr/design/bbs/BBSLoginUtils.java new file mode 100644 index 0000000000..b767024727 --- /dev/null +++ b/designer_base/src/com/fr/design/bbs/BBSLoginUtils.java @@ -0,0 +1,31 @@ +package com.fr.design.bbs; + +import com.fr.base.ConfigManager; +import com.fr.base.FRContext; +import com.fr.stable.StringUtils; + +/** + * Created by ibm on 2017/8/21. + */ +public class BBSLoginUtils { + + public static void bbsLogin(String username, String password){ + try{ + ConfigManager.getProviderInstance().setBbsUsername(username); + ConfigManager.getProviderInstance().setBbsPassword(password); + FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance()); + }catch (Exception e){ + FRContext.getLogger().error(e.getMessage()); + } + } + + public static void bbsLogout(){ + try{ + ConfigManager.getProviderInstance().setBbsUsername(StringUtils.EMPTY); + ConfigManager.getProviderInstance().setBbsPassword(StringUtils.EMPTY); + FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance()); + }catch (Exception e){ + FRContext.getLogger().error(e.getMessage()); + } + } +} diff --git a/designer_base/src/com/fr/design/extra/LoginWebBridge.java b/designer_base/src/com/fr/design/extra/LoginWebBridge.java index 549cb17632..d7e53c0056 100644 --- a/designer_base/src/com/fr/design/extra/LoginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/LoginWebBridge.java @@ -1,16 +1,15 @@ package com.fr.design.extra; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; +import com.fr.design.bbs.BBSLoginUtils; import com.fr.design.dialog.UIDialog; import com.fr.design.extra.ucenter.Client; import com.fr.design.extra.ucenter.XMLHelper; import com.fr.design.gui.ilable.UILabel; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; -import com.fr.json.JSONObject; -import com.fr.plugin.manage.bbs.BBSPluginLogin; -import com.fr.plugin.manage.bbs.BBSUserInfo; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; import javafx.scene.web.WebEngine; @@ -20,7 +19,6 @@ import java.awt.*; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URLEncoder; -import java.util.HashMap; import java.util.LinkedList; public class LoginWebBridge { @@ -59,7 +57,7 @@ public class LoginWebBridge { private String userName; public LoginWebBridge() { - String username = DesignerEnvManager.getEnvManager().getBBSName(); + String username = ConfigManager.getProviderInstance().getBbsUsername(); setUserName(username, uiLabel); } @@ -130,16 +128,16 @@ public class LoginWebBridge { */ public void setMessageCount(int count) { if (count == MIN_MESSAGE_COUNT) { - uiLabel.setText(DesignerEnvManager.getEnvManager().getBBSName()); - DesignerEnvManager.getEnvManager().setInShowBBsName(DesignerEnvManager.getEnvManager().getBBSName()); + uiLabel.setText(ConfigManager.getProviderInstance().getBbsUsername()); + ConfigManager.getProviderInstance().setInShowBBsName(ConfigManager.getProviderInstance().getBbsUsername()); return; } this.messageCount = count; StringBuilder sb = new StringBuilder(); - sb.append(StringUtils.BLANK).append(DesignerEnvManager.getEnvManager().getBBSName()) + sb.append(StringUtils.BLANK).append(ConfigManager.getProviderInstance().getBbsUsername()) .append("(").append(this.messageCount) .append(")").append(StringUtils.BLANK); - DesignerEnvManager.getEnvManager().setInShowBBsName(sb.toString()); + ConfigManager.getProviderInstance().setInShowBBsName(sb.toString()); uiLabel.setText(sb.toString()); } @@ -278,11 +276,9 @@ public class LoginWebBridge { if (list.size() > 0) { int $uid = Integer.parseInt(list.get(0)); if ($uid > 0) { - DesignerEnvManager.getEnvManager().setBbsUid($uid); - DesignerEnvManager.getEnvManager().setBBSName(username); - DesignerEnvManager.getEnvManager().setInShowBBsName(username); - DesignerEnvManager.getEnvManager().setBBSPassword(password); - BBSPluginLogin.getInstance().login(new BBSUserInfo(username, password)); + ConfigManager.getProviderInstance().setBbsUid($uid); + ConfigManager.getProviderInstance().setInShowBBsName(username); + BBSLoginUtils.bbsLogin(username, password); return LOGININ;//登录成功,0 } else if ($uid == -1) { return USERNAME_NOT_EXSIT;//用户名不存在,-1 @@ -318,24 +314,28 @@ public class LoginWebBridge { public void getLoginInfo(String userInfo) { org.json.JSONObject jo = new org.json.JSONObject(userInfo); String status = jo.get("status").toString(); - if (status.equals(LOGIN_SUCCESS)) { - String username = jo.get("username").toString(); - int uid = Integer.parseInt(jo.get("uid") == null ? "" : jo.get("uid").toString()); - closeWindow(); - closeQQWindow(); - pluginuiLabel.setText(username); - DesignerEnvManager.getEnvManager().setBBSName(username); - DesignerEnvManager.getEnvManager().setBbsUid(uid); - DesignerEnvManager.getEnvManager().setInShowBBsName(username); - BBSPluginLogin.getInstance().login(new BBSUserInfo(username, "")); - } else if (status.equals(LOGIN_FAILED)) { - //账号没有QQ授权 - closeQQWindow(); - try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("QQ_binding"))); - } catch (Exception exp) { + try{ + if (status.equals(LOGIN_SUCCESS)) { + String username = jo.get("username").toString(); + int uid = Integer.parseInt(jo.get("uid") == null ? "" : jo.get("uid").toString()); + closeWindow(); + closeQQWindow(); + pluginuiLabel.setText(username); + ConfigManager.getProviderInstance().setBbsUid(uid); + ConfigManager.getProviderInstance().setInShowBBsName(username); + BBSLoginUtils.bbsLogin(username, ""); + } else if (status.equals(LOGIN_FAILED)) { + //账号没有QQ授权 + closeQQWindow(); + try { + Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind("QQ_binding"))); + } catch (Exception exp) { + } } + }catch (Exception e){ + FRContext.getLogger().error(e.getMessage()); } + } public void openUrlAtLocalWebBrowser(WebEngine eng, String url) { diff --git a/designer_base/src/com/fr/design/extra/PluginFromStorePane.java b/designer_base/src/com/fr/design/extra/PluginFromStorePane.java index f3e0de7992..20001cad3c 100644 --- a/designer_base/src/com/fr/design/extra/PluginFromStorePane.java +++ b/designer_base/src/com/fr/design/extra/PluginFromStorePane.java @@ -1,5 +1,6 @@ package com.fr.design.extra; +import com.fr.base.ConfigManager; import com.fr.base.FRContext; import com.fr.design.extra.tradition.callback.UpdateOnlineCallback; import com.fr.design.gui.frpane.UITabbedPane; @@ -9,11 +10,10 @@ import com.fr.general.Inter; import com.fr.json.JSONObject; import com.fr.plugin.context.PluginMarker; import com.fr.plugin.manage.PluginManager; -import com.fr.plugin.manage.bbs.BBSPluginLogin; import com.fr.plugin.manage.control.PluginTaskResult; import com.fr.plugin.manage.control.ProgressCallback; import com.fr.plugin.view.PluginView; - +import com.fr.stable.StringUtils; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.File; @@ -188,10 +188,10 @@ public class PluginFromStorePane extends PluginAbstractLoadingViewPane implements Serializable, XM private HashMap getNewConsumingMap(String templateID, long openTime, long timeConsume) { HashMap consumingMap = new HashMap<>(); - String username = DesignerEnvManager.getEnvManager().getBBSName(); + String username = ConfigManager.getProviderInstance().getBbsUsername(); String uuid = DesignerEnvManager.getEnvManager().getUUID(); String activitykey = DesignerEnvManager.getEnvManager().getActivationKey(); String createTime = new SimpleDateFormat("yyyy-MM-dd HH:mm").format(Calendar.getInstance().getTime()); From 564109f5e320f74b353cb6a96a4bcd521f222a77 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 21 Aug 2017 17:19:30 +0800 Subject: [PATCH 15/33] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E9=AA=8C=E6=94=B6=3D=E3=80=8B=E7=BB=A7=E6=89=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/EastRegionContainerPane.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index 3aec09d459..a8daa2dc2d 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -53,6 +53,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { private JPanel defaultPane; // "无可用配置项"面板 private JPanel defaultAuthorityPane; // "该元素不支持权限编辑" + private PropertyItem selectedItem; // 当前被选中的属性配置项 public enum PropertyMode { REPORT, // 报表 @@ -374,6 +375,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer { * 刷新右面板 */ public void refreshRightPane() { + // 可继承,就继承 + if (selectedItem != null && selectedItem.isVisible() && selectedItem.isEnabled() && !selectedItem.isPoppedOut()) { + propertyCard.show(rightPane, selectedItem.getName()); + return; + } + + // 不可继承时,选中第一个可用 tab boolean hasAvailableTab = false; boolean hasEnabledTab = false; for (String name : propertyItemMap.keySet()) { @@ -388,6 +396,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } } } + // 无可用 tab 时,显示提示文字 if (!hasAvailableTab) { resetPropertyIcons(); if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) { @@ -593,6 +602,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { button.setIcon(BaseUtils.readIcon(getBtnIconUrl())); button.setBackground(selectedBtnBackground); button.setOpaque(true); + selectedItem = this; } private void initButton() { From d624d79e52c31ddbeac65f05888a3facfc7038b9 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 21 Aug 2017 19:27:48 +0800 Subject: [PATCH 16/33] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E9=AA=8C=E6=94=B6=3D=E3=80=8B=E5=B1=9E=E6=80=A7=E6=A0=8F?= =?UTF-8?q?=E6=94=B6=E8=B5=B7=EF=BC=8C=E6=B2=A1=E6=9C=89tab=E6=98=AF?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/EastRegionContainerPane.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index a8daa2dc2d..a45b5db0f3 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -220,6 +220,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { @Override public void onResize() { + if (!isRightPaneVisible()) { + resetPropertyIcons(); + } else { + refreshRightPane(); + } for (PropertyItem item : propertyItemMap.values()) { item.onResize(); } @@ -377,6 +382,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public void refreshRightPane() { // 可继承,就继承 if (selectedItem != null && selectedItem.isVisible() && selectedItem.isEnabled() && !selectedItem.isPoppedOut()) { + selectedItem.setTabButtonSelected(); propertyCard.show(rightPane, selectedItem.getName()); return; } @@ -426,6 +432,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } } + private void resetPropertyIcons() { for (PropertyItem item : propertyItemMap.values()) { item.resetButtonIcon(); From 8d61a5ef3d49568200642f3c0eb41df48f029598 Mon Sep 17 00:00:00 2001 From: MoMeak Date: Mon, 21 Aug 2017 19:32:01 +0800 Subject: [PATCH 17/33] =?UTF-8?q?REPORT-3983=20[9.0=E4=B8=80=E8=BD=AE?= =?UTF-8?q?=E5=9B=9E=E5=BD=92]=E9=80=89=E4=B8=AD=E4=B8=80=E7=89=87?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=EF=BC=8C=E6=A0=B7=E5=BC=8F=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E5=A4=96=E8=BE=B9=E6=A1=86=E3=80=81=E5=86=85=E8=BE=B9?= =?UTF-8?q?=E6=A1=86=E6=98=BE=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/cell/settingpane/style/CustomStylePane.java | 4 ++-- designer_base/src/com/fr/design/gui/style/BorderPane.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java b/designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java index b899071d6a..d25788c870 100644 --- a/designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java +++ b/designer/src/com/fr/design/mainframe/cell/settingpane/style/CustomStylePane.java @@ -111,7 +111,7 @@ public class CustomStylePane extends MultiTabPane