From a4a8d4eb17dd7a7ca8f9ce3449eed0a62bccd5b2 Mon Sep 17 00:00:00 2001 From: zheng Date: Tue, 22 Jan 2019 22:21:56 +0800 Subject: [PATCH] =?UTF-8?q?CHART-2809=20=E5=A4=A7=E5=B1=8F=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=92=AD=E6=94=BE=20design?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hyperlink/AbstractHyperLinkPane.java | 38 ++++++++++++++++++ .../impl/ChartHyperRelateCellLinkPane.java | 36 +++++++++++++++-- .../impl/ChartHyperRelateFloatLinkPane.java | 35 ++++++++++++++-- .../impl/FormHyperlinkNorthPane.java | 3 +- .../impl/FormHyperlinkPane.java | 40 +++++++++++++++++-- 5 files changed, 140 insertions(+), 12 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperLinkPane.java b/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperLinkPane.java index bdd46a9ecd..7344288d6b 100644 --- a/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperLinkPane.java +++ b/designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperLinkPane.java @@ -4,9 +4,15 @@ import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.gui.frpane.ReportletParameterViewPane; +import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itableeditorpane.ParameterTableModel; +import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.js.JavaScript; +import com.fr.js.LinkAnimateType; +import javax.swing.JPanel; import java.util.HashMap; /** @@ -16,6 +22,7 @@ public abstract class AbstractHyperLinkPane extends FurtherBasicBeanPane { private HashMap hyperLinkEditorMap; private boolean needRenamePane = false; protected ReportletParameterViewPane parameterViewPane; + private UIButtonGroup animateTypeUIButtonGroup; public AbstractHyperLinkPane(HashMap hyperLinkEditorMap, boolean needRenamePane) { @@ -41,6 +48,37 @@ public abstract class AbstractHyperLinkPane extends FurtherBasicBeanPane { public void reset() { } + protected boolean needAnimatePane() { + return false; + } + + protected JPanel createAnimateTypeUIButtonGroup() { + animateTypeUIButtonGroup = new UIButtonGroup( + new String[]{LinkAnimateType.RELOAD.toLocaleString(), LinkAnimateType.INCREMENT.toLocaleString()}, + new LinkAnimateType[]{LinkAnimateType.RELOAD, LinkAnimateType.INCREMENT}); + + animateTypeUIButtonGroup.setSelectedIndex(0); + JPanel jp = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); + + jp.add(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Link_Animate_Type"))); + jp.add(animateTypeUIButtonGroup); + + return jp; + } + + protected void populateAnimateType(LinkAnimateType animateType) { + if (animateTypeUIButtonGroup != null && animateType != LinkAnimateType.NONE) { + animateTypeUIButtonGroup.setSelectedItem(animateType); + } + } + + protected LinkAnimateType updateAnimateType() { + if (animateTypeUIButtonGroup != null) { + return animateTypeUIButtonGroup.getSelectedItem(); + } + return LinkAnimateType.NONE; + } + protected int getChartParaType() { return hyperLinkEditorMap != null ? ParameterTableModel.CHART_NORMAL_USE : ParameterTableModel.NO_CHART_USE; } diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java index 897aef8f79..c69a4660f6 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java @@ -8,12 +8,12 @@ import com.fr.design.gui.itextfield.UITextField; import com.fr.design.hyperlink.AbstractHyperLinkPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; - import com.fr.stable.ColumnRow; import com.fr.stable.ParameterProvider; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Dimension; import java.util.HashMap; import java.util.List; @@ -53,6 +53,10 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane targetFrameComboBox = formHyperlinkEditors == null ? new UIComboBox() : new UIComboBox(getFormHyperlinkEditNames()); targetFrameComboBox.setRenderer(new DefaultListCellRenderer()); double p = TableLayout.PREFERRED; - double[] rowSize = {p, p, p}; + double[] rowSize = {p, p}; double[] columnSize = {p, TableLayout.FILL}; Component[][] components; if (!this.needRenamePane) { diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java index a9e209fc3d..f93e3c20ec 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/FormHyperlinkPane.java @@ -7,13 +7,13 @@ import com.fr.design.hyperlink.AbstractHyperLinkPane; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.ElementCaseEditorProvider; - import com.fr.js.FormHyperlinkProvider; import com.fr.stable.ParameterProvider; import com.fr.stable.bridge.StableFactory; -import javax.swing.*; -import java.awt.*; +import javax.swing.BorderFactory; +import javax.swing.JPanel; +import java.awt.BorderLayout; import java.util.HashMap; public class FormHyperlinkPane extends AbstractHyperLinkPane { @@ -35,7 +35,15 @@ public class FormHyperlinkPane extends AbstractHyperLinkPane