Browse Source

REPORT-132916 fix:仪表盘、气泡图漏翻新面板补充

fbp/release
Levy.Xie-解安森 3 months ago
parent
commit
19e7961e3c
  1. 9
      designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java
  2. 10
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java
  3. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java
  4. 30
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java
  5. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  6. 12
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

9
designer-base/src/main/java/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -1,6 +1,7 @@
package com.fr.design.gui.ibutton;
import com.fine.swing.ui.layout.Column;
import com.fine.swing.ui.layout.Layouts;
import com.fine.swing.ui.layout.Row;
import com.fine.swing.ui.layout.Spacer;
import com.fine.theme.light.ui.FineRoundBorder;
@ -213,24 +214,24 @@ public class UIButtonGroup<T> extends Column implements GlobalNameObserver, UIOb
int col = cols[row];
Row rowContainer = new Row();
for (int j = 0; j < col; j++) {
rowContainer.add(cell(getLabelButtonList().get(currentIndex)).weight(1.0));
Layouts.populate(rowContainer, cell(getLabelButtonList().get(currentIndex)).weight(1.0));
currentIndex++;
if (j != col - 1 && !inToolbar) {
rowContainer.add(createDivider());
}
}
add(rowContainer);
Layouts.populate(this, cell(rowContainer).weight(1.0));
if (row != cols.length - 1) {
add(createDivider());
}
}
}
private List<UIToggleButton> getLabelButtonList() {
protected List<UIToggleButton> getLabelButtonList() {
return labelButtonList;
}
private Spacer createDivider() {
protected Spacer createDivider() {
Spacer spacer = new Spacer(FineUIScale.scale(1));
spacer.setBorder(new LineBorder(FineUIUtils.getUIColor("defaultBorderColor", "Component.borderColor")));
return spacer;

10
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/ChartDataFilterPane.java

@ -1,6 +1,5 @@
package com.fr.design.mainframe.chart.gui.data;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Utils;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
@ -26,6 +25,7 @@ import java.awt.Dimension;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* 图表数据 分类 系列 过滤界面.
@ -60,7 +60,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
}
protected void initLayout() {
this.setLayout(new BorderLayout());
this.setLayout(new BorderLayout(0, scale(10)));
if (!paneList.isEmpty()) {
if (nameArray.length > 1) {
this.add(tabPane, BorderLayout.NORTH);
@ -251,7 +251,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
cell(preDataNumPane),
cell(notShowNull),
cell(presentPane)
).with(it -> it.setBorder(new ScaledEmptyBorder(10, 0, 0, 0))).getComponent();
).getComponent();
}
@ -356,7 +356,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = FineUIScale.scale(FIL_HEIGHT);
dim.height = scale(FIL_HEIGHT);
return dim;
}
@ -410,7 +410,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
cell(preDataNumPane),
cell(notShowNull),
cell(presentPane)
).with(it -> it.setBorder(new ScaledEmptyBorder(10, 0, 0, 0))).getComponent();
).getComponent();
}

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/BubblePlotReportDataContentPane.java

@ -5,11 +5,10 @@ import com.fr.chart.chartattr.BubblePlot;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.BubbleReportDefinition;
import com.fr.chart.chartdata.BubbleSeriesValue;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
@ -26,9 +25,7 @@ public class BubblePlotReportDataContentPane extends AbstractReportDataContentPa
public BubblePlotReportDataContentPane(ChartDataPane parent) {
initEveryPane();
filterPane = new ChartDataFilterPane(new BubblePlot(), parent);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"),filterPane);
panel.setBorder(getSidesBorder());
filterPane.setBorder(getFilterPaneBorder());
JPanel panel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
this.add(panel, "0,6,2,4");
}

30
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/report/MeterPlotReportDataContentPane.java

@ -1,18 +1,20 @@
package com.fr.design.mainframe.chart.gui.data.report;
import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot;
import com.fr.chart.chartdata.MeterReportDefinition;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
@ -37,31 +39,15 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan
private ChartDataFilterPane filterPane;
public MeterPlotReportDataContentPane(ChartDataPane parent) {
// initEveryPane();
//
// List list = new ArrayList();
// list.add(new Object[] { singCateName, "" });
// list.add(new Object[] { singNeedleValue, "" });
// seriesPane.populateBean(list);
//
// seriesPane.noAddUse();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = getRowSize();
Component[][] components = getShowComponents();
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 24, 6);
panel.setBorder(BorderFactory.createEmptyBorder(0, 24, 5, 8));
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
panel.setBorder(BorderFactory.createCompoundBorder(FineBorderFactory.createDefaultUnderlineBorder(),
new ScaledEmptyBorder(0, 0, 10, 0)));
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.NORTH);
filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
JPanel pane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
pane.setBorder(getSidesBorder());
filterPane.setBorder(getFilterPaneBorder());
JPanel pane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
this.add(pane, BorderLayout.CENTER);
}

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java

@ -48,7 +48,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
private Column boxPane;
public MeterPlotTableDataContentPane(ChartDataPane parent) {
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
this.setLayout(new BorderLayout());
nameBox = new UIComboBoxWithNone();
nameBox.setSelectedIndex(nameBox.getItemCount() -1);
@ -59,6 +59,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
boxPane = new Column();
boxPane.setSpacing(10);
boxPane.add(getJSeparator());
JPanel namePane = createPaneWithLabel(Toolkit.i18nText(METER_NAME), getNameComponent());
boxPane.add(namePane);
@ -71,6 +72,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
final JPanel customPane = createPaneWithLabel(StringUtils.EMPTY, custom);
boxPane.add(customPane);
boxPane.add(getJSeparator());
customPane.setVisible(false);
@ -86,9 +88,8 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
}
});
JPanel jPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane, true);
JPanel jPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
this.add(getJSeparator(), BorderLayout.NORTH);
this.add(boxPane, BorderLayout.CENTER);
this.add(jPanel, BorderLayout.SOUTH);

12
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -4,7 +4,6 @@ import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.FRContext;
import com.fr.chart.base.TextAttr;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIColorButton;
@ -15,7 +14,6 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
@ -23,9 +21,10 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font;
import static com.fine.theme.utils.FineUIScale.scale;
public class ChartTextAttrPane extends BasicPane {
private static final long serialVersionUID = 6731679928019436869L;
public static final int FONT_START = 6;
@ -202,12 +201,9 @@ public class ChartTextAttrPane extends BasicPane {
}
protected void initComponents() {
Component[] components1 = new Component[]{
fontColor, italic, bold
};
JPanel buttonPane = new JPanel(new BorderLayout());
JPanel buttonPane = new JPanel(new BorderLayout(scale(10), 0));
buttonPane.add(fontSizeComboBox, BorderLayout.CENTER);
buttonPane.add(GUICoreUtils.createFlowPane(components1, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
buttonPane.add(FineLayoutBuilder.createHorizontalLayout(10, fontColor, italic, bold), BorderLayout.EAST);
this.setLayout(new BorderLayout());
this.add(getContentPane(buttonPane), BorderLayout.CENTER);

Loading…
Cancel
Save