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; package com.fr.design.gui.ibutton;
import com.fine.swing.ui.layout.Column; 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.Row;
import com.fine.swing.ui.layout.Spacer; import com.fine.swing.ui.layout.Spacer;
import com.fine.theme.light.ui.FineRoundBorder; import com.fine.theme.light.ui.FineRoundBorder;
@ -213,24 +214,24 @@ public class UIButtonGroup<T> extends Column implements GlobalNameObserver, UIOb
int col = cols[row]; int col = cols[row];
Row rowContainer = new Row(); Row rowContainer = new Row();
for (int j = 0; j < col; j++) { 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++; currentIndex++;
if (j != col - 1 && !inToolbar) { if (j != col - 1 && !inToolbar) {
rowContainer.add(createDivider()); rowContainer.add(createDivider());
} }
} }
add(rowContainer); Layouts.populate(this, cell(rowContainer).weight(1.0));
if (row != cols.length - 1) { if (row != cols.length - 1) {
add(createDivider()); add(createDivider());
} }
} }
} }
private List<UIToggleButton> getLabelButtonList() { protected List<UIToggleButton> getLabelButtonList() {
return labelButtonList; return labelButtonList;
} }
private Spacer createDivider() { protected Spacer createDivider() {
Spacer spacer = new Spacer(FineUIScale.scale(1)); Spacer spacer = new Spacer(FineUIScale.scale(1));
spacer.setBorder(new LineBorder(FineUIUtils.getUIColor("defaultBorderColor", "Component.borderColor"))); spacer.setBorder(new LineBorder(FineUIUtils.getUIColor("defaultBorderColor", "Component.borderColor")));
return spacer; 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; package com.fr.design.mainframe.chart.gui.data;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.chart.chartdata.TopDefinitionProvider; 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.cell;
import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row; 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() { protected void initLayout() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout(0, scale(10)));
if (!paneList.isEmpty()) { if (!paneList.isEmpty()) {
if (nameArray.length > 1) { if (nameArray.length > 1) {
this.add(tabPane, BorderLayout.NORTH); this.add(tabPane, BorderLayout.NORTH);
@ -251,7 +251,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
cell(preDataNumPane), cell(preDataNumPane),
cell(notShowNull), cell(notShowNull),
cell(presentPane) 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 @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize(); Dimension dim = super.getPreferredSize();
dim.height = FineUIScale.scale(FIL_HEIGHT); dim.height = scale(FIL_HEIGHT);
return dim; return dim;
} }
@ -410,7 +410,7 @@ public class ChartDataFilterPane extends ThirdTabPane<ChartCollection> {
cell(preDataNumPane), cell(preDataNumPane),
cell(notShowNull), cell(notShowNull),
cell(presentPane) 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.chartattr.ChartCollection;
import com.fr.chart.chartdata.BubbleReportDefinition; import com.fr.chart.chartdata.BubbleReportDefinition;
import com.fr.chart.chartdata.BubbleSeriesValue; 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.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -26,9 +25,7 @@ public class BubblePlotReportDataContentPane extends AbstractReportDataContentPa
public BubblePlotReportDataContentPane(ChartDataPane parent) { public BubblePlotReportDataContentPane(ChartDataPane parent) {
initEveryPane(); initEveryPane();
filterPane = new ChartDataFilterPane(new BubblePlot(), parent); filterPane = new ChartDataFilterPane(new BubblePlot(), parent);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"),filterPane); JPanel panel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
panel.setBorder(getSidesBorder());
filterPane.setBorder(getFilterPaneBorder());
this.add(panel, "0,6,2,4"); 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; 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.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot; import com.fr.chart.chartattr.MeterPlot;
import com.fr.chart.chartdata.MeterReportDefinition; 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.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane; import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; 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.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane; import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
@ -37,31 +39,15 @@ public class MeterPlotReportDataContentPane extends AbstractReportDataContentPan
private ChartDataFilterPane filterPane; private ChartDataFilterPane filterPane;
public MeterPlotReportDataContentPane(ChartDataPane parent) { 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(); Component[][] components = getShowComponents();
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 24, 6); JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
panel.setBorder(BorderFactory.createEmptyBorder(0, 24, 5, 8)); panel.setBorder(BorderFactory.createCompoundBorder(FineBorderFactory.createDefaultUnderlineBorder(),
new ScaledEmptyBorder(0, 0, 10, 0)));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.NORTH); this.add(panel, BorderLayout.NORTH);
filterPane = new ChartDataFilterPane(new MeterPlot(), parent); filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
JPanel pane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane); JPanel pane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
pane.setBorder(getSidesBorder());
filterPane.setBorder(getFilterPaneBorder());
this.add(pane, BorderLayout.CENTER); 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; private Column boxPane;
public MeterPlotTableDataContentPane(ChartDataPane parent) { public MeterPlotTableDataContentPane(ChartDataPane parent) {
this.setLayout(new BorderLayout(0, FineUIScale.scale(10))); this.setLayout(new BorderLayout());
nameBox = new UIComboBoxWithNone(); nameBox = new UIComboBoxWithNone();
nameBox.setSelectedIndex(nameBox.getItemCount() -1); nameBox.setSelectedIndex(nameBox.getItemCount() -1);
@ -59,6 +59,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
boxPane = new Column(); boxPane = new Column();
boxPane.setSpacing(10); boxPane.setSpacing(10);
boxPane.add(getJSeparator());
JPanel namePane = createPaneWithLabel(Toolkit.i18nText(METER_NAME), getNameComponent()); JPanel namePane = createPaneWithLabel(Toolkit.i18nText(METER_NAME), getNameComponent());
boxPane.add(namePane); boxPane.add(namePane);
@ -71,6 +72,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
final JPanel customPane = createPaneWithLabel(StringUtils.EMPTY, custom); final JPanel customPane = createPaneWithLabel(StringUtils.EMPTY, custom);
boxPane.add(customPane); boxPane.add(customPane);
boxPane.add(getJSeparator());
customPane.setVisible(false); 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(boxPane, BorderLayout.CENTER);
this.add(jPanel, BorderLayout.SOUTH); 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.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.chart.base.TextAttr; import com.fr.chart.base.TextAttr;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIColorButton; 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.layout.TableLayout;
import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
@ -23,9 +21,10 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font; import java.awt.Font;
import static com.fine.theme.utils.FineUIScale.scale;
public class ChartTextAttrPane extends BasicPane { public class ChartTextAttrPane extends BasicPane {
private static final long serialVersionUID = 6731679928019436869L; private static final long serialVersionUID = 6731679928019436869L;
public static final int FONT_START = 6; public static final int FONT_START = 6;
@ -202,12 +201,9 @@ public class ChartTextAttrPane extends BasicPane {
} }
protected void initComponents() { protected void initComponents() {
Component[] components1 = new Component[]{ JPanel buttonPane = new JPanel(new BorderLayout(scale(10), 0));
fontColor, italic, bold
};
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(fontSizeComboBox, BorderLayout.CENTER); 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.setLayout(new BorderLayout());
this.add(getContentPane(buttonPane), BorderLayout.CENTER); this.add(getContentPane(buttonPane), BorderLayout.CENTER);

Loading…
Cancel
Save