diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java index 0d11eb491f..1a14821d00 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/EnvFileTree.java @@ -77,7 +77,7 @@ public class EnvFileTree extends RefreshableJTree { } this.setIcon(FileTreeIcon.getIconWithExpandAttr(node, expanded)); } else { - this.setIcon(FileTreeIcon.getFolderHalfImageIcon()); + this.setIcon(FileTreeIcon.getFolderHalfImageIcon(expanded)); } this.setText(name); } else if (userObj == PENDING) { diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileTreeIcon.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileTreeIcon.java index ca26e435aa..92de91aa1e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileTreeIcon.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileTreeIcon.java @@ -49,9 +49,10 @@ public class FileTreeIcon { public static final Icon FRM_FILE_LOCK_ICON = new LazyIcon("frm_locked"); public static final Icon FVS_FILE_LOCK_ICON = new LazyIcon("fvs_locked"); - // TODO: 以下Icon视觉暂未提供,需提供后替换 + public static final Icon FOLDER_HALF_IMAGE_ICON = new LazyIcon("folder_half_authority"); + public static final Icon FOLDER_HALF_IMAGE_ICON_OPEN = new LazyIcon("folder_half_authority_open"); + public static final Icon BLANK_IMAGE_ICON = BaseUtils.readIcon("/com/fr/design/images/gui/blank.gif"); - public static final Icon FOLDER_HALF_IMAGE_ICON = IconUtils.readIcon("/com/fr/design/standard/fileicon/folder_half_authority.svg"); public static final Icon CPTX_LOCKED_ICON = IconUtils.readIcon("/com/fr/design/standard/fileicon/cptx_icon_locked.svg"); public static final LockIcon FOLDER_LOCK_ICON = @@ -130,7 +131,17 @@ public class FileTreeIcon { } public static Icon getFolderHalfImageIcon() { - return FOLDER_HALF_IMAGE_ICON; + return getFolderHalfImageIcon(false); + } + + /** + * 获取文件夹有部分权限时的图标 + * + * @param isExpand 文件夹是否已打开 + * @return 图标 + */ + public static Icon getFolderHalfImageIcon(boolean isExpand) { + return isExpand ? FOLDER_HALF_IMAGE_ICON_OPEN : FOLDER_HALF_IMAGE_ICON; } /** diff --git a/designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority.svg b/designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority.svg new file mode 100644 index 0000000000..438cd6c89b --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority_open.svg b/designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority_open.svg new file mode 100644 index 0000000000..c919f1a181 --- /dev/null +++ b/designer-base/src/main/resources/com/fine/theme/icon/filetree/folder_half_authority_open.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json index aaa6df6d59..33fc126994 100644 --- a/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json +++ b/designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json @@ -448,7 +448,9 @@ "layout_left": "layout/layout_left.svg", "layout_right": "layout/layout_right.svg", "layout_top_right": "layout/layout_top_right.svg", - "theme_edit": "theme_edit.svg" + "theme_edit": "theme_edit.svg", + "folder_half_authority" : "filetree/folder_half_authority.svg", + "folder_half_authority_open" : "filetree/folder_half_authority_open.svg" } } diff --git a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java index e1b5a40612..8846dc0cc3 100644 --- a/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java +++ b/designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java @@ -74,7 +74,7 @@ public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane { } protected JPanel getContentPane () { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] row = {p, p, p, p, p}; - double[] col = {p, f}; - - return TableLayoutHelper.createTableLayoutPane(getComponent(), row, col); + return FineLayoutBuilder.compatibleTableLayout(10, getComponent(), new double[]{1.2, 3}); } protected Component[][] getComponent () { return new Component[][]{ - new Component[]{null, null}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Min_Diameter")), minDiameter}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Max_Diameter")), maxDiameter}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Shadow")), shadow}, diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java index 57176c256c..7822cb3443 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartColumnSeriesPane.java @@ -79,7 +79,7 @@ public class VanChartColumnSeriesPane extends VanChartAbstractPlotSeriesPane { isFixedWidth.addActionListener(e -> checkColumnWidth()); isFillWithImage.addActionListener(e -> checkImagePane()); - return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Filled_With_Image"), borderPane); + return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Filled_With_Image"), borderPane, true); } private void checkAll() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java index 86766676b4..6ff6f35b67 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/column/VanChartCustomStackAndAxisConditionPane.java @@ -1,29 +1,26 @@ package com.fr.van.chart.column; +import com.fine.theme.utils.FineLayoutBuilder; +import com.fine.theme.utils.FineUIUtils; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.chart.chartglyph.ConditionAttr; import com.fr.data.condition.AbstractCondition; import com.fr.data.condition.ListCondition; import com.fr.design.beans.BasicBeanPane; import com.fr.design.condition.LiteConditionPane; import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.plugin.chart.base.AttrSeriesStackAndAxis; import com.fr.van.chart.designer.style.series.VanChartSeriesConditionPane; -import javax.swing.BorderFactory; -import javax.swing.BoxLayout; import javax.swing.JPanel; -import javax.swing.ScrollPaneConstants; +import java.awt.BorderLayout; import java.awt.Component; -import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; + /** * 堆积和坐标轴设置 */ @@ -42,36 +39,26 @@ public class VanChartCustomStackAndAxisConditionPane extends BasicBeanPane(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_YES"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_NO")}); isPercentStacked = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_YES"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_NO")}); - double p = TableLayout.PREFERRED; - double[] columnSize = {p, p}; - double[] rowSize = {p, p, p, p}; - return TableLayoutHelper.createTableLayoutPane(getDeployComponents(), rowSize, columnSize); + return FineLayoutBuilder.compatibleTableLayout(10, getDeployComponents(), new double[]{1.2, 3}); } protected Component[][] getDeployComponents() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartAreaSeriesFillColorPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartAreaSeriesFillColorPane.java index 241798bef3..7d4ad238f6 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartAreaSeriesFillColorPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartAreaSeriesFillColorPane.java @@ -1,14 +1,14 @@ package com.fr.van.chart.designer.component; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.layout.TableLayout; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.base.AttrAreaSeriesFillColorBackground; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.background.VanChartMarkerBackgroundPane; import javax.swing.JPanel; @@ -24,14 +24,9 @@ public class VanChartAreaSeriesFillColorPane extends BasicPane { private UINumberDragPane transparent; public VanChartAreaSeriesFillColorPane() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] row = {p,p}; - double[] col = {f}; fillColorPane = new VanChartMarkerBackgroundPane(){ protected Component[][] getPaneComponents() { return new Component[][]{ - new Component[]{null, null}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Fill_Color")), typeComboBox}, new Component[]{null, centerPane}, }; @@ -39,9 +34,10 @@ public class VanChartAreaSeriesFillColorPane extends BasicPane { }; transparent = new UINumberDragPaneWithPercent(0, 100); - JPanel transparentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alpha"), transparent); + JPanel transparentPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, + new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Alpha")), transparent); - this.setLayout(new BorderLayout()); + this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10)); this.add(fillColorPane, BorderLayout.NORTH); this.add(transparentPane, BorderLayout.CENTER); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java index 1c02408a3f..54445cceab 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java @@ -38,7 +38,6 @@ import com.fr.stable.Constants; import com.fr.stable.CoreConstants; import com.fr.stable.StableUtils; import com.fr.van.chart.config.DefaultStyleHelper4Van; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.VanChartHtmlLabelPane; import com.fr.van.chart.designer.style.VanChartStylePane; import com.fr.van.chart.designer.style.axis.component.VanChartCategoryStylePaneWithCheckBox; @@ -372,19 +371,15 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane { maxProportion = new UINumberDragPaneWithPercent(0, 100, 1); axisLimitSize = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Limit"), Toolkit.i18nText("Fine-Design_Chart_Not_Limit")}); - JPanel limitSizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Area_Size"), axisLimitSize); - maxProportionPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Max_Proportion"), maxProportion, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH); - maxProportionPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0)); - JPanel panel = new JPanel(new BorderLayout()); - panel.add(limitSizePane, BorderLayout.NORTH); - panel.add(maxProportionPane, BorderLayout.CENTER); + JPanel limitSizePane = FineLayoutBuilder.createHorizontalLayout(10, new double[]{1.2, 3}, + new UILabel(Toolkit.i18nText("Fine-Design_Chart_Area_Size")), axisLimitSize); + maxProportionPane = FineLayoutBuilder.createHorizontalLayout(10, new double[]{1.2, 3}, + new UILabel(Toolkit.i18nText("Fine-Design_Chart_Max_Proportion")), maxProportion); + JPanel panel = column(10, + cell(limitSizePane), cell(maxProportionPane) + ).getComponent(); - axisLimitSize.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - checkMaxProPortionUse(); - } - }); + axisLimitSize.addActionListener(e -> checkMaxProPortionUse()); return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Display_Strategy"), panel, true); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java index 1664b21ecf..368c9bfddf 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java @@ -10,6 +10,7 @@ import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.imenu.UIMenuItem; import com.fr.design.gui.imenu.UIPopupMenu; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.VanChartAttrHelper; @@ -56,7 +57,7 @@ public class VanChartAxisButtonPane extends BasicBeanPane { public VanChartAxisButtonPane(VanChartAxisPane vanChartAxisPane) { this.parent = vanChartAxisPane; - this.setLayout(new BorderLayout()); + this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(10, 0)); addButton = new AddButton(new LazyIcon("add_popup")); JPanel eastPane = new JPanel(new BorderLayout()); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java index e4ceae7fa9..62afe15d2e 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java @@ -1,5 +1,8 @@ package com.fr.van.chart.designer.style.background; +import com.fine.swing.ui.layout.Column; +import com.fine.theme.utils.FineLayoutBuilder; +import com.fine.theme.utils.FineUIUtils; import com.fr.base.BaseFormula; import com.fr.base.Utils; import com.fr.chart.base.AttrColor; @@ -14,12 +17,8 @@ import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.chart.UISpinnerWithPx; import com.fr.design.gui.style.FRFontPane; import com.fr.design.i18n.Toolkit; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.ColorSelectBox; import com.fr.design.utils.DesignUtils; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.FRFont; import com.fr.general.GeneralUtils; import com.fr.plugin.chart.VanChartAttrHelper; @@ -29,10 +28,10 @@ import com.fr.stable.Constants; import com.fr.stable.StableUtils; import com.fr.van.chart.designer.component.LineTypeComboBox; -import javax.swing.BoxLayout; import javax.swing.JPanel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; @@ -108,26 +107,24 @@ public class VanChartAlertValuePane extends BasicBeanPane { private void doLayoutPane() { this.removeAll(); - this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); + this.setLayout(new BorderLayout()); + Column column = new Column(); + column.setSpacing(10); + this.add(column, BorderLayout.CENTER); + //警戒线设置 - JPanel top = FRGUIPaneFactory.createBorderLayout_L_Pane(); - this.add(top); - top.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Set") + ":", null)); - top.add(createTopPane()); + Component top = FineUIUtils.wrapComponentWithTitle(createTopPane(), Toolkit.i18nText("Fine-Design_Chart_Alert_Set")); + column.add(top); + //提示文字 - JPanel bottom = FRGUIPaneFactory.createBorderLayout_L_Pane(); - this.add(bottom); - bottom.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Chart_Alert_Text") + ":", null)); - bottom.add(createBottomPane()); + Component bottom = FineUIUtils.wrapComponentWithTitle(createBottomPane(), Toolkit.i18nText("Fine-Design_Chart_Alert_Text")); + column.add(bottom); } protected JPanel createTopPane() { - double p = TableLayout.PREFERRED; - double[] columnSize = {p, p}; - double[] rowSize = {p, p, p, p, p}; Component[][] components = getTopPaneComponents(); - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); } protected Component[][] getTopPaneComponents() { @@ -141,10 +138,6 @@ public class VanChartAlertValuePane extends BasicBeanPane { } private JPanel createBottomPane() { - alertTextPosition.setSelectedIndex(0); - double p = TableLayout.PREFERRED; - double[] columnSize = {p, p}; - double[] rowSize = {p, p, p, p, p}; Component[][] components = new Component[][]{ new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Layout_Position")), alertTextPosition}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Content")), alertText}, @@ -153,7 +146,7 @@ public class VanChartAlertValuePane extends BasicBeanPane { new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), fontColor}, }; - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); } private void checkPositionPane() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaBackgroundPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaBackgroundPane.java index 9c332c3e5e..70049a4422 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaBackgroundPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaBackgroundPane.java @@ -1,12 +1,14 @@ package com.fr.van.chart.designer.style.background; import com.fine.theme.utils.FineLayoutBuilder; +import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Plot; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.chart.PaneTitleConstants; import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.van.chart.designer.AbstractVanChartScrollPane; @@ -15,7 +17,6 @@ import com.fr.van.chart.designer.component.background.VanChartBackgroundPaneWith import com.fr.van.chart.designer.component.border.VanChartBorderWithRadiusPane; import com.fr.van.chart.designer.style.background.radar.VanChartRadarAxisAreaPane; -import javax.swing.BorderFactory; import javax.swing.JPanel; import java.awt.BorderLayout; import java.awt.Color; @@ -44,7 +45,7 @@ public class VanChartAreaBackgroundPane extends AbstractVanChartScrollPane" + Toolkit.i18nText("Fine-Design_Chart_Background_Tooltip") + ""); tooltipLabel.setForeground(Color.gray); - tooltipLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 5, 10)); contentPane.add(tooltipLabel, BorderLayout.NORTH); tooltipLabel.setVisible(false); } @@ -87,7 +87,8 @@ public class VanChartAreaBackgroundPane extends AbstractVanChartScrollPane { checkCardPane(); } }); - JPanel intervalPane = new JPanel(new BorderLayout(0, 6)); + JPanel intervalPane = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10)); JPanel panel1 = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(Toolkit.i18nText("Fine-Design_Chart_Interval_Background")), isDefaultIntervalBackground); intervalPane.add(panel1, BorderLayout.NORTH); diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java index 42fcdad8eb..f561ce2626 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartCustomIntervalBackgroundPane.java @@ -1,5 +1,7 @@ package com.fr.van.chart.designer.style.background; +import com.fine.theme.utils.FineLayoutBuilder; +import com.fine.theme.utils.FineUIUtils; import com.fr.base.BaseFormula; import com.fr.base.Utils; import com.fr.design.beans.BasicBeanPane; @@ -9,19 +11,14 @@ import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.ColorSelectBox; -import com.fr.design.utils.gui.GUICoreUtils; import com.fr.plugin.chart.VanChartAttrHelper; import com.fr.plugin.chart.attr.axis.VanChartCustomIntervalBackground; import com.fr.van.chart.designer.TableLayout4VanChartHelper; -import javax.swing.BoxLayout; import javax.swing.JPanel; +import java.awt.BorderLayout; import java.awt.Component; -import java.awt.Dimension; /** * 自定义间隔背景设置 @@ -38,25 +35,17 @@ public class VanChartCustomIntervalBackgroundPane extends BasicBeanPane { } JPanel mapDataTreePanel = new JPanel(new BorderLayout()); - mapDataTreePanel.add(mapDataTree); + UIScrollPane treeScrollPane = new UIScrollPane(mapDataTree); + treeScrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder()); + mapDataTreePanel.add(treeScrollPane, BorderLayout.CENTER); Component[][] components = new Component[][]{ new Component[]{new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layer_Tree"), mapDataTreePanel, true)}, @@ -78,28 +78,23 @@ public class DrillMapLayerPane extends BasicScrollPane { } private JPanel createLayerDetailPane() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {f, p, p}; - double[] rowSize = new double[depth + 1]; detailComps = new Component[depth + 1][3]; - rowSize[0] = p; detailComps[0] = new Component[]{ new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Descriptor")), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Zoom_Layer")), + null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Layer_Map_Type")) }; for (int i = 0; i < depth; i++) { - rowSize[i + 1] = p; int d = i + 1; UILabel label = new UILabel(String.format("%s%d%s", com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Index_Article"), d, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Index_Layer"))); UIComboBox level = new UIComboBox(MapStatusPane.ZOOM_LEVELS); level.setEnabled(i != 0); UIComboBox type = new UIComboBox(TEMP.get(oldMapType)); - detailComps[i + 1] = new Component[]{label, level, type}; + detailComps[i + 1] = new Component[]{label, level, null, type}; } - return TableLayoutHelper.createGapTableLayoutPane(detailComps, rowSize, columnSize, 5, 6); + return FineLayoutBuilder.compatibleTableLayout(10, detailComps, new double[]{1.2, 1.4, 0.2, 1.4}); } /** diff --git a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java index 5ebfea2320..1ce78b7e70 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java +++ b/designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/MapDataTree.java @@ -1,7 +1,6 @@ package com.fr.van.chart.drillmap.designer.data.comp; import com.fine.theme.icon.LazyIcon; -import com.fr.design.border.FineBorderFactory; import com.fr.general.ComparatorUtils; import com.fr.plugin.chart.map.designer.type.GEOJSONTreeHelper; import com.fr.plugin.chart.map.server.ChartGEOJSONHelper; @@ -35,7 +34,6 @@ public class MapDataTree extends JTree { this.setShowsRootHandles(true); this.setInvokesStopCellEditing(true); this.setCellRenderer(treeCellRenderer); - setBorder(FineBorderFactory.createWrappedRoundBorder()); setStyle(this, PURE_TREE); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java index 5d8c896072..f08d81a636 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/funnel/designer/style/VanChartFunnelSeriesPane.java @@ -1,15 +1,14 @@ package com.fr.van.chart.funnel.designer.style; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.chart.chartattr.Plot; +import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ibutton.UIButtonGroup; 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.ChartStylePane; import com.fr.plugin.chart.funnel.FunnelSortType; import com.fr.plugin.chart.funnel.VanChartFunnelPlot; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.style.series.VanChartAbstractPlotSeriesPane; import javax.swing.JPanel; @@ -27,16 +26,12 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane { } protected JPanel getContentInPlotType() { - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] columnSize = {f}; - double[] rowSize = {p,p,p,p,p,p,p,p,p,p}; Component[][] components = new Component[][]{ new Component[]{createFunnelStylePane()}, new Component[]{createBorderPane()}, }; - contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + contentPane = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1}); return contentPane; } @@ -57,20 +52,14 @@ public class VanChartFunnelSeriesPane extends VanChartAbstractPlotSeriesPane { Toolkit.i18nText("Fine-Design_Chart_Origin_Sort") }); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - double[] columnSize = {f, e}; - double[] rowSize = {p,p,p}; Component[][] components = new Component[][]{ - new Component[]{null, null}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Continuity")), useSameSlantAngle}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Sort")), sort}, }; - JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Style_Name"), panel); + return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Style_Name"), panel, true); } public void populateBean(Plot plot) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java index ad553d7b9c..b31055edca 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/VanChartMapSeriesPane.java @@ -11,6 +11,7 @@ import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.style.color.ColorSelectBox; import com.fr.design.utils.gui.GUICoreUtils; @@ -273,7 +274,7 @@ public class VanChartMapSeriesPane extends VanChartColorValueSeriesPane { //获取颜色面板 private JPanel getColorPane(MapType paneType) { - JPanel panel = new JPanel(new BorderLayout()); + JPanel panel = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10)); stylePane = createStylePane(); mapType = ((VanChartMapPlot) plot).getAllLayersMapType(); if (mapType != MapType.CUSTOM && mapType != MapType.DRILL_CUSTOM) { diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java index 1afffc8964..0b7716faa2 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/style/label/VanChartMapLabelContentPane.java @@ -1,10 +1,11 @@ package com.fr.van.chart.map.designer.style.label; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.jxbrowser.JxUIPane; -import com.fr.design.layout.TableLayout; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.plugin.chart.base.AttrTooltipContent; import com.fr.plugin.chart.base.format.AttrTooltipAreaNameFormat; import com.fr.plugin.chart.base.format.AttrTooltipFormat; @@ -13,7 +14,6 @@ import com.fr.plugin.chart.base.format.AttrTooltipPercentFormat; import com.fr.plugin.chart.base.format.AttrTooltipSeriesFormat; import com.fr.plugin.chart.base.format.AttrTooltipValueFormat; import com.fr.plugin.chart.type.TextAlign; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.VanChartLabelContentPane; import com.fr.van.chart.designer.component.format.MapAreaNameFormatPaneWithCheckBox; import com.fr.van.chart.designer.component.format.PercentFormatPaneWithCheckBox; @@ -67,18 +67,12 @@ public class VanChartMapLabelContentPane extends VanChartLabelContentPane { protected JPanel getLabelContentPane(JPanel contentPane) { showAllSeries = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Show_All_Series")); - double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - double[] columnSize = {f, e}; - double p = TableLayout.PREFERRED; - double[] row = {p, p}; Component[][] components = { - new Component[]{null, null}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Display_Strategy")), showAllSeries} }; - checkPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize); + checkPane = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3}); - JPanel panel = new JPanel(new BorderLayout()); + JPanel panel = new JPanel(FRGUIPaneFactory.createScaledBorderLayout(0, 10)); panel.add(contentPane, BorderLayout.CENTER); panel.add(checkPane, BorderLayout.SOUTH); return createTableLayoutPaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Content"), panel); diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java index 218dd02294..cac695bf17 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/WMSLayerPane.java @@ -1,6 +1,7 @@ package com.fr.van.chart.map.designer.type; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserverListener; @@ -9,11 +10,10 @@ import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextarea.UITextArea; import com.fr.design.i18n.Toolkit; +import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.plugin.chart.base.GisLayer; import com.fr.plugin.chart.map.layer.WMSLayer; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import javax.swing.JPanel; import javax.swing.SwingConstants; @@ -55,24 +55,19 @@ public class WMSLayerPane extends JPanel implements UIObserver { public WMSLayerPane() { - final double p = TableLayout.PREFERRED; - double[] rowSize = {p}; - double[] COLUMN_SIZE = {TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH, 84, 44}; - wmsUrl = new UITextArea(); connectButton = new UIButton(Toolkit.i18nText("Fine-Design_Chart_Connect_WMP")); Component[][] comps = new Component[][]{ - new Component[]{new UILabel("url"), wmsUrl, connectButton} + new Component[]{new UILabel("url"), wmsUrl, null, connectButton} }; - JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(comps, rowSize, COLUMN_SIZE); - northPane.setBorder(TableLayout4VanChartHelper.SECOND_EDIT_AREA_BORDER); + JPanel northPane = FineLayoutBuilder.compatibleTableLayout(10, comps, new double[]{1.2, 1.4, 0.2, 1.4}); wmsLayerPane = new JPanel(new BorderLayout()); resetWMSLayerPane(new ArrayList<>()); - this.setLayout(new BorderLayout(0, 6)); + this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10)); this.add(northPane, BorderLayout.NORTH); this.add(wmsLayerPane, BorderLayout.CENTER); addListener(); @@ -136,7 +131,7 @@ public class WMSLayerPane extends JPanel implements UIObserver { wmsLayerCheckBoxs.add(checkBox); } - wmsLayerPane.add(TableLayoutHelper.createCommonTableLayoutPane(comps, rowSize, COLUMN_SIZE, 0), BorderLayout.CENTER); + wmsLayerPane.add(FineLayoutBuilder.compatibleTableLayout(10, comps, new double[]{1.2, 3}), BorderLayout.CENTER); updateUI(); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieSeriesPane.java index 6c1575cfdf..dd3923bc9d 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/multilayer/style/VanChartMultiPieSeriesPane.java @@ -1,15 +1,15 @@ package com.fr.van.chart.multilayer.style; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.chart.chartattr.Plot; +import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.UINumberDragPaneWithPercent; import com.fr.design.gui.ibutton.UIButtonGroup; 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.design.mainframe.chart.gui.ChartStylePane; import com.fr.plugin.chart.multilayer.VanChartMultiPiePlot; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.VanChartBeautyPane; import com.fr.van.chart.pie.VanChartPieSeriesPane; @@ -39,7 +39,7 @@ public class VanChartMultiPieSeriesPane extends VanChartPieSeriesPane { new Component[]{createBorderPane()}, }; - return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1}); } protected JPanel createSeriesStylePane(double[] row, double[] col) { @@ -54,7 +54,6 @@ public class VanChartMultiPieSeriesPane extends VanChartPieSeriesPane { com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")}); Component[][] components = new Component[][]{ - new Component[]{null,null}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Gradual_Level") ),gradualLevel}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Angle") ),startAngle}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Angle")),endAngle}, @@ -63,8 +62,8 @@ public class VanChartMultiPieSeriesPane extends VanChartPieSeriesPane { new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Rotation")),supportRotation} }; - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel); + JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); + return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel, true); } protected void populatePieAttr() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPieSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPieSeriesPane.java index 52f865356d..f17cb9bcde 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPieSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/pie/VanChartPieSeriesPane.java @@ -1,6 +1,7 @@ package com.fr.van.chart.pie; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.chart.chartattr.Plot; import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.frpane.UINumberDragPane; @@ -9,7 +10,6 @@ import com.fr.design.gui.ibutton.UIButtonGroup; 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.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.i18n.Toolkit; @@ -48,7 +48,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane { new Component[]{createBorderPane()}, }; - return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize); + return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1}); } @@ -60,7 +60,6 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane { Component[][] components = new Component[][]{ - new Component[]{null,null}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Start_Angle")),startAngle}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_End_Angle")),endAngle}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Inner_Radius")),innerRadius}, @@ -69,7 +68,7 @@ public class VanChartPieSeriesPane extends VanChartAbstractPlotSeriesPane { }; - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); + JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel, true); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/radar/VanChartRadarSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/radar/VanChartRadarSeriesPane.java index 1026b99367..ffe75a7d58 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/radar/VanChartRadarSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/radar/VanChartRadarSeriesPane.java @@ -1,15 +1,15 @@ package com.fr.van.chart.radar; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.chart.chartattr.Plot; +import com.fr.design.foldablepane.UIExpandablePane; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.gui.ibutton.UIButtonGroup; -import com.fr.design.layout.TableLayout; -import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.plugin.chart.radar.VanChartRadarPlot; import com.fr.plugin.chart.type.RadarType; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.VanChartLineTypePane; import com.fr.van.chart.designer.component.VanChartLineWidthPane; import com.fr.van.chart.designer.style.series.VanChartAbstractPlotSeriesPane; @@ -32,12 +32,8 @@ public class VanChartRadarSeriesPane extends VanChartAbstractPlotSeriesPane { } protected JPanel getContentInPlotType(){ - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double[] row = {p,p,p,p,p,p,p}; - double[] col = {f}; - contentPane = TableLayoutHelper.createTableLayoutPane(getPaneComponents(), row, col); + contentPane = FineLayoutBuilder.compatibleTableLayout(10, getPaneComponents(), new double[]{1}); return contentPane; } @@ -67,8 +63,9 @@ public class VanChartRadarSeriesPane extends VanChartAbstractPlotSeriesPane { private JPanel createRadarTypePane() { radarType = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Circle"), Toolkit.i18nText("Fine-Design_Chart_Polygonal")}, new String[]{RadarType.CIRCLE.getType(), RadarType.POLYGON.getType()}); - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Shape"), radarType); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Style_Present"), panel); + JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, + new UILabel(Toolkit.i18nText("Fine-Design_Chart_Shape")), radarType); + return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Style_Present"), panel, true); } protected VanChartLineTypePane getLineTypePane() { diff --git a/designer-chart/src/main/java/com/fr/van/chart/range/component/GradualIntervalConfigPane.java b/designer-chart/src/main/java/com/fr/van/chart/range/component/GradualIntervalConfigPane.java index f1cdc5b62e..5fdf0d5a0f 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/range/component/GradualIntervalConfigPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/range/component/GradualIntervalConfigPane.java @@ -1,11 +1,10 @@ package com.fr.van.chart.range.component; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.design.gui.frpane.UINumberDragPane; import com.fr.design.gui.ilable.BoldFontTextLabel; -import com.fr.design.layout.TableLayout; import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent; import com.fr.plugin.chart.range.GradualIntervalConfig; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.style.axis.component.MinMaxValuePaneWithOutTick; import javax.swing.JPanel; @@ -51,16 +50,10 @@ public class GradualIntervalConfigPane extends JPanel { legendGradientBar = createLegendGradientBar(); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - double[] col = new double[]{f, e}; - double[] row = new double[]{p, p, p, p}; - Component[][] components = getPaneComponents(minMaxValuePane, colorSelectBox, numberDragPane, legendGradientBar); //控件承载面板 - JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col); + JPanel contentPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); this.setLayout(new BorderLayout()); this.add(contentPane, BorderLayout.CENTER); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/range/component/LegendLabelFormatPane.java b/designer-chart/src/main/java/com/fr/van/chart/range/component/LegendLabelFormatPane.java index eec9225f58..478d7d13d1 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/range/component/LegendLabelFormatPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/range/component/LegendLabelFormatPane.java @@ -1,12 +1,12 @@ package com.fr.van.chart.range.component; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.chart.base.LegendLabelFormat; +import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.style.FormatPane; -import com.fr.design.layout.TableLayout; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.designer.component.VanChartHtmlLabelPaneWithOutWidthAndHeight; import com.fr.van.chart.designer.component.format.FormatPaneWithOutFont; import com.fr.van.chart.designer.style.VanChartStylePane; @@ -47,7 +47,6 @@ public class LegendLabelFormatPane extends JPanel { } }; htmlLabelPane = new VanChartHtmlLabelPaneWithOutWidthAndHeight(); - htmlLabelPane.setBorder(BorderFactory.createEmptyBorder(0, (int) TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH + TableLayout4VanChartHelper.COMPONENT_INTERVAL, 0, 0)); centerPane = new JPanel(new CardLayout()) { @Override @@ -63,17 +62,11 @@ public class LegendLabelFormatPane extends JPanel { centerPane.add(htmlLabelPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom")); - double p = TableLayout.PREFERRED; - double f = TableLayout.FILL; - double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; - double[] columnSize = {f, e}; - double[] rowSize = {p, p, p}; Component[][] components = new Component[][]{ - new Component[]{null, null}, new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Label_Format"), SwingConstants.LEFT), labelFormatStyle}, new Component[]{centerPane, null}, }; - JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); + JPanel contentPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); labelFormatStyle.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -82,7 +75,7 @@ public class LegendLabelFormatPane extends JPanel { }); labelFormatStyle.setSelectedIndex(0); - JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Format"), contentPane); + JPanel panel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Format"), contentPane, true); this.setLayout(new BorderLayout()); this.add(panel, BorderLayout.CENTER); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/treemap/style/VanChartTreeMapSeriesPane.java b/designer-chart/src/main/java/com/fr/van/chart/treemap/style/VanChartTreeMapSeriesPane.java index db8bfa94b1..7998a088e7 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/treemap/style/VanChartTreeMapSeriesPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/treemap/style/VanChartTreeMapSeriesPane.java @@ -1,11 +1,13 @@ package com.fr.van.chart.treemap.style; +import com.fine.theme.utils.FineLayoutBuilder; import com.fr.chart.chartattr.Plot; +import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.gui.ibutton.UIButtonGroup; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.plugin.chart.treemap.VanChartTreeMapPlot; -import com.fr.van.chart.designer.TableLayout4VanChartHelper; import com.fr.van.chart.multilayer.style.VanChartMultiPieSeriesPane; import javax.swing.JPanel; @@ -22,8 +24,9 @@ public class VanChartTreeMapSeriesPane extends VanChartMultiPieSeriesPane { protected JPanel createSeriesStylePane(double[] row, double[] col) { supportDrill = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")}); - JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Drill"), supportDrill); - return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel); + JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, + new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Drill")), supportDrill); + return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Widget_Style"), panel, true); } protected void populatePieAttr() { diff --git a/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java b/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java index 1a578638c8..57f29e2c71 100644 --- a/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java +++ b/designer-realize/src/main/java/com/fr/design/cell/editor/BiasTextPainterCellEditor.java @@ -4,8 +4,8 @@ package com.fr.design.cell.editor; import com.fine.swing.ui.layout.Layouts; -import com.fine.theme.light.ui.FineRoundBorder; import com.fine.theme.utils.FineUIScale; +import com.fr.design.border.FineBorderFactory; import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.gui.ibutton.UIRadioButton; @@ -84,7 +84,7 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor { Window parentWindow = SwingUtilities.getWindowAncestor(grid); this.biasTextPainterPane = new BiasTextPainterPane(); - Dimension wrapDimension = FineUIScale.scale(new Dimension(360, 172)); + Dimension wrapDimension = FineUIScale.scale(new Dimension(360, 212)); this.biasTextPainterPane.populate(biasTextPainter); return this.biasTextPainterPane.showWindowWithCustomSize(parentWindow, new DialogActionAdapter() { @@ -113,7 +113,7 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor { formulaTextArea = new UITextArea(); JScrollPane scrollPane = new JScrollPane(formulaTextArea); - scrollPane.setBorder(new FineRoundBorder()); + scrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder()); formulaTextArea.setBorder(null); String leftToLowerText = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Slope_Line_Upper_Left_To_Lower_Right"); @@ -130,8 +130,8 @@ public class BiasTextPainterCellEditor extends AbstractCellEditor { group.add(choice2); add(Layouts.column(10, - Layouts.cell(formulaLabel).weight(0.1), Layouts.cell(scrollPane).weight(0.12), - Layouts.row(5, Layouts.cell(choice1).weight(1), Layouts.cell(choice2).weight(1)).weight(0.12)).getComponent()); + Layouts.cell(formulaLabel), Layouts.cell(scrollPane).weight(1), + Layouts.row(5, Layouts.cell(choice1).weight(1), Layouts.cell(choice2).weight(1))).getComponent()); } @Override