From aa8b671b35b0b44be56b9438cb9e8380b6c5eaa5 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 11 Aug 2020 13:51:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-37235=20=E7=89=88=E6=9C=AC=E8=A7=84?= =?UTF-8?q?=E8=8C=83-=E6=9B=B4=E6=96=B0=E5=8D=87=E7=BA=A7=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E6=8F=90=E7=A4=BA=E7=89=88=E6=9C=AC=E5=8F=B7=E4=B8=8D?= =?UTF-8?q?=E7=AC=A6=E5=90=88=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/update/push/DesignerUpdateInfo.java | 8 +++++++- .../resources/com/fr/design/ui/update/push/pushUpdate.css | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java b/designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java index a136f279b..3f7c23cd3 100644 --- a/designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java +++ b/designer-base/src/main/java/com/fr/design/update/push/DesignerUpdateInfo.java @@ -24,6 +24,7 @@ class DesignerUpdateInfo { private final String currentVersion; // 当前版本 private final String latestVersion; // 最新版本 + private final String latestFullVersion; // 最新版本的完整信息 private final String lastIgnoredVersion; // 最近一次跳过的版本 private final String pushVersion; // 推送版本 @@ -34,6 +35,7 @@ class DesignerUpdateInfo { DesignerUpdateInfo(String currentVersion, String latestVersion, String lastIgnoredVersion, JSONObject pushData) { this.currentVersion = currentVersion; this.latestVersion = latestVersion; + this.latestFullVersion = initLatestFullVersion(); this.lastIgnoredVersion = lastIgnoredVersion; this.pushVersion = pushData.optString(KEY_VERSION); @@ -65,7 +67,7 @@ class DesignerUpdateInfo { return latestVersion; } - String getLatestFullVersion() { + String initLatestFullVersion() { try { String url = CloudCenter.getInstance().acquireUrlByKind("jar10.new.update"); if (StringUtils.isBlank(url)) { @@ -85,6 +87,10 @@ class DesignerUpdateInfo { return StringUtils.EMPTY; } + String getLatestFullVersion() { + return latestFullVersion; + } + String getLastIgnoredVersion() { return lastIgnoredVersion; } diff --git a/designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.css b/designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.css index 58c03ecba..f8a9eb713 100644 --- a/designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.css +++ b/designer-base/src/main/resources/com/fr/design/ui/update/push/pushUpdate.css @@ -1,6 +1,6 @@ body { padding-left: 30px; - padding-top: 30px; + padding-top: 25px; color: white; background-size: 100% 100% !important; -moz-background-size: 100% 100% !important; From 4e444f507a11b7408cb363f0da2009f105b6f5a3 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Tue, 11 Aug 2020 14:02:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?CHART-14922=20=E6=98=8E=E7=BB=86=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9D=A2=E6=9D=BF=E4=BD=BF=E7=94=A8=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E4=BB=A3=E6=9B=BF=E4=B8=8B=E6=8B=89=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table/BoxPlotTableSeriesTypeUsePane.java | 98 ++++++++++++++----- 1 file changed, 74 insertions(+), 24 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java index b9993440f..ab0bcfae3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/box/data/table/BoxPlotTableSeriesTypeUsePane.java @@ -5,9 +5,10 @@ import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartdata.MoreNameCDDefinition; import com.fr.chart.chartdata.NormalTableDataDefinition; import com.fr.chart.chartdata.OneValueCDDefinition; +import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.constants.LayoutConstants; -import com.fr.design.gui.frpane.UIComboBoxPane; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.BoldFontTextLabel; import com.fr.design.gui.ilable.UILabel; @@ -15,7 +16,6 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.chart.gui.ChartDataPane; import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper; import com.fr.design.utils.gui.GUICoreUtils; -import com.fr.design.utils.gui.UIComponentUtils; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.box.data.VanBoxTableDefinition; import com.fr.stable.ArrayUtils; @@ -24,47 +24,91 @@ import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.JPanel; import java.awt.BorderLayout; +import java.awt.CardLayout; import java.awt.Component; import java.awt.Dimension; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.ArrayList; import java.util.List; -public class BoxPlotTableSeriesTypeUsePane extends UIComboBoxPane { +public class BoxPlotTableSeriesTypeUsePane extends BasicBeanPane { - private static boolean NEED_SUMMERY = false; + private static final boolean NEED_SUMMERY = false; private UIComboBox categoryCombox; private BoxPlotTableSeriesNameUseFieldValuePane nameFieldValuePane; private BoxPlotTableSeriesNameUseFieldNamePane nameFieldNamePane; + private UIButtonGroup seriesFrom; + private JPanel cardPane; + public BoxPlotTableSeriesTypeUsePane() { - cards = initPaneList(); initComponents(); + initLayout(); initListener(); } - protected void initLayout() { - this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM)); + private void initComponents() { + nameFieldValuePane = new BoxPlotTableSeriesNameUseFieldValuePane(); + nameFieldNamePane = new BoxPlotTableSeriesNameUseFieldNamePane(); + + nameFieldValuePane.relayoutPane(NEED_SUMMERY); + nameFieldNamePane.relayoutPane(NEED_SUMMERY); + + cardPane = new JPanel(new CardLayout()) { + public Dimension getPreferredSize() { + if (seriesFrom.getSelectedIndex() == 0) { + return nameFieldValuePane.getPreferredSize(); + } else { + return nameFieldNamePane.getPreferredSize(); + } + } + }; cardPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15)); + cardPane.add(nameFieldValuePane, nameFieldValuePane.title4PopupWindow()); + cardPane.add(nameFieldNamePane, nameFieldNamePane.title4PopupWindow()); + + seriesFrom = new UIButtonGroup<>(new String[]{nameFieldValuePane.title4PopupWindow(), nameFieldNamePane.title4PopupWindow()}); + seriesFrom.setSelectedIndex(0); + + addItemChangeEvent(); + } + + private void addItemChangeEvent() { + seriesFrom.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + checkCardPane(); + } + }); + } + + private void checkCardPane() { + comboBoxItemStateChanged(); + + CardLayout cl = (CardLayout) cardPane.getLayout(); + if (seriesFrom.getSelectedIndex() == 0) { + cl.show(cardPane, nameFieldValuePane.title4PopupWindow()); + } else { + cl.show(cardPane, nameFieldNamePane.title4PopupWindow()); + } + } + + private void initLayout() { + this.setLayout(new BorderLayout(4, LayoutConstants.VGAP_MEDIUM)); this.add(createNorthPane(), BorderLayout.NORTH); this.add(createCenterPane(), BorderLayout.CENTER); this.add(cardPane, BorderLayout.SOUTH); } - protected UIComboBox createComboBox() { - UIComboBox uiComboBox = new UIComboBox(); - UIComponentUtils.setPreferedWidth(uiComboBox, 100); - return uiComboBox; - } - private JPanel createNorthPane() { JPanel north = new JPanel(new BorderLayout(4, 0)); - north.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); + north.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, getBackground())); UILabel label = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Style_Category")); label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, ChartDataPane.LABEL_HEIGHT)); @@ -74,8 +118,8 @@ public class BoxPlotTableSeriesTypeUsePane extends UIComboBoxPane