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..757596f797 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,33 @@ public abstract class AbstractHyperLinkPane extends FurtherBasicBeanPane { public void reset() { } + 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..185f776159 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,12 +53,18 @@ 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..f815094c3d 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,13 +35,18 @@ public class FormHyperlinkPane extends AbstractHyperLinkPane