Browse Source

无jira 超链面板布局优化

fbp/release
Levy.Xie-解安森 3 months ago
parent
commit
47c9963e06
  1. 38
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java

38
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java

@ -1,5 +1,8 @@
package com.fr.design.chart.series.SeriesCondition.impl;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Parameter;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.web.ChartHyperPoplink;
@ -9,18 +12,13 @@ import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.itextfield.UINumberField;
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;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ParameterProvider;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
/**
* 图表弹出超链, 悬浮窗属性设置界面.
@ -52,41 +50,31 @@ public class ChartHyperPopAttrPane extends AbstractChartAttrPane {
@Override
protected JPanel createContentPane() {
JPanel pane = new JPanel();
pane.setLayout(FRGUIPaneFactory.createBorderLayout());
pane.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
pane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
titleField = new UITextField(15);
titleField.setPreferredSize(new Dimension(200, 20));
widthField = new UINumberField(4);
widthField.setColumns(10);
widthField.setPreferredSize(new Dimension(200, 20));
heightField = new UINumberField(4);
heightField.setColumns(10);
heightField.setPreferredSize(new Dimension(200, 20));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { p,f};
double[] rowSize = { p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Title") + ":", SwingConstants.RIGHT), titleField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ":", SwingConstants.RIGHT), widthField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height") + ":", SwingConstants.RIGHT), heightField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Title") + ":"), titleField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ":"), widthField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height") + ":"), heightField},
};
widthField.setText(String.valueOf(DEFAULT_V_VALUE));
heightField.setText(String.valueOf(DEFAULT_H_VALUE));
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
JPanel northPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
pane.add(northPane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(paraType, valueEditorPane, valueRenderPane);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(200, 200));
pane.add(parameterViewPane, BorderLayout.CENTER);
pane.add(FineUIUtils.wrapComponentWithTitle(parameterViewPane,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")), BorderLayout.CENTER);
return pane;
}

Loading…
Cancel
Save