Browse Source

Pull request #14889: REPORT-135294【fr-fbp回归】FR图表,悬浮弹窗,行距过窄

Merge in DESIGN/design from ~RENEKTON/design:fbp/release to fbp/release

* commit '408930fa5ad9291c368c8037686f9a43bec16a30':
  修改布局悬浮弹窗的布局
fbp/release
Renekton-张世豪 2 months ago
parent
commit
cfe628d001
  1. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartFloatPositionPane.java

21
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartFloatPositionPane.java

@ -1,11 +1,11 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Chart;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.stable.StringUtils;
@ -13,11 +13,15 @@ import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* 悬浮位置 标题和图例用到
*/
public class VanChartFloatPositionPane extends BasicBeanPane<Chart> {
private static final long serialVersionUID = -4773313488161065678L;
private static final int VERTICAL_GAP = 8;
private UISpinner floatPosition_x;
private UISpinner floatPosition_y;
@ -25,24 +29,21 @@ public class VanChartFloatPositionPane extends BasicBeanPane<Chart> {
this.setLayout(new BorderLayout());
this.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_XY_From_UpLeft")), BorderLayout.CENTER);
this.add(createCustomFloatPositionPane(), BorderLayout.SOUTH);
this.add(column(VERTICAL_GAP,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_XY_From_UpLeft"))),
cell(createCustomFloatPositionPane())).getComponent());
}
private JPanel createCustomFloatPositionPane(){
floatPosition_x = new UISpinner(0,100,1,0);
floatPosition_y = new UISpinner(0,100,1,0);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p,p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_positionX")+": "),floatPosition_x},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_positionY")+": "),floatPosition_y}
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(VERTICAL_GAP, components, new double[]{LayoutConstants.LEFT_WEIGHT, LayoutConstants.RIGHT_WEIGHT});
}
public void setFloatPosition_x(double floatPosition_x) {

Loading…
Cancel
Save