Browse Source

控件管理/报表填报属性/超级链接/服务器参数

newui
renekton 4 months ago
parent
commit
85a06bf30f
  1. 44
      designer-base/src/main/java/com/fine/theme/utils/FineComponentsFactory.java
  2. 22
      designer-base/src/main/java/com/fine/theme/utils/FineLayoutBuilder.java
  3. 1
      designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java
  4. 3
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java
  5. 11
      designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java
  6. 1
      designer-base/src/main/java/com/fr/design/editor/editor/CursorEditor.java
  7. 8
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  8. 17
      designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java
  9. 7
      designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java
  10. 4
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java
  11. 15
      designer-base/src/main/java/com/fr/design/gui/frpane/FineTabbedPane.java
  12. 1
      designer-base/src/main/java/com/fr/design/gui/imenu/UIMenu.java
  13. 51
      designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java
  14. 2
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java
  15. 2
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  16. 13
      designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/detail/ColorFillStylePane.java
  17. 17
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java
  18. 18
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java
  19. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java
  20. 4
      designer-base/src/main/java/com/fr/design/menu/NameSeparator.java
  21. 17
      designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java
  22. 3
      designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index.svg
  23. 3
      designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index_disable.svg
  24. 3
      designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name.svg
  25. 3
      designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name_disable.svg
  26. 7
      designer-base/src/main/resources/com/fine/theme/icon/insert/float_normal.svg
  27. 3
      designer-base/src/main/resources/com/fine/theme/icon/newline.svg
  28. 3
      designer-base/src/main/resources/com/fine/theme/icon/page.svg
  29. 7
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  30. 3
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  31. 3
      designer-chart/src/main/java/com/fr/design/chart/ChartDialog.java
  32. 20
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  33. 9
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java
  34. 34
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  35. 9
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithThemeStyle.java
  36. 19
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/AbstractPlotSeriesPane.java
  37. 14
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java
  38. 8
      designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java
  39. 6
      designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java
  40. 14
      designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaSeriesPane.java
  41. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/component/MeterCustomPlotTableDataContentPane.java
  42. 3
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java
  43. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartBeautyPane.java
  44. 8
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartFillStylePane.java
  45. 26
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartGanttTimeLinePane.java
  46. 56
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java
  47. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartMarkerPane.java
  48. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java
  49. 20
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java
  50. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java
  51. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPaneWithOutImageAndShadow.java
  52. 16
      designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartMarkerBackgroundPane.java
  53. 29
      designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartCommonMarkerPane.java
  54. 29
      designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartImageMarkerPane.java
  55. 36
      designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java
  56. 101
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java
  57. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java
  58. 12
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java
  59. 22
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisStyleSettingPane.java
  60. 95
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  61. 22
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java
  62. 37
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartValueAxisPane.java
  63. 43
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java
  64. 43
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java
  65. 17
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java
  66. 34
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java
  67. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaPane.java
  68. 46
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAxisAreaPane.java
  69. 31
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartGantPlotAreaBackgroundPane.java
  70. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java
  71. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java
  72. 10
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPieValueLabelDetailPane.java
  73. 13
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  74. 20
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  75. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartPlotTooltipPane.java
  76. 47
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java
  77. 2
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/VanChartGanttDataAndLinkPane.java
  78. 6
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java
  79. 6
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java
  80. 20
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java
  81. 33
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java
  82. 6
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataProjectPane.java
  83. 16
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java
  84. 9
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java
  85. 29
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java
  86. 31
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
  87. 14
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java
  88. 12
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/axis/GanttAxisStylePane.java
  89. 10
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/axis/GanttAxisStylePaneWithPosition.java
  90. 38
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/axis/GanttProcessAxisPane.java
  91. 25
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/axis/GanttTimeAxisPane.java
  92. 47
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java
  93. 14
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartImageMarkerWithoutWidthAndHeightPane.java
  94. 13
      designer-chart/src/main/java/com/fr/van/chart/line/VanChartLineSeriesPane.java
  95. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/AreaPane.java
  96. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LongLatAreaPane.java
  97. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/AreaPane.java
  98. 4
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LineMapAreaPane.java
  99. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LongLatAreaPane.java
  100. 18
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java
  101. Some files were not shown because too many files have changed in this diff Show More

44
designer-base/src/main/java/com/fine/theme/utils/FineComponentsFactory.java

@ -0,0 +1,44 @@
package com.fine.theme.utils;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.stable.Constants;
import javax.swing.Icon;
/**
* 设计器典型组件组合工厂
*
* @author Levy.Xie
* @since 11.0
* Created on 2024/07/26
*/
public class FineComponentsFactory {
/**
* 创建水平对齐按钮组
*
* @return 组件
*/
public static UIButtonGroup<Integer> createHorizontalAlignmentButtonGroup() {
Icon[][] alignmentIconArray = {{new LazyIcon("h_left"), new LazyIcon("h_left").white()},
{new LazyIcon("h_center"), new LazyIcon("h_center").white()},
{new LazyIcon("h_right"), new LazyIcon("h_right").white()}};
Integer[] alignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT};
return new UIButtonGroup<>(alignmentIconArray, alignment);
}
/**
* 创建垂直对齐按钮组
*
* @return 组件
*/
public static UIButtonGroup<Integer> createVerticalAlignmentButtonGroup() {
Icon[][] alignmentIconArray = {{new LazyIcon("v_top"), new LazyIcon("v_top").white()},
{new LazyIcon("v_center"), new LazyIcon("v_center").white()},
{new LazyIcon("v_bottom"), new LazyIcon("v_bottom").white()}};
Integer[] alignment = new Integer[]{Constants.TOP, Constants.CENTER, Constants.BOTTOM};
return new UIButtonGroup<>(alignmentIconArray, alignment);
}
}

22
designer-base/src/main/java/com/fine/theme/utils/FineLayoutBuilder.java

@ -5,6 +5,7 @@ import com.fine.swing.ui.layout.Layouts;
import com.fine.swing.ui.layout.Row;
import com.fine.swing.ui.layout.Spacer;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.collections.combination.Pair;
@ -131,15 +132,32 @@ public class FineLayoutBuilder {
* @param elements 面板元素
* @return 面板
*/
public static Column createVerticalLayout(int spacing, JPanel... elements) {
public static Column createVerticalLayout(int spacing, Component... elements) {
Column column = new Column();
column.setSpacing(spacing);
for (JPanel element : elements) {
for (Component element : elements) {
column.add(element);
}
return column;
}
/**
* 创建水平布局面板
*
* @param spacing 间距
* @param elements 面板元素
* @return 面板
*/
public static Row createHorizontalLayout(int spacing, double[] weight, Component... elements) {
Row row = new Row();
row.setSpacing(spacing);
for (int i = 0; i < elements.length; i++) {
Layouts.populate(row, cell(elements[i]).weight(weight[i]));
}
return row;
}
/**
* 组件包装于BorderLayout中
*

1
designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java

@ -33,6 +33,7 @@ public interface FineUIStyle {
String PLAIN_BUTTON = "plainButton";
String TOGGLE_GROUP = "inToggleGroup";
String COMPACT_BUTTON = "compactButton";
String ROUND_BORDER_PANEL = "roundBorder";
String MENU_TOOL_BAR = "menuToolBar";
String MENU_ITEM_TOOL_BAR = "menuItemToolBar";

3
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane.connect;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.svg.IconUtils;
import com.fr.data.impl.AbstractDatabaseConnection;
import com.fr.data.impl.Connection;
@ -61,7 +62,7 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel {
protected UIButton initEditButton(UIButton editButton, Dimension buttonSize) {
editButton = new UILockButton(
EditLockUtils.CONNECTION_LOCKED_ICON,
IconUtils.readIcon("/com/fr/design/images/m_web/connection"),
new LazyIcon("connection"),
EditLockUtils.CONNECTION_LOCKED_TOOLTIPS,
null
);

11
designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -6,7 +6,6 @@ import com.fr.design.data.datapane.TableDataComboBox;
import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.data.TableDataColumn;
import com.fr.stable.StringUtils;
@ -17,6 +16,9 @@ import java.awt.event.ItemListener;
import java.util.List;
import java.util.regex.Pattern;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 选择数据列编辑器
*
@ -30,7 +32,7 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> implements Prep
public ColumnSelectedEditor() {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Column"));
this.setLayout(FRGUIPaneFactory.createLeftZeroLayout());
this.setLayout(new BorderLayout());
tableDataComboBox = new TableDataComboBox(DesignTableDataManager.getEditingTableDataSource());
columnNames = new String[0];
tableDataComboBox.addItemListener(new ItemListener() {
@ -52,10 +54,7 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> implements Prep
}
});
columnNameComboBox = new UIComboBox();
tableDataComboBox.setPreferredSize(new Dimension(82, 20));
this.add(tableDataComboBox);
columnNameComboBox.setPreferredSize(new Dimension(82, 20));
this.add(columnNameComboBox);
this.add(row(10, cell(tableDataComboBox), cell(columnNameComboBox)).getComponent());
}
@Override

1
designer-base/src/main/java/com/fr/design/editor/editor/CursorEditor.java

@ -14,7 +14,6 @@ public class CursorEditor extends Editor<CursorEditor> {
this.setLayout(FRGUIPaneFactory.createCenterFlowLayout());
label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cursor"));
this.add(label);
this.setPreferredSize(new Dimension(10,20));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cursor"));
this.setEnabled(false);
}

8
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -5,6 +5,8 @@ import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIStyle;
import com.formdev.flatlaf.ui.FlatButtonBorder;
import com.formdev.flatlaf.ui.FlatRoundBorder;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
@ -320,7 +322,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
// text
initFormulaTextArea();
UIScrollPane formulaTextAreaScrollPane = new UIScrollPane(formulaTextArea);
formulaTextAreaScrollPane.setBorder(new FineRoundBorder());
formulaTextAreaScrollPane.setBorder(new FlatRoundBorder());
// buttonPane
JPanel buttonPane = row(8).getComponent();
@ -1192,7 +1194,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
private JPanel initFunctionNameList() {
functionNameList = new JList(new DefaultListModel());
UIScrollPane functionNameScrollPane = new UIScrollPane(functionNameList);
functionNameScrollPane.setBorder(new FineRoundBorder());
functionNameScrollPane.setBorder(new FlatButtonBorder());
functionNameList.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
initFunctionNameListCellRenderer();
initFunctionNameListSelectionListener();
@ -1273,7 +1275,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
// variable
variablesTree = new JTree();
UIScrollPane variablesTreePane = new UIScrollPane(variablesTree);
variablesTreePane.setBorder(new FineRoundBorder());
variablesTreePane.setBorder(new FlatRoundBorder());
variablesTree.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
variablesTree.setRootVisible(false);
variablesTree.setShowsRootHandles(true);

17
designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java

@ -1,7 +1,6 @@
package com.fr.design.formula;
import com.fine.theme.icon.LazyIcon;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseFormula;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter;
@ -11,12 +10,15 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.mainframe.DesignerContext;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
*
* @author zhou
@ -70,15 +72,10 @@ public class TinyFormulaPane extends BasicBeanPane<String> implements UIObserver
}
protected void initLayout() {
JPanel pane = new JPanel(new BorderLayout());
JPanel pane1 = new JPanel(new BorderLayout());
pane1.add(formulaTextField, BorderLayout.NORTH);
pane1.setBorder(new ScaledEmptyBorder(0,0,0,5));
pane.add(pane1,BorderLayout.CENTER);
pane.add(formulaTextFieldButton,BorderLayout.EAST);
this.setLayout(new BorderLayout());
this.add(pane,BorderLayout.NORTH) ;
this.add(row(
cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5)
).getComponent()) ;
}
/**

7
designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java

@ -1,6 +1,7 @@
package com.fr.design.gui.controlpane;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.controlpane.shortcutfactory.AbstractShortCutFactory;
@ -13,6 +14,7 @@ import com.fr.stable.ArrayUtils;
import com.fr.stable.Filter;
import com.fr.stable.Nameable;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import java.awt.BorderLayout;
@ -148,7 +150,10 @@ abstract class JControlPane extends BasicPane implements UnrepeatedNameHelper, S
toolbarDef.addShortCut(sj.getShortCut());
}
toolBar = ToolBarDef.createJToolBar();
toolBar.setBorder(FineBorderFactory.createUnderlineBorder(FlatUIUtils.getUIColor("defaultBorderColor", Color.GRAY)));
toolBar.setBorder(BorderFactory.createCompoundBorder(
FineBorderFactory.createUnderlineBorder(FlatUIUtils.getUIColor("defaultBorderColor", Color.GRAY)),
new ScaledEmptyBorder(3, 0, 3, 0)
));
toolBar.setBorderPainted(true);
toolbarDef.updateToolBar(toolBar);
}

4
designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java

@ -1,6 +1,6 @@
package com.fr.design.gui.controlpane;
import com.fine.theme.light.ui.FineRoundBorder;
import com.formdev.flatlaf.ui.FlatRoundBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilist.JNameEdList;
@ -76,7 +76,7 @@ public abstract class UIListControlPane extends UIControlPane implements ListCon
nameableList.setName(LIST_NAME);
UIScrollPane scrollPane = new UIScrollPane(nameableList);
leftPane.add(scrollPane, BorderLayout.CENTER);
leftPane.setBorder(new FineRoundBorder());
leftPane.setBorder(new FlatRoundBorder());
nameableList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
nameableList.addMouseListener(getHelper().getListMouseListener(nameableList, this));

15
designer-base/src/main/java/com/fr/design/gui/frpane/FineTabbedPane.java

@ -169,11 +169,22 @@ public class FineTabbedPane extends Column {
}
/**
* 获取当前选中的Tab组件下标
* 设置选中的Tab组件
*
* @return indx
* @param i 组件序号
*/
public void setSelectedIndex(int i) {
tabGroup.setSelectedIndex(i);
cards.show(centerPane, String.valueOf(tabGroup.getSelectedItem()));
}
/**
* 获取选中的组件序号
*
* @return 组件序号
*/
public int getSelectedIndex() {
return tabGroup.getSelectedIndex();
}
}

1
designer-base/src/main/java/com/fr/design/gui/imenu/UIMenu.java

@ -7,6 +7,7 @@ import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.MenuElement;
import java.awt.Component;
import java.awt.Dimension;
/**
* @author null

51
designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java

@ -13,11 +13,11 @@ import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.gui.core.ReactiveCardPane;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
@ -28,16 +28,11 @@ import com.fr.stable.Constants;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.Vector;
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.row;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* Pane to edit Font.
@ -66,7 +61,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
private UIToggleButton isShadowCheckBox;
private UIToggleButton superPane;
private UIToggleButton subPane;
private ReactiveCardPane styleContainer;
private UIToolbar styleToolbar;
public FRFontPane() {
this.initComponents();
@ -111,7 +106,6 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
int line = frFont.getUnderline();
if (line == Constants.LINE_NONE) {
underline.setSelected(false);
styleContainer.removeAll();
} else {
underline.setSelected(true);
this.underlineCombo.setSelectedLineStyle(line);
@ -129,7 +123,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
this.superPane.setSelected(false);
this.subPane.setSelected(false);
}
styleContainer.select(underline.isSelected() ? "showLine" : "hideLine").populate();
underlineCombo.setVisible(underline.isSelected());
}
/**
@ -239,41 +233,35 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
isShadowCheckBox = new UIToggleButton(new LazyIcon("shadow"));
superPane = new UIToggleButton(new LazyIcon("super"));
subPane = new UIToggleButton(new LazyIcon("sub"));
styleContainer = ReactiveCardPane.create()
.addSupplier("showLine", this::createContentWithLine)
.addSupplier("hideLine", this:: createContentNoLine);
styleToolbar = createToolbar();
initAllNames();
setToolTips();
initListeners();
styleContainer.select("hideLine").populate();
underlineCombo.setVisible(false);
this.setLayout(new BorderLayout());
this.add(Layouts.column(LayoutConstants.VERTICAL_GAP,
cell(fontNameComboBox),
row(5,
cell(fontSizeStyleComboBox).weight(1),
cell(fontSizeComboBox).weight(1)),
cell(styleContainer)
cell(styleToolbar),
cell(underlineCombo)
).getComponent(), BorderLayout.CENTER);
DefaultValues defaultValues = FRContext.getDefaultValues();
populateBean(defaultValues.getFRFont());
}
private Component createContentNoLine() {
return createFontButtonRow().getComponent();
}
private Component createContentWithLine() {
return column(LayoutConstants.VERTICAL_GAP,
createFontButtonRow(),
cell(underlineCombo)
).getComponent();
}
private Cell<?> createFontButtonRow() {
return row(3, cell(colorSelectPane), cell(underline), cell(isStrikethroughCheckBox), cell(isShadowCheckBox),
cell(superPane), cell(subPane));
private UIToolbar createToolbar() {
UIToolbar toolbar = new UIToolbar();
toolbar.add(colorSelectPane);
toolbar.add(underline);
toolbar.add(isStrikethroughCheckBox);
toolbar.add(isShadowCheckBox);
toolbar.add(superPane);
toolbar.add(subPane);
return toolbar;
}
private void initAllNames() {
@ -303,12 +291,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
}
private void initListeners() {
underline.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
styleContainer.select(underline.isSelected() ? "showLine" : "hideLine").populate();
}
});
underline.addChangeListener(e -> underlineCombo.setVisible(underline.isSelected()));
}
/**

2
designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java

@ -35,7 +35,7 @@ public class MobilePopupUIUtils {
titleLabel.setForeground(color);
jp.add(row(10,
cell(titleLabel),
cell(contentPanel)
cell(contentPanel).weight(1.0)
).getComponent());
return jp;
}

2
designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.check;
import com.fine.theme.utils.FineUIStyle;
import com.fr.design.dialog.link.MessageWithLink;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
@ -111,6 +112,7 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
//底部的按钮面板
UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK"));
FineUIStyle.setStyle(okButton, FineUIStyle.STYLE_PRIMARY);
okButton.addActionListener(this);
bottomPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
bottomPanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));

13
designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/detail/ColorFillStylePane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.predefined.ui.detail;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.ChartColorMatching;
import com.fr.base.ChartPreStyleConfig;
import com.fr.base.Utils;
@ -7,14 +8,11 @@ import com.fr.chart.base.ChartConstants;
import com.fr.config.predefined.ColorFillStyle;
import com.fr.config.predefined.PredefinedColorStyle;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.icombobox.ColorSchemeComboBox;
import com.fr.design.gui.ilable.UILabel;
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.background.gradient.FixedGradientBarNoTheme;
import com.fr.design.style.color.ColorAdjustPane;
import com.fr.stable.StringUtils;
@ -158,14 +156,7 @@ public class ColorFillStylePane extends BasicBeanPane<ColorFillStyle> {
}
protected JPanel getContentPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = 155;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(contentPaneComponents(), rowSize, columnSize, 12, LayoutConstants.VGAP_LARGE);
return panel;
return FineLayoutBuilder.compatibleTableLayout(10, contentPaneComponents(), new double[]{1.2, 3});
}
protected Component[][] contentPaneComponents() {

17
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.theme.FormTheme;
import com.fr.base.theme.FormThemeConfig;
import com.fr.base.theme.ReportTheme;
@ -14,18 +15,15 @@ import com.fr.design.event.ChangeListener;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.i18n.Toolkit;
import com.fr.design.icon.IconPathConstants;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.theme.dialog.TemplateThemeProfileDialog;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ToolBarDef;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.third.javax.annotation.Nullable;
import com.fr.transaction.CallBackAdaptor;
import javax.swing.BorderFactory;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSeparator;
@ -35,8 +33,6 @@ import java.awt.BasicStroke;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
@ -99,8 +95,6 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic
private void initializePane() {
setLayout(FRGUIPaneFactory.createBorderLayout());
setBorder(BorderFactory.createEmptyBorder(5, 10, 0, 10));
setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT));
add(createActionsContainer(), BorderLayout.NORTH);
@ -177,10 +171,8 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic
private JPanel createActionsContainer() {
JPanel content = FRGUIPaneFactory.createBorderLayout_S_Pane();
content.setPreferredSize(new Dimension(content.getPreferredSize().width, 20));
UIToolbar toolBar = ToolBarDef.createJToolBar();
toolBar.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
content.add(toolBar, BorderLayout.CENTER);
MenuDef addMenuDef = createAddMenuDef();
@ -210,17 +202,14 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic
content.add(setTheme4NewTemplateButton, BorderLayout.EAST);
JPanel container = FRGUIPaneFactory.createBorderLayout_S_Pane();
container.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
container.add(content, BorderLayout.CENTER);
container.setPreferredSize(new Dimension(container.getPreferredSize().width, 30));
return container;
}
private MenuDef createAddMenuDef() {
MenuDef menuDef = new MenuDef(Toolkit.i18nText("Fine-Design_Basic_Action_Add"));
menuDef.setIconPath(IconPathConstants.ADD_POPMENU_ICON_PATH);
menuDef.setIcon(new LazyIcon("add_popup"));
menuDef.setRePaint(true);
menuDef.addShortCut(new AddThemeAction(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Pane_Create_Light_Theme"), config.getDefaultLightThemeName()));
menuDef.addShortCut(new AddThemeAction(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Pane_Create_Dark_Theme"), config.getDefaultDarkThemeName()));
@ -239,7 +228,7 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic
setEnabled(initialEnabled);
setName(Toolkit.i18nText("Fine-Design_Basic_Remove"));
setMnemonic('R');
setSmallIcon(IOUtils.readIcon(IconPathConstants.TD_REMOVE_ICON_PATH));
setSmallIcon(new LazyIcon("remove"));
}
@Override

18
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java

@ -12,7 +12,7 @@ import com.fr.design.dialog.BasicPane;
import com.fr.design.event.ChangeEvent;
import com.fr.design.event.ChangeListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
@ -276,27 +276,27 @@ public class TemplateThemeGridPagesPane extends JPanel {
}
public static class TemplateThemeManagingPane extends TemplateThemeGridPagePane {
private final UITabbedPane tabbedPane;
private final FineTabbedPane tabbedPane;
public TemplateThemeManagingPane(@Nullable Window window) {
setLayout(FRGUIPaneFactory.createBorderLayout());
tabbedPane = new UITabbedPane();
tabbedPane.setTabBorderColor(new Color(0xE0E0E1));
add(tabbedPane, BorderLayout.CENTER);
TemplateThemeGridControlPane<FormTheme> formThemesManagerPane = TemplateThemeGridControlPane.createFormThemesManagerPane(window);
TemplateThemeGridControlPane<ReportTheme> reportThemesManagerPane = TemplateThemeGridControlPane.createReportThemesManagerPane(window);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Form_Tab"), formThemesManagerPane);
tabbedPane.addTab(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Report_Tab"), reportThemesManagerPane);
tabbedPane = FineTabbedPane.builder()
.addTab(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Form_Tab"), formThemesManagerPane)
.addTab(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Manager_Dialog_Report_Tab"), reportThemesManagerPane)
.build();
tabbedPane.setSelectedIndex(0);
JTemplate<?,?> template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
TemplateThemeConfig<? extends TemplateTheme> config = template.getUsingTemplateThemeConfig();
if (config == reportThemesManagerPane.getConfig()) {
tabbedPane.setSelectedIndex(1);
}
add(tabbedPane, BorderLayout.CENTER);
}
@Override

2
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java

@ -21,7 +21,6 @@ import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.util.ArrayList;
import java.util.List;
@ -42,7 +41,6 @@ public class CellStyleEditPane extends MultiTabPane<ThemedCellStyle> {
public CellStyleEditPane() {
super();
tabPane.setLayout(new GridLayout(1, 3, 0, 0));
}

4
designer-base/src/main/java/com/fr/design/menu/NameSeparator.java

@ -52,11 +52,11 @@ public class NameSeparator extends UpdateAction {
}
public Dimension getSize() {
return new Dimension(super.getSize().width, 20);
return new Dimension(super.getSize().width, 30);
}
public Dimension getPreferredSize() {
return new Dimension(super.getPreferredSize().width, 20);
return new Dimension(super.getPreferredSize().width, 30);
}
}

17
designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java

@ -61,12 +61,17 @@ public class DateValuePane extends Column {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_None")));
cardLayout.show(customPane, tabTitles[index]);
});
this.add(
row(
cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(1.6), flex(1.4)
),
cell(customRow)
);
if (StringUtils.isNotEmpty(title)) {
this.add(
row(
cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(3)
),
cell(customRow)
);
} else {
this.add(cell(widgetValueHead),cell(customPane));
}
}

3
designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 4H28V28H4V4ZM2 4C2 2.89543 2.89543 2 4 2H28C29.1046 2 30 2.89543 30 4V28C30 29.1046 29.1046 30 28 30H4C2.89543 30 2 29.1046 2 28V4ZM17.2124 9.21626L10.3109 18H17.2124L17.2124 9.21626ZM19.2124 20H23C23.5523 20 24 19.5523 24 19C24 18.4477 23.5523 18 23 18H19.2124V6.5C19.2124 5.94772 18.7647 5.5 18.2124 5.5C18.1903 5.5 18.1683 5.50072 18.1465 5.50213C17.8352 5.48438 17.5185 5.61256 17.3084 5.87998L7.54397 18.3075C7.23346 18.7026 7.26724 19.2675 7.62262 19.6229C7.72566 19.726 7.84506 19.8013 7.97204 19.8494C8.12527 19.9449 8.3062 20 8.5 20H17.2124V25C17.2124 25.5523 17.6601 26 18.2124 26C18.7647 26 19.2124 25.5523 19.2124 25V20Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 825 B

3
designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index_disable.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 4H28V28H4V4ZM2 4C2 2.89543 2.89543 2 4 2H28C29.1046 2 30 2.89543 30 4V28C30 29.1046 29.1046 30 28 30H4C2.89543 30 2 29.1046 2 28V4ZM17.2124 9.21626L10.3109 18H17.2124L17.2124 9.21626ZM19.2124 20H23C23.5523 20 24 19.5523 24 19C24 18.4477 23.5523 18 23 18H19.2124V6.5C19.2124 5.94772 18.7647 5.5 18.2124 5.5C18.1903 5.5 18.1683 5.50072 18.1465 5.50213C17.8352 5.48438 17.5185 5.61256 17.3084 5.87998L7.54397 18.3075C7.23346 18.7026 7.26724 19.2675 7.62262 19.6229C7.72566 19.726 7.84506 19.8013 7.97204 19.8494C8.12527 19.9449 8.3062 20 8.5 20H17.2124V25C17.2124 25.5523 17.6601 26 18.2124 26C18.7647 26 19.2124 25.5523 19.2124 25V20Z" fill="#0A1C38" fill-opacity="0.29"/>
</svg>

After

Width:  |  Height:  |  Size: 826 B

3
designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11 6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V13H19C20.1046 13 21 13.8954 21 15V23C21 24.1046 20.1046 25 19 25H13C11.8954 25 11 24.1046 11 23V15V6ZM19 23H13V15H19V23ZM8 19H2L2 23H8V19ZM8 17H2C0.895431 17 0 17.8954 0 19V23C0 24.1046 0.89543 25 2 25H8C9.10457 25 10 24.1046 10 23L10 22L10 19L10 18.998V15C10 13.8954 9.10457 13 8 13H2H1C0.447715 13 0 13.4477 0 14C0 14.5523 0.447715 15 1 15H2H8L8 17ZM24 13H31C31.5523 13 32 13.4477 32 14C32 14.5523 31.5523 15 31 15H24V23H31C31.5523 23 32 23.4477 32 24C32 24.5523 31.5523 25 31 25H24C22.8954 25 22 24.1046 22 23V15C22 13.8954 22.8954 13 24 13Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 792 B

3
designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name_disable.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11 6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V13H19C20.1046 13 21 13.8954 21 15V23C21 24.1046 20.1046 25 19 25H13C11.8954 25 11 24.1046 11 23V15V6ZM19 23H13V15H19V23ZM8 19H2L2 23H8V19ZM8 17H2C0.895431 17 0 17.8954 0 19V23C0 24.1046 0.89543 25 2 25H8C9.10457 25 10 24.1046 10 23L10 22L10 19L10 18.998V15C10 13.8954 9.10457 13 8 13H2H1C0.447715 13 0 13.4477 0 14C0 14.5523 0.447715 15 1 15H2H8L8 17ZM24 13H31C31.5523 13 32 13.4477 32 14C32 14.5523 31.5523 15 31 15H24V23H31C31.5523 23 32 23.4477 32 24C32 24.5523 31.5523 25 31 25H24C22.8954 25 22 24.1046 22 23V15C22 13.8954 22.8954 13 24 13Z" fill="#0A1C38" fill-opacity="0.29"/>
</svg>

After

Width:  |  Height:  |  Size: 793 B

7
designer-base/src/main/resources/com/fine/theme/icon/insert/float_normal.svg

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon_属性_悬浮元素_下拉列表用_normal</title>
<g id="icon_属性_悬浮元素_下拉列表用_normal" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M13.075,1 C13.4615993,1 13.775,1.31340068 13.775,1.70000001 L13.775,2.225 L14.3,2.22500008 C14.6865993,2.22500008 15,2.53840076 15,2.92500009 C15,3.31159942 14.6865993,3.6250001 14.3,3.6250001 L13.775,3.625 L13.775,12.375 L14.3,12.375 C14.6865993,12.375 15,12.6884007 15,13.075 C15,13.4615993 14.6865993,13.775 14.3,13.775 L13.775,13.775 L13.775,14.3 C13.775,14.6865993 13.4615993,15 13.075,15 C12.6884007,15 12.375,14.6865993 12.375,14.3 L12.375,13.775 L3.625,13.775 L3.6250001,14.3 C3.6250001,14.6865993 3.31159942,15 2.92500009,15 C2.53840076,15 2.22500008,14.6865993 2.22500008,14.3 L2.225,13.775 L1.70000001,13.775 C1.31340068,13.775 1,13.4615993 1,13.075 C1,12.6884007 1.31340068,12.375 1.70000001,12.375 L2.225,12.375 L2.225,3.625 L1.70000001,3.6250001 C1.31340068,3.6250001 1,3.31159942 1,2.92500009 C1,2.53840076 1.31340068,2.22500008 1.70000001,2.22500008 L2.225,2.225 L2.22500008,1.70000001 C2.22500008,1.31340068 2.53840076,1 2.92500009,1 C3.31159942,1 3.6250001,1.31340068 3.6250001,1.70000001 L3.625,2.225 L12.375,2.225 L12.375,1.70000001 C12.375,1.31340068 12.6884007,1 13.075,1 Z M12.375,3.625 L3.625,3.625 L3.625,12.375 L12.375,12.375 L12.375,3.625 Z" id="Combined-Shape" fill="#333334"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

3
designer-base/src/main/resources/com/fine/theme/icon/newline.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4 6C4 5.44772 4.44772 5 5 5H27C27.5523 5 28 5.44772 28 6C28 6.55228 27.5523 7 27 7H5C4.44772 7 4 6.55228 4 6ZM28 12C28 11.4477 27.5523 11 27 11C26.4477 11 26 11.4477 26 12V23H20V19.6603C20 19.0732 19.3727 18.7792 19.0059 19.1943L15.1706 23.534C14.9431 23.7914 14.9431 24.2086 15.1706 24.466L19.0059 28.8057C19.3727 29.2208 20 28.9268 20 28.3397V25H27C27.5523 25 28 24.5523 28 24V12ZM5 14C4.44772 14 4 14.4477 4 15C4 15.5523 4.44771 16 5 16H22C22.5523 16 23 15.5523 23 15C23 14.4477 22.5523 14 22 14H5ZM4 24C4 23.4477 4.44772 23 5 23H11C11.5523 23 12 23.4477 12 24C12 24.5523 11.5523 25 11 25H5C4.44772 25 4 24.5523 4 24Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 811 B

3
designer-base/src/main/resources/com/fine/theme/icon/page.svg

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M27 28V13H20C18.8954 13 18 12.1045 18 11V4H5L5 28H27ZM20 4.82843L26.1716 11H20V4.82843ZM5 2C3.89543 2 3 2.89543 3 4V28C3 29.1046 3.89543 30 5 30H27C28.1046 30 29 29.1046 29 28V11.8284C29 11.298 28.7893 10.7893 28.4142 10.4142L20.5858 2.58579C20.2107 2.21071 19.702 2 19.1716 2H5ZM14.4472 25.9454C14.9806 26.0884 15.529 25.7718 15.6719 25.2383L16.0975 23.6499H18C18.5523 23.6499 19 23.2022 19 22.6499C19 22.0976 18.5523 21.6499 18 21.6499H16.6334L17.4373 18.6499H19C19.5523 18.6499 20 18.2022 20 17.6499C20 17.0976 19.5523 16.6499 19 16.6499H17.9732L18.2601 15.5791C18.403 15.0456 18.0865 14.4973 17.553 14.3543C17.0195 14.2114 16.4712 14.528 16.3282 15.0614L15.9026 16.6499H12.9732L13.2601 15.5791C13.403 15.0456 13.0865 14.4973 12.553 14.3543C12.0195 14.2114 11.4712 14.528 11.3282 15.0614L10.9026 16.6499H9C8.44771 16.6499 8 17.0976 8 17.6499C8 18.2022 8.44772 18.6499 9 18.6499H10.3667L9.56286 21.6499H8C7.44771 21.6499 7 22.0976 7 22.6499C7 23.2022 7.44772 23.6499 8 23.6499H9.02696L8.74005 24.7207C8.59711 25.2542 8.91369 25.8025 9.44716 25.9454C9.98063 26.0884 10.529 25.7718 10.6719 25.2383L11.0975 23.6499H14.027L13.7401 24.7207C13.5971 25.2542 13.9137 25.8025 14.4472 25.9454ZM15.3667 18.6499H12.4373L11.6334 21.6499H14.5629L15.3667 18.6499Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

7
designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json

@ -26,6 +26,7 @@
"time": "time.svg",
"logo": "logo.svg",
"pages": "pages.svg",
"page": "page.svg",
"digitalPlatform": "digitalPlatform.svg",
"tables": "tables.svg",
"views": "views.svg",
@ -142,6 +143,7 @@
"image": "insert/image.svg",
"bias": "insert/bias.svg",
"sub_report": "insert/sub_report.svg",
"float_normal": "insert/float_normal.svg",
"popup": {
"normal": "popup/popup.svg"
},
@ -298,8 +300,11 @@
"text_area": "widget/text_area.svg",
"text_field": "widget/text_field.svg",
"widget_tree": "widget/tree.svg",
"ds_column_name": "editor/ds_column_name.svg",
"ds_column_index": "editor/ds_column_index.svg",
"user_widget": "widget/user_widget.svg",
"advanced_editor": "param/advanced_editor.svg",
"function_manage": "function_manage.svg"
"function_manage": "function_manage.svg",
"newline": "newline.svg"
}
}

3
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -1258,6 +1258,9 @@ CellOtherSetPane.height=$Component.defaultHeight
[style]Panel.lightGrey=\
background: $Center.OuterShadowColor
[style]Panel.roundBorder=\
arc: 5
[style]Panel.menuBar=\
background: $MenuBar.background

3
designer-chart/src/main/java/com/fr/design/chart/ChartDialog.java

@ -1,5 +1,6 @@
package com.fr.design.chart;
import com.fine.theme.utils.FineUIStyle;
import com.fr.base.chart.BaseChartCollection;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.dialog.BasicDialog;
@ -54,6 +55,8 @@ public class ChartDialog extends MiddleChartDialog {
ok = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OK"));
cancel = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cancel"));
FineUIStyle.setStyle(ok, FineUIStyle.STYLE_PRIMARY);
this.applyClosingAction();
this.applyEscapeAction();
this.setBasicDialogSize(BasicDialog.DEFAULT);

20
designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java

@ -3,6 +3,10 @@ package com.fr.design.chart;
* the Pane of the Chart
*/
import com.fine.swing.ui.layout.Column;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager;
@ -10,6 +14,7 @@ import com.fr.chartx.attr.ChartProvider;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.base.mode.DesignModeContext;
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.info.ChartInfoCollector;
import com.fr.design.utils.gui.GUICoreUtils;
@ -17,7 +22,6 @@ import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import javax.swing.BorderFactory;
import javax.swing.DefaultListCellRenderer;
import javax.swing.DefaultListModel;
import javax.swing.JList;
@ -73,9 +77,11 @@ public class ChartTypePane extends ChartCommonWizardPane implements CallbackEven
mainTypeList.setSelectedIndex(0);
JSplitPane spane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, typeScrollPane, subListPane);
spane.setDividerLocation(120);
spane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_M_Popup_Chart_Type")));
this.add(spane);
spane.setDividerLocation(150);
Column center = (Column) FineUIUtils.wrapComponentWithTitle(spane, Toolkit.i18nText("Fine-Design_Chart_M_Popup_Chart_Type"));
center.setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
this.add(center);
iconViewList.setSelectedIndex(0);
}
@ -92,11 +98,9 @@ public class ChartTypePane extends ChartCommonWizardPane implements CallbackEven
ChartIcon chartIcon = (ChartIcon) value;
if (isSelected) {
// 深蓝色.
this.setBackground(new Color(57, 107, 181));
this.setBorder(GUICoreUtils.createTitledBorder(getChartName(chartIcon), Color.WHITE));
} else {
this.setBorder(GUICoreUtils.createTitledBorder(getChartName(chartIcon)));
this.setBackground(FlatUIUtils.getUIColor("Tree.selectionBackground", new Color(57, 107, 181)));
}
this.setBorder(GUICoreUtils.createTitledBorder(getChartName(chartIcon)));
}
return this;

9
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/TableDataPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.chart.gui.data;
import com.fine.swing.ui.layout.Column;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.TableData;
import com.fr.chart.chartattr.Chart;
@ -22,6 +23,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
private static final long serialVersionUID = 4740461028440155147L;
private DatabaseTableDataPane tableDataPane;
private AbstractTableDataContentPane dataContentPane;
protected Column centerPane;
private ChartDataPane parent;
@ -44,7 +46,10 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
checkBoxUse();
}
};
this.add(tableDataPane, BorderLayout.NORTH);
centerPane = new Column();
centerPane.setSpacing(10);
centerPane.add(tableDataPane);
this.add(centerPane, BorderLayout.CENTER);
}
/**
@ -116,7 +121,7 @@ public class TableDataPane extends FurtherBasicBeanPane<ChartCollection>{
}
dataContentPane = contentPane;
if(dataContentPane != null) {
add(dataContentPane, BorderLayout.CENTER);
centerPane.add(dataContentPane);
}
}

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

@ -1,9 +1,13 @@
package com.fr.design.mainframe.chart.gui.data.table;
import com.fine.swing.ui.layout.Column;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.Utils;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartattr.MeterPlot;
import com.fr.chart.chartdata.MeterTableDefinition;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.icombobox.UIComboBox;
@ -12,19 +16,14 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.ChartDataFilterPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.extended.chart.StringFormula;
import com.fr.extended.chart.UIComboBoxWithNone;
import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
@ -40,21 +39,16 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
private static final String METER_VALUE = Toolkit.i18nText("Fine-Design_Chart_Value_Pointer");
private static final String TARGET_VALUE = Toolkit.i18nText("Fine-Design_Chart_Target_Value");
private static final int COMBOBOX_WIDTH = 115;
private static final int COMBOBOX_HEIGHT = 20;
private static final int LABEL_WIDTH = 85;
private UIComboBox nameBox;
private UIComboBox valueBox;
private UIComboBox targetBox;
private TinyFormulaPane custom;
private ChartDataFilterPane filterPane;
private JPanel boxPane;
private Column boxPane;
public MeterPlotTableDataContentPane(ChartDataPane parent) {
this.setLayout(new BorderLayout());
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
nameBox = new UIComboBoxWithNone();
nameBox.setSelectedIndex(nameBox.getItemCount() -1);
@ -63,8 +57,8 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
custom = new DefaultTinyFormulaPane();
filterPane = new ChartDataFilterPane(new MeterPlot(), parent);
boxPane = new JPanel();
boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS));
boxPane = new Column();
boxPane.setSpacing(10);
JPanel namePane = createPaneWithLabel(Toolkit.i18nText(METER_NAME), getNameComponent());
boxPane.add(namePane);
@ -92,11 +86,7 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
}
});
JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane);
filterPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15));
boxPane.setBorder(BorderFactory.createEmptyBorder(7, 24, 7, 15));
jPanel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 5));
JPanel jPanel = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Filter"), filterPane, true);
this.add(getJSeparator(), BorderLayout.NORTH);
this.add(boxPane, BorderLayout.CENTER);
@ -108,12 +98,8 @@ public class MeterPlotTableDataContentPane extends AbstractTableDataContentPane
}
private JPanel createPaneWithLabel(String labelName, Component component) {
component.setPreferredSize(new Dimension(COMBOBOX_WIDTH, COMBOBOX_HEIGHT));
UILabel label = new BoldFontTextLabel(labelName);
label.setPreferredSize(new Dimension(LABEL_WIDTH, COMBOBOX_HEIGHT));
JPanel paneWithLabel = GUICoreUtils.createBorderLayoutPane(new Component[]{component, null, null, label, null});
paneWithLabel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 0));
return paneWithLabel;
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, label, component);
}
protected void refreshBoxListWithSelectTableData(List list) {

9
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithThemeStyle.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.chart.gui.style;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.base.TextAttr;
import com.fr.design.gui.ibutton.UIButtonGroup;
@ -37,13 +38,9 @@ public class ChartTextAttrPaneWithThemeStyle extends ChartTextAttrPane {
preButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Follow_Theme"),
Toolkit.i18nText("Fine-Design_Chart_Custom")});
double f = TableLayout.FILL;
double e = getEdithAreaWidth();
double p = TableLayout.PREFERRED;
double[] columnSize = {f, e};
UILabel text = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Character"), SwingConstants.LEFT);
JPanel preButtonPane = TableLayout4VanChartHelper.createGapTableLayoutPane(new Component[][]{new Component[]{text, preButton}}, new double[]{p}, columnSize);
textFontPane = TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), getRowSize(), columnSize);
JPanel preButtonPane = FineLayoutBuilder.compatibleTableLayout(10, new Component[][]{new Component[]{text, preButton}}, new double[]{1.2, 3});
textFontPane = FineLayoutBuilder.compatibleTableLayout(10, getComponents(buttonPane), new double[]{1.2, 3});
panel.add(preButtonPane, BorderLayout.CENTER);
panel.add(textFontPane, BorderLayout.SOUTH);
return panel;

19
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/AbstractPlotSeriesPane.java

@ -1,17 +1,20 @@
package com.fr.design.mainframe.chart.gui.style.series;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Bar2DPlot;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.style.ChartFillStylePane;
import javax.swing.*;
import java.awt.*;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import java.awt.BorderLayout;
import java.awt.Component;
/**
* 属性表, 图表样式 - 系列 界面, 通过重载继承每个不同的方法, 得到内容的组合.
* @author kunsnat E-mail:kunsnat@gmail.com
@ -37,10 +40,6 @@ public abstract class AbstractPlotSeriesPane extends BasicBeanPane<Plot>{
}
protected JPanel getContentPane(boolean custom) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p, p, p};
Component[][] components = new Component[3][1];
JPanel panel;
@ -51,7 +50,7 @@ public abstract class AbstractPlotSeriesPane extends BasicBeanPane<Plot>{
components[1] = new Component[]{new JSeparator()};
}
panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
panel = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
JScrollPane scrollPane = new JScrollPane();
scrollPane.setViewportView(panel);
@ -68,7 +67,7 @@ public abstract class AbstractPlotSeriesPane extends BasicBeanPane<Plot>{
components[2] = new Component[]{contentPane};
}
panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
panel = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
}
return panel;

14
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java

@ -13,9 +13,11 @@ import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import static com.fine.theme.utils.FineUIScale.scale;
public class ChartImagePane extends ChartSelectDemoPane {
private static final long serialVersionUID = -2785128245790568603L;
private static final int IMAGE_WIDTH = 58;
private static final int IMAGE_WIDTH = 56;
private static final int IMAGE_HIGTH = 50;
private static final Color ENTER_COLOR = new Color(216, 242, 253);
private boolean isDrawRightLine = false;
@ -30,7 +32,7 @@ public class ChartImagePane extends ChartSelectDemoPane {
this.setBorder(BorderFactory.createMatteBorder(0, 0, 0, isDrawRightLine ? 1 : 0, UIConstants.SELECT_TAB));
this.setBackground(UIConstants.TOOLBARUI_BACKGROUND);
this.setPreferredSize(new Dimension(IMAGE_WIDTH, IMAGE_HIGTH));
this.setPreferredSize(getScaledDimension());
}
public ChartImagePane(String fullIconPath, String tipName, boolean isDrawRightLine){
@ -45,7 +47,7 @@ public class ChartImagePane extends ChartSelectDemoPane {
super.paint(g);
BufferedImage image1 = IOUtils.readImageWithCache(fullIconPath);
g.drawImage(image1, 0, 0, IMAGE_WIDTH, IMAGE_HIGTH, null);
g.drawImage(image1, 0, 0, scale(IMAGE_WIDTH), scale(IMAGE_HIGTH), null);
}
};
@ -58,8 +60,12 @@ public class ChartImagePane extends ChartSelectDemoPane {
this.setBorder(BorderFactory.createMatteBorder(0, 0, 0, isDrawRightLine ? 1 : 0, UIConstants.SELECT_TAB));
this.setBackground(UIConstants.TOOLBARUI_BACKGROUND);
this.setPreferredSize(new Dimension(IMAGE_WIDTH, IMAGE_HIGTH));
this.setPreferredSize(getScaledDimension());
}
private Dimension getScaledDimension() {
return scale(new Dimension(IMAGE_WIDTH, IMAGE_HIGTH));
}
/**

8
designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java

@ -42,10 +42,10 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup {
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
NameableCreator[] related4ChartHyper = {
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), formHyperlink.getClass(), FormHyperlinkPane.class)};
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float"), ChartHyperRelateFloatLink.class, ChartHyperRelateFloatLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), formHyperlink.getClass(), FormHyperlinkPane.class)};
return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper);
}

6
designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java

@ -32,9 +32,9 @@ public class FormHyperlinkGroup extends BaseHyperlinkGroup {
public NameableCreator[] getHyperlinkCreators() {
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
NameableCreator[] related4ChartHyper = {
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), formHyperlink.getClass(), FormHyperlinkPane.class)};
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Float_Chart"), ChartHyperPoplink.class, ChartHyperPoplinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Cell"), ChartHyperRelateCellLink.class, ChartHyperRelateCellLinkPane.ChartNoRename.class),
new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyperlink_Form_Link"), formHyperlink.getClass(), FormHyperlinkPane.class)};
return ArrayUtils.addAll(super.getHyperlinkCreators(), related4ChartHyper);
}

14
designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaSeriesPane.java

@ -1,13 +1,12 @@
package com.fr.van.chart.area;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.foldablepane.UIExpandablePane;
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.van.chart.column.VanChartCustomStackAndAxisConditionPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartBeautyPane;
import com.fr.van.chart.designer.component.VanChartLineTypePane;
import com.fr.van.chart.designer.component.VanChartLineTypePaneWithoutDashed;
@ -27,11 +26,6 @@ public class VanChartAreaSeriesPane extends VanChartLineSeriesPane {
protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p, p, p, p, p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{createLineTypePane()},
new Component[]{createMarkerPane()},
@ -42,7 +36,7 @@ public class VanChartAreaSeriesPane extends VanChartLineSeriesPane {
new Component[]{createTrendLinePane()},
};
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
contentPane = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
return contentPane;
}
@ -61,6 +55,6 @@ public class VanChartAreaSeriesPane extends VanChartLineSeriesPane {
protected JPanel createMarkerPane() {
markerPane = new VanChartMarkerPane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane, true);
}
}

4
designer-chart/src/main/java/com/fr/van/chart/custom/component/MeterCustomPlotTableDataContentPane.java

@ -8,14 +8,11 @@ import com.fr.design.mainframe.chart.gui.data.table.MeterPlotTableDataContentPan
import com.fr.plugin.chart.data.VanChartMeterCustomTableDefinition;
import java.awt.Component;
import java.awt.Dimension;
/**
* Created by Fangjie on 2016/5/18.
*/
public class MeterCustomPlotTableDataContentPane extends MeterPlotTableDataContentPane {
private static final int TEXT_HT = 20;
private static final int TEXT_WD = 80;
private UITextField nameField;
public MeterCustomPlotTableDataContentPane(ChartDataPane parent) {
super(parent);
@ -24,7 +21,6 @@ public class MeterCustomPlotTableDataContentPane extends MeterPlotTableDataConte
@Override
protected Component getNameComponent() {
nameField = new UITextField();
nameField.setPreferredSize(new Dimension(TEXT_WD, TEXT_HT));
return nameField;
}

3
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.custom.component;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.web.ChartHyperPoplink;
@ -43,6 +44,7 @@ import com.fr.stable.Nameable;
import com.fr.stable.bridge.StableFactory;
import com.fr.van.chart.designer.component.VanChartUIListControlPane;
import java.awt.Dimension;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.lang.reflect.Constructor;
@ -59,6 +61,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
public VanChartHyperLinkPane() {
super();
setPreferredSize(FineUIScale.scale(new Dimension(224, 420)));
}
@Override

11
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartBeautyPane.java

@ -1,14 +1,13 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.base.GradientStyle;
import com.fr.design.beans.BasicBeanPane;
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.plugin.chart.type.GradientType;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import java.awt.BorderLayout;
@ -37,17 +36,11 @@ public class VanChartBeautyPane extends BasicBeanPane<GradientStyle> {
gradientTypeBox = new UIButtonGroup(names);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(labelName()), gradientTypeBox},
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
protected String[] getNameArray() {

8
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartFillStylePane.java

@ -10,8 +10,6 @@ import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.mainframe.predefined.ui.detail.ColorFillStylePane;
import com.fr.design.utils.gui.GUICoreUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
@ -36,12 +34,6 @@ public class VanChartFillStylePane extends ColorFillStylePane implements Designe
this.add(getContentPane(), BorderLayout.CENTER);
}
protected JPanel getContentPane() {
JPanel contentPane = super.getContentPane();
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
return contentPane;
}
protected Component[][] contentPaneComponents() {
return new Component[][]{
new Component[]{null, null},

26
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartGanttTimeLinePane.java

@ -1,17 +1,15 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
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.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent;
import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
@ -27,13 +25,12 @@ public class VanChartGanttTimeLinePane extends JPanel {
public VanChartGanttTimeLinePane() {
this.setLayout(new BorderLayout());
this.add(createSwitchButtonPane(), BorderLayout.NORTH);
this.add(createCenterPane(), BorderLayout.CENTER);
this.add(FineLayoutBuilder.createVerticalLayout(10,
createSwitchButtonPane(), createCenterPane()
));
}
private JPanel createSwitchButtonPane() {
double[] columnSize = {TableLayout.PREFERRED, TableLayout.FILL};
double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED};
String[] array = new String[]{Toolkit.i18nText("Fine-Design_Chart_Guide_Line_Not_Show"), Toolkit.i18nText("Fine-Design_Chart_Guide_Line_Show")};
switchButton = new UIButtonGroup<>(array);
switchButton.addChangeListener(new ChangeListener() {
@ -42,25 +39,20 @@ public class VanChartGanttTimeLinePane extends JPanel {
setCenterPaneVisibility();
}
});
UILabel text = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Guide_Line_Current_Line"), SwingConstants.LEFT);
return TableLayout4VanChartHelper.createGapTableLayoutPane(new Component[][] {
new Component[]{null, null},
UILabel text = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Guide_Line_Current_Line"));
return FineLayoutBuilder.compatibleTableLayout(10, new Component[][] {
new Component[] {text, switchButton}
}, rowSize, columnSize);
}, new double[]{1.2, 3});
}
private JPanel createCenterPane() {
double[] columnSize = {TableLayout.FILL, TableLayout4VanChartHelper.EDIT_AREA_WIDTH};
double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED};
colorSelect = new ColorSelectBoxWithOutTransparent(100);
opacity = new UINumberDragPaneWithPercent(0, 100);
centerPane = TableLayout4VanChartHelper.createGapTableLayoutPane(new Component[][] {
new Component[]{null, null},
centerPane = FineLayoutBuilder.compatibleTableLayout(10, new Component[][] {
new Component[] {new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), colorSelect},
new Component[] {new UILabel(Toolkit.i18nText("Fine-Design_Report_Alpha")), opacity}
}, rowSize, columnSize);
}, new double[]{1.2, 3});
centerPane.setVisible(false);

56
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java

@ -1,27 +1,28 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.dialog.BasicPane;
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.gui.ispinner.chart.UISpinnerWithPx;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.ComparatorUtils;
import com.fr.plugin.chart.base.VanChartAttrLine;
import com.fr.plugin.chart.type.LineStyle;
import com.fr.plugin.chart.type.LineType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import java.util.Arrays;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
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;
/**
* line相关设置
*/
@ -51,22 +52,14 @@ public class VanChartLineTypePane extends BasicPane {
Toolkit.i18nText("Fine-Design_Chart_Open"),
Toolkit.i18nText("Fine-Design_Chart_Close")});
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
Component[] lineStyleComponent = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Style_Present")), lineStyle},
nullValueBreakComponent = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Null_Value_Break")), nullValueBreak};
Component[][] components = createContentComponent(lineStyleComponent, nullValueBreakComponent);
double[] row = new double[components.length];
Arrays.fill(row, p);
double[] col = {f, e};
lineStylePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
lineStylePane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
this.setLayout(new BorderLayout(0, 6));
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
this.add(typeAndWidthPane, BorderLayout.NORTH);
this.add(lineStylePane, BorderLayout.CENTER);
}
@ -84,29 +77,16 @@ public class VanChartLineTypePane extends BasicPane {
checkLineStyle();
}
});
Component[][] lineTypeComps = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), lineTypeComboBox}
};
Component[][] lineWidthComps = new Component[][]{
new Component[]{
FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Line_Width")),
UIComponentUtils.wrapWithBorderLayoutPane(lineWidthSpinner)}
};
double p = TableLayout.PREFERRED, f = TableLayout.FILL, e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = {f, e};
JPanel lineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineTypeComps, new double[]{p, p}, col);
lineWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineWidthComps, new double[]{p}, col);
JPanel contentPane = new JPanel(new BorderLayout(0, 6));
contentPane.add(lineTypePane, BorderLayout.CENTER);
contentPane.add(lineWidthPane, BorderLayout.SOUTH);
return contentPane;
lineWidthPane = row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Width"))).weight(1.2), cell(lineWidthSpinner).weight(3)
).getComponent();
return column(10,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style"))).weight(1.2),
cell(lineTypeComboBox).weight(3)
),
cell(lineWidthPane)).getComponent();
}
protected LineTypeComboBox createLineType() {

9
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartMarkerPane.java

@ -1,6 +1,9 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
@ -30,7 +33,7 @@ public class VanChartMarkerPane extends BasicPane {
private BasicBeanPane imageMarkerPane;
public VanChartMarkerPane() {
this.setLayout(new BorderLayout(0, 4));
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
String[] array = new String[]{Toolkit.i18nText("Fine-Design_Chart_Rule"), Toolkit.i18nText("Fine-Design_Chart_Custom")};
commonORCustom = new UIButtonGroup<String>(array, array);
@ -88,7 +91,9 @@ public class VanChartMarkerPane extends BasicPane {
}
protected void layoutComponents() {
this.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Point_Style"), commonORCustom), BorderLayout.NORTH);
this.add(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Point_Style")), commonORCustom
), BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
}

5
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.base.AttrColor;
import com.fr.chart.base.AttrLineStyle;
import com.fr.chart.base.LineStyleInfo;
@ -96,8 +97,8 @@ public class VanChartTrendLinePane extends BasicPane{
new Component[]{label, periodPane}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, new double[]{p,p,p}, col);
trendLineHidePane = TableLayout4VanChartHelper.createGapTableLayoutPane(componentsMayHide, new double[]{p,p,p,p}, col);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2 ,3});
trendLineHidePane = FineLayoutBuilder.compatibleTableLayout(10, componentsMayHide, new double[]{1.2 ,3});
trendLineStyle.addActionListener(new ActionListener() {
@Override

20
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java

@ -1,20 +1,14 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.light.ui.FineButtonBorder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.Nameable;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
@ -24,7 +18,6 @@ import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Point;
import java.awt.Window;
@ -51,7 +44,6 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem
public VanChartUIListControlPane() {
super();
this.setBorder(null);
getToolBar().setBorder(new FineButtonBorder());
iniListener();
}
@ -102,18 +94,6 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem
this.listenerList.add(ChangeListener.class, l);
}
@Override
protected JPanel getLeftTopPane(UIToolbar topToolBar) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), topToolBar},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
@Override
public void saveSettings() {

11
designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.component.background;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.background.ImageBackground;
import com.fr.chart.chartglyph.GeneralInfo;
import com.fr.design.dialog.BasicPane;
@ -9,7 +10,6 @@ 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.TableLayout;
import com.fr.design.mainframe.backgroundpane.BackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane;
@ -17,7 +17,6 @@ import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.VanChartGradientPane;
import com.fr.general.Background;
import com.fr.stable.Constants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
@ -72,13 +71,7 @@ public class VanChartBackgroundPane extends BasicPane {
}
protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p, p, p};
return TableLayout4VanChartHelper.createGapTableLayoutPane(getPaneComponents(), rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, getPaneComponents(), new double[]{1.2, 3});
}
protected void initComponents() {

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

@ -1,16 +1,10 @@
package com.fr.van.chart.designer.component.background;
import com.fr.design.constants.LayoutConstants;
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.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.Component;
/**
@ -27,21 +21,6 @@ public class VanChartBackgroundPaneWithOutImageAndShadow extends VanChartBackgro
super(hasAuto);
}
@Override
protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH};
double[] rowSize = {p, p, p};
JPanel tableLayoutPane = TableLayoutHelper.createGapTableLayoutPane(getPaneComponents(), rowSize, columnSize,
TableLayout4VanChartHelper.COMPONENT_INTERVAL, LayoutConstants.VGAP_MEDIUM);
tableLayoutPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 4, 0));
return tableLayoutPane;
}
@Override
protected void initList() {
paneList.add(new NullBackgroundQuickPane() {

16
designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartMarkerBackgroundPane.java

@ -2,15 +2,10 @@ package com.fr.van.chart.designer.component.background;
import com.fr.base.background.ColorBackground;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.BackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.mainframe.backgroundpane.NullBackgroundQuickPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import java.awt.Component;
/**
@ -19,17 +14,6 @@ import java.awt.Component;
public class VanChartMarkerBackgroundPane extends VanChartBackgroundPane {
private static final long serialVersionUID = -1032221277140976934L;
protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
return TableLayoutHelper.createTableLayoutPane(getPaneComponents(), rowSize, columnSize);
}
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{null, null},

29
designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartCommonMarkerPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.component.marker;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
@ -7,8 +8,6 @@ import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.chart.UISpinnerWithPx;
import com.fr.design.gui.xcombox.MarkerComboBox;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -71,17 +70,6 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
public VanChartCommonMarkerPane() {
markerTypeComboBox = new MarkerComboBox(getMarkers());
markerFillColor = new VanChartMarkerBackgroundPane() {
protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = getColumnSize()[1];
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
return TableLayoutHelper.createTableLayoutPane(getPaneComponents(), rowSize, columnSize);
}
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{null, null},
@ -92,10 +80,8 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
};
radius = new UISpinnerWithPx(0, 100, 0.5, 0);
double p = TableLayout.PREFERRED;
markerTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(getMarkerTypeComponent(), new double[]{p}, getColumnSize());
markerConfigPane = TableLayout4VanChartHelper.createGapTableLayoutPane(getMarkerConfigComponent(), new double[]{p, p}, getColumnSize());
markerTypePane = FineLayoutBuilder.compatibleTableLayout(10, getMarkerTypeComponent(), new double[]{1.2, 3});
markerConfigPane = FineLayoutBuilder.compatibleTableLayout(10, getMarkerConfigComponent(), new double[]{1.2, 3});
markerTypeComboBox.addActionListener(new ActionListener() {
@Override
@ -103,13 +89,8 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
checkMarkType();
}
});
JPanel contentPane = new JPanel(new BorderLayout(0, 6));
contentPane.add(markerTypePane, BorderLayout.CENTER);
contentPane.add(markerConfigPane, BorderLayout.SOUTH);
this.add(contentPane);
this.setLayout(new BorderLayout());
this.add(FineLayoutBuilder.createVerticalLayout(10, markerTypePane, markerConfigPane));
}
protected Component[][] getMarkerTypeComponent() {

29
designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartImageMarkerPane.java

@ -1,12 +1,11 @@
package com.fr.van.chart.designer.component.marker;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.background.ImageFileBackground;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.chart.UISpinnerWithPx;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane;
import com.fr.plugin.chart.base.VanChartAttrMarker;
@ -14,12 +13,16 @@ import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.stable.Constants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
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.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by Mitisky on 16/5/19.
*/
@ -30,25 +33,18 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
public VanChartImageMarkerPane() {
imageBackgroundPane = new ImageBackgroundQuickPane(false);
imageBackgroundPane.setPreferredSize(getImageBackgroundPreferredSize(imageBackgroundPane.getPreferredSize()));
width = new UISpinnerWithPx(0, Integer.MAX_VALUE, 0.5, 30);
height = new UISpinnerWithPx(0, Integer.MAX_VALUE, 0.5, 30);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p};
double[] col = {p, f};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Width")), width},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height")), height},
};
JPanel sizePanel = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel sizePanel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
JPanel panel = createContentPane(imageBackgroundPane, sizePanel);
panel.setBorder(BorderFactory.createEmptyBorder(0, 72, 0, 0));
this.setLayout(new BorderLayout());
this.add(panel);
}
@ -57,10 +53,11 @@ public class VanChartImageMarkerPane extends BasicBeanPane<VanChartAttrMarker> {
}
protected JPanel createContentPane(ImageBackgroundQuickPane imageBackgroundPane, JPanel sizePanel) {
JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(imageBackgroundPane, BorderLayout.CENTER);
panel.add(sizePanel, BorderLayout.SOUTH);
return panel;
return row(
flex(1.2), column(10,
cell(imageBackgroundPane), cell(sizePanel)
).weight(3)
).getComponent();
}
/**

36
designer-chart/src/main/java/com/fr/van/chart/designer/other/AutoRefreshPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.designer.other;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionListener;
import com.fr.design.dialog.UIDialog;
@ -9,23 +10,19 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.plugin.chart.attr.plot.VanChartPlot;
import com.fr.plugin.chart.base.RefreshMoreLabel;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -57,7 +54,6 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
protected JPanel createContentPane() {
JPanel content = new JPanel(new BorderLayout(0, 6));
moreLabel = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")});
moreLabel.addChangeListener(new ChangeListener() {
@Override
@ -82,34 +78,27 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
jPanel.add(autoTooltip, BorderLayout.CENTER);
jPanel.add(tooltipSet, BorderLayout.EAST);
JPanel moreLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_More_Label"), moreLabel);
JPanel moreLabelPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_More_Label")), moreLabel);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f, 20};
double[] column = {f, 20};
double[] rowSize = {p};
Component[][] components = initComponent(jPanel);
JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
JPanel panel1 = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 1.2, 1.2, 0.6});
contentPane = new JPanel(new BorderLayout());
contentPane.add(panel1, BorderLayout.CENTER);
Component[][] AutoTooltipComponent = initAutoTooltipComponent();
JPanel panel2 = TableLayout4VanChartHelper.createGapTableLayoutPane(AutoTooltipComponent, rowSize, column);
panel2.setBorder(BorderFactory.createEmptyBorder(10, 0,0,0));
JPanel panel2 = FineLayoutBuilder.compatibleTableLayout(10, AutoTooltipComponent, new double[]{1.2, 2, 1});
contentPane.add(panel2, BorderLayout.SOUTH);
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 72,0,0));
content.add(moreLabelPane, BorderLayout.NORTH);
content.add(contentPane, BorderLayout.CENTER);
return content;
return FineLayoutBuilder.createVerticalLayout(10, moreLabelPane, contentPane);
}
protected Component[][] initComponent(JPanel autoTooltipPane){
return new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Interval")), autoRefreshTime, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Seconds"))},
new Component[]{autoTooltip,null, tooltipSet},
new Component[]{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Interval")),
autoRefreshTime, new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Seconds"))},
new Component[]{null, autoTooltip, null, tooltipSet},
};
}
@ -117,13 +106,12 @@ public class AutoRefreshPane extends BasicBeanPane<RefreshMoreLabel> {
protected Component[][] initAutoTooltipComponent () {
return new Component[][]{
new Component[]{autoTooltip, tooltipSet},
new Component[]{null, autoTooltip, tooltipSet},
};
}
private void initTooltipSet() {
tooltipSet = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/config.png"));
tooltipSet.setPreferredSize(new Dimension(20, 20));
tooltipSet = new UIButton(new LazyIcon("tool_config"));
tooltipSet.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {

101
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java

@ -1,5 +1,7 @@
package com.fr.van.chart.designer.other;
import com.fine.swing.ui.layout.Column;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.BaseFormula;
import com.fr.base.Utils;
import com.fr.chart.chartattr.Chart;
@ -7,6 +9,7 @@ import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.ConditionAttr;
import com.fr.chart.chartglyph.ConditionCollection;
import com.fr.chartx.attr.LargeDataModeType;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UINumberDragPane;
@ -20,7 +23,6 @@ import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.ispinner.UnsignedIntUISpinner;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
@ -48,11 +50,9 @@ import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.other.zoom.ZoomPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
@ -127,30 +127,23 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
}
protected JPanel getInteractivePane(VanChartPlot plot) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p, p, p, p, p};
Component[][] components = ChartEditContext.normalMode() ? new Component[][]{
new Component[]{createToolBarPane(getToolBarRowSize(), columnSize), null},
new Component[]{createToolBarPane(), null},
//大数据模式 恢复用注释。取消注释。
//new Component[]{createLargeDataModePane(), null},
new Component[]{createAnimationPane(), null},
new Component[]{createAxisRotationPane(new double[]{p, p}, columnSize, plot), null},
new Component[]{createAxisRotationPane(plot), null},
new Component[]{createZoomPane(plot), null},
new Component[]{createAutoRefreshPane(plot), null},
new Component[]{createHyperlinkPane(), null}
} : new Component[][]{
new Component[]{createToolBarPane(getToolBarRowSize(), columnSize), null},
new Component[]{createToolBarPane(), null},
new Component[]{createAnimationPane(), null},
new Component[]{createAxisRotationPane(new double[]{p, p}, columnSize, plot), null},
new Component[]{createZoomPane(plot), null}
new Component[]{createAxisRotationPane(plot), null},
new Component[]{createZoomPane(plot, false), null}
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1, 0});
}
//大数据模式 恢复用注释。取消注释。
@ -192,27 +185,25 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
}
protected JPanel createZoomPane(VanChartPlot plot) {
//图表缩放新设计 恢复用注释。取消注释。
// zoomPane = createZoomPane();
// if (zoomPane == null) {
// return null;
// }
// return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Zoom"), zoomPane);
return this.createZoomPane(plot, true);
}
//图表缩放新设计 恢复用注释。删除下面方法体所有代码。
protected JPanel createZoomPane(VanChartPlot plot, boolean withUnderline) {
if (!plot.isSupportZoomDirection()) {
return null;
}
zoomWidget = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Open_Zoom_Control"));
zoomGesture = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Open"), Toolkit.i18nText("Fine-Design_Chart_Close")});
JPanel zoomWidgetPane = TableLayout4VanChartHelper.createGapTableLayoutPaneWithoutTop(Toolkit.i18nText("Fine-Design_Chart_Zoom_Widget"), zoomWidget);
JPanel zoomGesturePane = TableLayout4VanChartHelper.createGapTableLayoutPaneWithoutTop(Toolkit.i18nText("Fine-Design_Chart_ZoomGesture"), zoomGesture);
JPanel zoomWidgetPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Zoom_Widget")), zoomWidget);
JPanel zoomGesturePane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_ZoomGesture")), zoomGesture);
zoomType = new UIButtonGroup(getNameArray(), getValueArray());
zoomTypePane = getZoomTypePane(zoomType);
JPanel panel = createZoomPaneContent(zoomWidgetPane, zoomGesturePane, plot);
zoomWidget.addActionListener((event) -> checkZoomPane());
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Use_Zoom"), panel);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Use_Zoom"), panel, withUnderline);
}
private void createChangeEnablePane(VanChartRectanglePlot plot) {
@ -235,17 +226,11 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
centerPane.add(scaleAxisPane, scaleAxis);
centerPane.add(scrollPane, scroll);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] row = {p, p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Control_Type")), controlType},
new Component[]{centerPane, null}
};
changeEnablePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize);
changeEnablePane.setBorder(BorderFactory.createEmptyBorder(5, 12, 0, 0));
changeEnablePane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
controlType.addActionListener((event) -> checkCardPane());
}
@ -259,14 +244,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_From")), from},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_To")), to},
};
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] row = {p, p, p};
JPanel resizePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize);
return resizePane;
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
@ -274,11 +252,6 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
VanChartAxis vanChartAxis = plot.getCategoryAxisList().get(0);
AxisType axisType = vanChartAxis.getAxisType();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] row = {p};
Component[][] components;
if (axisType == AxisType.AXIS_CATEGORY) {
categoryNum = new UnsignedIntUISpinner(1, Double.MAX_VALUE, 1);
@ -291,7 +264,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Scaling")), scaling},
};
}
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
protected void checkCardPane() {
@ -312,13 +285,14 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
}
protected JPanel createZoomPaneContent(JPanel zoomWidgetPane, JPanel zoomGesturePane, VanChartPlot plot) {
JPanel panel = new JPanel(new BorderLayout(0, 4));
Column panel = new Column();
panel.setSpacing(10);
if (plot.isSupportZoomCategoryAxis()) {//支持缩放控件
createChangeEnablePane((VanChartRectanglePlot) plot);
panel.add(zoomWidgetPane, BorderLayout.NORTH);
panel.add(changeEnablePane, BorderLayout.CENTER);
panel.add(zoomWidgetPane);
panel.add(changeEnablePane);
}
panel.add(zoomTypePane, BorderLayout.SOUTH);
panel.add(zoomTypePane);
return panel;
}
@ -430,7 +404,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
return null;
}
private JPanel createAxisRotationPane(double[] row, double[] col, VanChartPlot plot) {
private JPanel createAxisRotationPane(VanChartPlot plot) {
if (!(plot.getAxisPlotType() == AxisPlotType.RECTANGLE)) {
return null;
}
@ -449,12 +423,12 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Reversal")), axisRotation}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis"), panel);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Axis"), panel, true);
}
protected JPanel createToolBarPane(double[] row, double[] col) {
protected JPanel createToolBarPane() {
isSort = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Sort"));
exportImages = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Export_Image"));
fullScreenDisplay = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_FullScreen_Display"));
@ -462,8 +436,8 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
Component[][] components = createToolBarComponents();
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_ToolBar"), panel);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_ToolBar"), panel, true);
}
protected double[] getToolBarRowSize() {
@ -492,24 +466,19 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
protected JPanel createAnimationPane() {
isChartAnimation = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")});
chartAnimationLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Animation_Effects"));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{chartAnimationLabel, isChartAnimation}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation"), panel);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Animation"), panel, true);
}
protected JPanel createAutoRefreshPane(VanChartPlot plot) {
autoRefreshPane = getMoreLabelPane(plot);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Moniter_refresh"), autoRefreshPane);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Moniter_refresh"), autoRefreshPane, true);
}
protected AutoRefreshPane getMoreLabelPane(VanChartPlot plot) {
@ -519,7 +488,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
protected JPanel createHyperlinkPane() {
superLink = new VanChartHyperLinkPane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert_Hyperlink"), superLink);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert_Hyperlink"), superLink);
}
private void checkLargeDataMode() {

9
designer-chart/src/main/java/com/fr/van/chart/designer/style/VanChartTitlePane.java

@ -1,6 +1,6 @@
package com.fr.van.chart.designer.style;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineComponentsFactory;
import com.fine.theme.utils.FineUIStyle;
import com.fr.base.BaseFormula;
import com.fr.base.Utils;
@ -33,7 +33,6 @@ import com.fr.van.chart.designer.AbstractVanChartScrollPane;
import com.fr.van.chart.designer.component.VanChartFloatPositionPane;
import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutShadowWithRadiusPane;
import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
@ -144,11 +143,7 @@ public class VanChartTitlePane extends AbstractVanChartScrollPane<VanChart> {
}
private JPanel createTitlePositionPane() {
Icon[][] hAlignmentIconArray = {{new LazyIcon("h_left"), new LazyIcon("h_left").white()},
{new LazyIcon("h_center"), new LazyIcon("h_center").white()},
{new LazyIcon("h_right"), new LazyIcon("h_right").white()}};
Integer[] alignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT};
alignmentPane = new UIButtonGroup<>(hAlignmentIconArray, alignment);
alignmentPane = FineComponentsFactory.createHorizontalAlignmentButtonGroup();
customFloatPositionButton = new UIToggleButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Float_Position"));
UIComponentUtils.setLineWrap(customFloatPositionButton);
customFloatPositionButton.setEventBannded(true);

12
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java

@ -1,9 +1,12 @@
package com.fr.van.chart.designer.style.axis;
import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.chart.base.ColorWithThemeStyle;
import com.fr.chart.chartattr.Axis;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.PaneTitleConstants;
import com.fr.general.ComparatorUtils;
@ -13,10 +16,8 @@ import com.fr.plugin.chart.attr.axis.VanChartValueAxis;
import com.fr.plugin.chart.type.AxisType;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import com.fr.van.chart.designer.AbstractVanChartScrollPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
@ -58,11 +59,12 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll
}
protected void initLayout() {
this.setLayout(new BorderLayout(0,6));
JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Type"), jcb);
northPane.setBorder(BorderFactory.createEmptyBorder(0,5,0,0));
this.setLayout(new BorderLayout());
JPanel northPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Type")), jcb);
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);
setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
}

22
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisStyleSettingPane.java

@ -1,5 +1,7 @@
package com.fr.van.chart.designer.style.axis;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
import com.fr.chart.base.TextAttr;
import com.fr.design.beans.BasicBeanPane;
@ -8,13 +10,11 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.attr.axis.VanChartAxisLabelStyle;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.axis.component.AxisLabelDisplayComboBox;
import javax.swing.JPanel;
@ -41,14 +41,10 @@ public class VanChartAxisStyleSettingPane extends BasicBeanPane<VanChartAxisLabe
public VanChartAxisStyleSettingPane(boolean showLabelDisplayPane, ChartTextAttrPane textAttrPane) {
this.showLabelDisplayPane = showLabelDisplayPane;
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] column = {f, s};
double[] row = {p, p, p};
labelDisplayComboBox = new AxisLabelDisplayComboBox();
labelDisplayPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show"), labelDisplayComboBox, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
labelDisplayPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3} ,
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Show")), labelDisplayComboBox);
labelDisplayPane.setVisible(showLabelDisplayPane);
labelTextAttrPane = textAttrPane;
@ -56,10 +52,10 @@ public class VanChartAxisStyleSettingPane extends BasicBeanPane<VanChartAxisLabe
labelGapStyle = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Automatic"), Toolkit.i18nText("Fine-Design_Chart_Fixed")});
labelGapValue = new UITextField();
labelGapPane = createLabelGapPane(row, column);
labelGapPane = createLabelGapPane();
this.setLayout(new BorderLayout());
contentPane = new JPanel(new BorderLayout());
contentPane = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
contentPane.add(labelDisplayPane, BorderLayout.NORTH);
contentPane.add(labelTextAttrPane, BorderLayout.CENTER);
contentPane.add(labelGapPane, BorderLayout.SOUTH);
@ -146,7 +142,7 @@ public class VanChartAxisStyleSettingPane extends BasicBeanPane<VanChartAxisLabe
return null;
}
private JPanel createLabelGapPane(double[] row, double[] col) {
private JPanel createLabelGapPane() {
Component[][] gapComponents = new Component[][]{
new Component[]{null, null},
new Component[]{
@ -156,8 +152,8 @@ public class VanChartAxisStyleSettingPane extends BasicBeanPane<VanChartAxisLabe
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Label_Interval")), labelGapStyle}
};
JPanel gapDetailPane = TableLayout4VanChartHelper.createGapTableLayoutPane(gapComponents, row, col);
labelGapValuePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText(""), labelGapValue, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
JPanel gapDetailPane = FineLayoutBuilder.compatibleTableLayout(10, gapComponents, new double[]{1.2, 3});
labelGapValuePane = FineLayoutBuilder.asBorderLayoutWrapped(labelGapValue);
JPanel panel = new JPanel(new BorderLayout());
panel.add(gapDetailPane, BorderLayout.CENTER);

95
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -1,13 +1,16 @@
package com.fr.van.chart.designer.style.axis;
import com.fine.theme.utils.FineComponentsFactory;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.Utils;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.base.TextAttr;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.Title;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.frpane.UINumberDragPane;
@ -40,7 +43,6 @@ import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.axis.component.VanChartCategoryStylePaneWithCheckBox;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
@ -54,6 +56,9 @@ import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* 坐标轴的基础配置项分类时间值等公共的部分
*/
@ -135,26 +140,19 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected JPanel createContentPane(boolean isXAxis) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, column, isXAxis), null},
new Component[]{createLabelPane(new double[]{p, p, p}, column), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null},
new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null},
new Component[]{createTitlePane(isXAxis), null},
new Component[]{createLabelPane(), null},
new Component[]{createLineStylePane(), null},
new Component[]{createAxisPositionPane(isXAxis), null},
new Component[]{createDisplayStrategy(), null},
new Component[]{createValueStylePane(), null},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
}
protected JPanel createTitlePane(double[] row, double[] col, boolean isXAxis) {
protected JPanel createTitlePane(boolean isXAxis) {
showTitle = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")});
titleAlignPane = isXAxis ? getXAxisTitleAlignPane() : getYAxisTitleAlignPane();
titleAlignPane.setSelectedItem(Constants.CENTER);
@ -179,10 +177,10 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
UIComponentUtils.wrapWithBorderLayoutPane(titleTextRotation)
},
};
titlePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
titlePane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
titlePane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
JPanel showTitlePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Title"), showTitle);
JPanel showTitlePane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Axis_Title")), showTitle);
showTitle.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -190,48 +188,38 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
});
JPanel jPanel = new JPanel(new BorderLayout());
jPanel.add(showTitlePane, BorderLayout.NORTH);
jPanel.add(titlePane, BorderLayout.CENTER);
JPanel jPanel = column(10,
cell(showTitlePane), cell(titlePane)
).getComponent();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, jPanel);
return new UIExpandablePane(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, jPanel, true);
}
private UIButtonGroup<Integer> getXAxisTitleAlignPane() {
Icon[] alignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")};
Integer[] alignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT};
return new UIButtonGroup<Integer>(alignmentIconArray, alignment);
return FineComponentsFactory.createHorizontalAlignmentButtonGroup();
}
private UIButtonGroup<Integer> getYAxisTitleAlignPane() {
Icon[] alignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_top_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_down_normal.png")};
Integer[] alignment = new Integer[]{Constants.TOP, Constants.CENTER, Constants.BOTTOM};
return new UIButtonGroup<Integer>(alignmentIconArray, alignment);
return FineComponentsFactory.createVerticalAlignmentButtonGroup();
}
protected JPanel createLabelPane(double[] row, double[] col) {
protected JPanel createLabelPane() {
initLabelComponents();
labelPane = new VanChartAxisStyleSettingPane(showLabelDisplay(), getChartTextAttrPane());
wholeDisplayLabelPanel = new VanChartAxisStyleSettingPane(showLabelDisplay(), getChartTextAttrPane());
wholeDisplayLabelPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
addComponentsListener();
JPanel showLabelPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label"), showLabel);
JPanel showLabelPane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Axis_Label")), showLabel);
JPanel labelContentPane = createLabelContentPane();
JPanel labelPane = new JPanel(new BorderLayout());
JPanel labelPane = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
labelPane.add(showLabelPane, BorderLayout.NORTH);
labelPane.add(labelContentPane, BorderLayout.CENTER);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, labelPane);
return new UIExpandablePane(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, labelPane, true);
}
private void initLabelComponents() {
@ -298,7 +286,6 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
*/
private JPanel createCategoryStylePane() {
categoryStylePane = new JPanel(new BorderLayout());
categoryStylePane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
return categoryStylePane;
}
@ -316,7 +303,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
return VanChartAxisPaneHelper.createAxisTextAttrPane();
}
protected JPanel createLineStylePane(double[] row, double[] col) {
protected JPanel createLineStylePane() {
axisLineStyle = createLineComboBox();
axisLineColor = new ColorSelectBoxWithThemeStyle(100);
String[] strings = new String[]{Toolkit.i18nText("Fine-Design_Chart_Open"), Toolkit.i18nText("Fine-Design_Chart_Close")};
@ -324,8 +311,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
mainTick = new UIButtonGroup<AxisTickLineType>(strings, values);
secondTick = new UIButtonGroup<AxisTickLineType>(strings, values);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(getLineStylePaneComponents(), row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Axis_Line_Style"), panel);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, getLineStylePaneComponents(), new double[]{1.2, 3});
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Axis_Line_Style"), panel, true);
}
protected LineComboBox createLineComboBox() {
@ -342,7 +329,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
};
}
protected JPanel createAxisPositionPane(double[] row, double[] col, boolean isXAxis) {
protected JPanel createAxisPositionPane(boolean isXAxis) {
position = new UIButtonGroup<Integer>(getAxisPositionNameArray(isXAxis), getAxisPositionValueArray(isXAxis));
reversed = new UIButtonGroup<Boolean>(new String[]{Toolkit.i18nText("Fine-Design_Chart_On"), Toolkit.i18nText("Fine-Design_Chart_Off")}, new Boolean[]{true, false});
Component[][] components = new Component[][]{
@ -354,8 +341,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_AxisReversed")), reversed},
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), panel);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Layout_Position"), panel, true);
}
private String[] getAxisPositionNameArray(boolean isXAxis) {
@ -393,11 +380,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
});
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Display_Strategy"), panel);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Display_Strategy"), panel, true);
//区域显示策略 恢复用注释。取消注释。
// limitPane = new LimitPane();
// return limitPane;
}
protected JPanel createValueStylePane() {
@ -413,16 +397,11 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
centerPane.add(valueFormat, Toolkit.i18nText("Fine-Design_Chart_Common"));
centerPane.add(htmlLabelPane, Toolkit.i18nText("Fine-Design_Chart_Custom"));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Axis_Label_Format"), SwingConstants.LEFT), valueFormatStyle},
new Component[]{null, centerPane},
new Component[]{centerPane, null},
};
JPanel contentPane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
JPanel contentPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
valueFormatStyle.addActionListener(new ActionListener() {
@ -432,7 +411,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
});
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Use_Format"), contentPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Use_Format"), contentPane);
}
protected FormatPane createFormatPane() {

22
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartTimeAxisPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.style.axis;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.BaseFormula;
import com.fr.base.Utils;
import com.fr.design.chart.ChartSwingUtils;
@ -7,6 +8,7 @@ import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.editor.DateEditor;
import com.fr.design.editor.editor.Editor;
import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.date.UIDatePicker;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
@ -15,7 +17,6 @@ import com.fr.design.gui.style.FormatPane;
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.general.DateUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
@ -61,24 +62,17 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
@Override
protected JPanel createContentPane(boolean isXAxis){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createTitlePane(new double[]{p, p, p, p, p,p}, column, isXAxis),null},
new Component[]{createLabelPane(new double[]{p, p, p}, column),null},
new Component[]{createTitlePane(isXAxis),null},
new Component[]{createLabelPane(),null},
new Component[]{createValueDefinition(),null},
new Component[]{createLineStylePane(new double[]{p, p,p,p,p}, columnSize),null},
new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis),null},
new Component[]{createLineStylePane(),null},
new Component[]{createAxisPositionPane(isXAxis),null},
new Component[]{createDisplayStrategy(),null},
new Component[]{createValueStylePane(),null},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
}
protected boolean showLabelDisplay() {
@ -87,7 +81,7 @@ public class VanChartTimeAxisPane extends VanChartBaseAxisPane {
private JPanel createValueDefinition(){
timeMinMaxValuePane = new TimeMinMaxValuePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), timeMinMaxValuePane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), timeMinMaxValuePane, true);
}
@Override

37
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartValueAxisPane.java

@ -1,13 +1,13 @@
package com.fr.van.chart.designer.style.axis;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.BaseFormula;
import com.fr.chart.base.ChartBaseUtils;
import com.fr.design.chart.ChartSwingUtils;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartValueAxis;
import com.fr.stable.StringUtils;
@ -42,35 +42,28 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
@Override
protected JPanel createContentPane(boolean isXAxis){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p,p,p,p,p,p,p,p,p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createTitlePane(new double[]{p, p, p, p, p, p}, column, isXAxis), null},
new Component[]{createLabelPane(new double[]{p, p, p}, column), null},
new Component[]{createMinMaxValuePane(new double[]{p, p}, columnSize), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p, p}, columnSize), null},
new Component[]{createAxisPositionPane(new double[]{p, p, p}, columnSize, isXAxis), null},
new Component[]{createTitlePane(isXAxis), null},
new Component[]{createLabelPane(), null},
new Component[]{createMinMaxValuePane(), null},
new Component[]{createLineStylePane(), null},
new Component[]{createAxisPositionPane(isXAxis), null},
new Component[]{createDisplayStrategy(), null},
new Component[]{createValueStylePane(), null},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3});
}
protected boolean showLabelDisplay() {
return false;
}
protected JPanel createMinMaxValuePane(double[] row, double[] col){
JPanel panel = createCommenValuePane(row,col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), panel);
protected JPanel createMinMaxValuePane(){
JPanel panel = createCommenValuePane();
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), panel, true);
}
protected JPanel createCommenValuePane(double[] row, double[] col){
protected JPanel createCommenValuePane(){
initMinMaxValuePane();
logBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Custom_LogBase_Value"));
@ -82,10 +75,6 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
});
ChartSwingUtils.addListener(logBox, logBaseField);
// JPanel logPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
// logPane.add(logBox);
// logPane.add(logBaseField);
logPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Log_Base_Value"), logBaseField, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
@ -108,7 +97,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
}
});
return TableLayoutHelper.createTableLayoutPane(components, row, col);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
protected void initMinMaxValuePane() {

43
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java

@ -1,5 +1,8 @@
package com.fr.van.chart.designer.style.axis.component;
import com.fine.swing.ui.layout.Column;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.BaseUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButton;
@ -13,16 +16,13 @@ import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.plot.VanChartAxisPlot;
import com.fr.van.chart.designer.style.axis.VanChartAxisPane;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.Icon;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.util.ArrayList;
import java.util.List;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
@ -49,7 +49,7 @@ public class VanChartAxisButtonPane extends BasicBeanPane<VanChartAxisPlot> {
private List<ChartAxisButton> indexList_X = new ArrayList<ChartAxisButton>();
private List<ChartAxisButton> indexList_Y = new ArrayList<ChartAxisButton>();
private JPanel buttonPane;
private Column buttonPane;
private VanChartAxisPane parent;
@ -57,15 +57,14 @@ public class VanChartAxisButtonPane extends BasicBeanPane<VanChartAxisPlot> {
this.parent = vanChartAxisPane;
this.setLayout(new BorderLayout());
addButton = new AddButton(BaseUtils.readIcon("/com/fr/design/images/control/addPopup.png"));
addButton = new AddButton(new LazyIcon("add_popup"));
JPanel eastPane = new JPanel(new BorderLayout());
eastPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 20));
eastPane.add(addButton, BorderLayout.NORTH);
addButton.setVisible(false);
this.add(eastPane, BorderLayout.EAST);
buttonPane = new JPanel();
buttonPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 10, 0));
buttonPane = new Column();
buttonPane.setSpacing(10);
this.add(buttonPane, BorderLayout.CENTER);
itemX = new UIMenuItem(VanChartAttrHelper.X_AXIS_PREFIX);
@ -90,28 +89,8 @@ public class VanChartAxisButtonPane extends BasicBeanPane<VanChartAxisPlot> {
return;
}
buttonPane.removeAll();
buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.Y_AXIS));
JPanel pane = null;
int size_X = indexList_X.size();
int size_Y = indexList_Y.size();
for (int i = 0; i < size_X; i++) {
if (i % COL_COUNT == 0) {
pane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
buttonPane.add(pane);
}
pane.add(indexList_X.get(i));
}
for (int i = 0; i < size_Y; i++) {
if ((i + size_X) % COL_COUNT == 0) {
pane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
buttonPane.add(pane);
}
if (pane != null) {
pane.add(indexList_Y.get(i));
}
}
buttonPane.add(FineLayoutBuilder.createCommonTableLayout(COL_COUNT, 10, 10, indexList_X));
buttonPane.add(FineLayoutBuilder.createCommonTableLayout(COL_COUNT, 10, 10, indexList_Y));
if (popupMenu != null) {
popupMenu.setVisible(false);

43
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java

@ -1,11 +1,12 @@
package com.fr.van.chart.designer.style.axis.gauge;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.base.TextAttr;
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.PaneTitleConstants;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithAuto;
@ -17,12 +18,10 @@ import com.fr.plugin.chart.attr.axis.VanChartGaugeAxis;
import com.fr.plugin.chart.gauge.VanChartGaugePlot;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.VanChartStylePane;
import com.fr.van.chart.designer.style.axis.VanChartValueAxisPane;
import com.fr.van.chart.designer.style.axis.component.VanChartMinMaxValuePane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
@ -49,20 +48,16 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane {
if (gaugeStyle == null) {
gaugeStyle = GaugeStyle.POINTER;
}
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, p};
double[] rowSize = {p, p, p, p, p, p, p, p};
return TableLayoutHelper.createTableLayoutPane(getPanelComponents(p, f, columnSize), rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(0, getPanelComponents(), new double[]{1});
}
private Component[][] getPanelComponents(double p, double f, double[] columnSize) {
private Component[][] getPanelComponents() {
switch (gaugeStyle) {
case THERMOMETER:
return new Component[][]{
new Component[]{createLabelPane(new double[]{p, p}, columnSize), null},
new Component[]{createLabelPane(), null},
new Component[]{createValueDefinition(), null},
new Component[]{createTickColorPane(new double[]{p, p, p}, new double[]{p, f}), null},
new Component[]{createTickColorPane(), null},
new Component[]{createValueStylePane()},
};
case RING:
@ -75,21 +70,21 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane {
};
default:
return new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, columnSize), null},
new Component[]{createLabelPane(), null},
new Component[]{createValueDefinition(), null},
new Component[]{createValueStylePane()},
};
}
}
protected JPanel createLabelPane(double[] row, double[] col) {
protected JPanel createLabelPane() {
showLabel = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")});
labelTextAttrPane = getChartTextAttrPane();
labelContentPane = new JPanel(new BorderLayout());
labelContentPane.add(labelTextAttrPane);
labelContentPane.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 0));
JPanel panel = new JPanel(new BorderLayout(0, 6));
panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Label"), showLabel), BorderLayout.NORTH);
JPanel panel = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
panel.add(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Axis_Label")), showLabel), BorderLayout.NORTH);
panel.add(labelContentPane, BorderLayout.CENTER);
showLabel.addActionListener(new ActionListener() {
@Override
@ -97,9 +92,7 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane {
checkLabelPane();
}
});
JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, panel);
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 15));
return jPanel;
return new UIExpandablePane(PaneTitleConstants.CHART_STYLE_LABEL_TITLE, panel, true);
}
protected ChartTextAttrPane getChartTextAttrPane() {
@ -149,20 +142,18 @@ public class VanChartGaugeDetailAxisPane extends VanChartValueAxisPane {
minMaxValuePane = new VanChartMinMaxValuePane();
break;
}
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), minMaxValuePane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), minMaxValuePane, true);
}
private JPanel createTickColorPane(double[] row, double[] col) {
private JPanel createTickColorPane() {
mainTickColor = new ColorSelectBox(100);
secTickColor = new ColorSelectBox(100);
Component[][] components = new Component[][]{
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Main_Graduation_Line")), mainTickColor},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Second_Graduation_Line")), secTickColor},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel jPanel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_TickColor"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 15));
return jPanel;
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_TickColor"), panel, true);
}
private boolean isMulti(GaugeStyle style) {

17
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarXAxisPane.java

@ -1,13 +1,11 @@
package com.fr.van.chart.designer.style.axis.radar;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.gui.icombobox.LineComboBox;
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.stable.CoreConstants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.axis.VanChartBaseAxisPane;
import javax.swing.JPanel;
@ -22,20 +20,13 @@ public class VanChartRadarXAxisPane extends VanChartBaseAxisPane {
protected JPanel createContentPane(boolean isXAxis){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, column),null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize),null},
new Component[]{createLabelPane(),null},
new Component[]{createLineStylePane(),null},
new Component[]{createValueStylePane(),null},
};
return TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components,new double[]{1});
}
protected boolean showLabelDisplay() {

34
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/radar/VanChartRadarYAxisPane.java

@ -1,19 +1,17 @@
package com.fr.van.chart.designer.style.axis.radar;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.LineComboBox;
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.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.axis.VanChartValueAxis;
import com.fr.stable.CoreConstants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.axis.VanChartValueAxisPane;
import com.fr.van.chart.designer.style.axis.component.MinMaxValuePaneWithOutSecTick;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
@ -33,21 +31,14 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
protected JPanel createContentPane(boolean isXAxis) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] column = {f, s};
double[] rowSize = {p, p, p, p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{createLabelPane(new double[]{p, p, p}, column), null},
new Component[]{createMinMaxValuePane(new double[]{p, p, p}, columnSize), null},
new Component[]{createLineStylePane(new double[]{p, p, p, p}, columnSize), null},
new Component[]{createLabelPane(), null},
new Component[]{createMinMaxValuePane(), null},
new Component[]{createLineStylePane(), null},
new Component[]{createValueStylePane(), null},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
protected LineComboBox createLineComboBox() {
@ -55,16 +46,11 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
}
@Override
protected JPanel createMinMaxValuePane(double[] row, double[] col) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
protected JPanel createMinMaxValuePane() {
valueStyle = new UIButtonGroup<Integer>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Axis_Unified_Count"),
Toolkit.i18nText("Fine-Design_Chart_Respectively_Specified")});
JPanel commenPane = createCommenValuePane(new double[]{p, p, p}, columnSize);
JPanel commenPane = createCommenValuePane();
tableDataPane = new RadarTableDataPane();
centerPane = new JPanel(new CardLayout());
@ -81,9 +67,7 @@ public class VanChartRadarYAxisPane extends VanChartValueAxisPane {
}
});
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), contentPane);
contentPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
return panel;
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Value_Definition"), contentPane, true);
}
protected Component[][] getLineStylePaneComponents() {

6
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAreaPane.java

@ -1,6 +1,5 @@
package com.fr.van.chart.designer.style.background;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.chartattr.Plot;
import com.fr.chartx.config.info.constant.ConfigType;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
@ -16,7 +15,6 @@ import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
import static com.fine.swing.ui.layout.Layouts.cell;
/**
* 属性表, 图表样式-背景界面.
@ -35,10 +33,10 @@ public class VanChartAreaPane extends ThirdTabPane<VanChart> implements AutoSele
protected void initLayout() {
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
this.setLayout(new BorderLayout());
if (!paneList.isEmpty()) {
if (nameArray.length > 1) {
this.add(cell(tabPane).getComponent(), BorderLayout.NORTH);
this.add(tabPane, BorderLayout.NORTH);
}
}
this.add(centerPane, BorderLayout.CENTER);

46
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAxisAreaPane.java

@ -1,12 +1,13 @@
package com.fr.van.chart.designer.style.background;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
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.style.ColorSelectBoxWithThemeStyle;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.general.ComparatorUtils;
@ -17,7 +18,6 @@ import com.fr.plugin.chart.type.LineType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.LineTypeComboBox;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.CardLayout;
@ -59,19 +59,9 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
horizonLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
verticalLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {f};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{createGridLinePane()},
new Component[]{createAlertLinePane()},
new Component[]{createIntervalPane(new double[]{p, p, p, p}, new double[]{f, s})},
};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel panel = FineLayoutBuilder.createVerticalLayout(0,
createGridLinePane(), createAlertLinePane(), createIntervalPane()
);
this.setLayout(new BorderLayout());
this.add(panel, BorderLayout.CENTER);
}
@ -79,12 +69,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
protected JPanel createGridLinePane() {
initGridLineComponents();
JPanel panel = new JPanel(new BorderLayout(0, 4));
JPanel panel = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
panel.add(createSingleGridLinePane(Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), true), BorderLayout.NORTH);
panel.add(createSingleGridLinePane(Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"), false), BorderLayout.CENTER);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel, true);
}
protected void initGridLineComponents() {
@ -127,9 +117,9 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
LineTypeComboBox lineTypeComboBox = isHorizontal ? horizonLineType : verticalLineType;
JPanel colorSelectPane = isHorizontal ? horizontalColorPane : verticalColorPane;
JPanel lineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(title, lineTypeComboBox);
JPanel lineTypePane = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, new UILabel(title), lineTypeComboBox);
JPanel singleGridLinePane = new JPanel(new BorderLayout());
JPanel singleGridLinePane = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
singleGridLinePane.add(lineTypePane, BorderLayout.NORTH);
singleGridLinePane.add(colorSelectPane, BorderLayout.CENTER);
@ -139,22 +129,19 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
protected JPanel createAlertLinePane() {
alertLine = getAlertLinePane();
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Alert_Line"), alertLine);
alertLine.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
return panel;
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Alert_Line"), alertLine, true);
}
protected AlertLineListControlPane getAlertLinePane() {
return new AlertLineListControlPane();
}
protected JPanel createIntervalPane(double[] row, double[] col) {
protected JPanel createIntervalPane() {
isDefaultIntervalBackground = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Default_Interval"), Toolkit.i18nText("Fine-Design_Chart_Custom_Interval_Background")});
horizontalColorBackground = new ColorSelectBox(100);
verticalColorBackground = new ColorSelectBox(100);
Component[][] components = getIntervalPaneComponents();
JPanel defaultPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
defaultPane.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0));
JPanel defaultPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
customIntervalBackground = getBackgroundListControlPane();
cardLayout = new CardLayout();
@ -168,12 +155,11 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
}
});
JPanel intervalPane = new JPanel(new BorderLayout(0, 6));
JPanel panel1 = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Interval_Background"), isDefaultIntervalBackground);
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);
intervalPane.add(centerPane, BorderLayout.CENTER);
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Interval_Background"), intervalPane);
intervalPane.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
return panel;
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Interval_Background"), intervalPane);
}
protected BackgroundListControlPane getBackgroundListControlPane() {

31
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartGantPlotAreaBackgroundPane.java

@ -1,15 +1,14 @@
package com.fr.van.chart.designer.style.background;
import com.fine.theme.utils.FineLayoutBuilder;
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.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent;
import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import java.awt.BorderLayout;
@ -26,16 +25,8 @@ public class VanChartGantPlotAreaBackgroundPane extends VanChartAreaBackgroundPa
@Override
protected JPanel createContentPane() {
JPanel contentPane = new JPanel(new BorderLayout());
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{createAxisBorderPane()},
new Component[]{createContentBorderPane()}
};
contentPane.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.CENTER);
contentPane.add(FineLayoutBuilder.createVerticalLayout(
0, createAxisBorderPane(), createContentBorderPane()), BorderLayout.CENTER);
return contentPane;
}
@ -69,34 +60,28 @@ public class VanChartGantPlotAreaBackgroundPane extends VanChartAreaBackgroundPa
private JPanel createAxisBorderPane() {
axisColorPane = new ColorSelectBoxWithOutTransparent(100);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(
return new UIExpandablePane(
Toolkit.i18nText("Fine-Design_Chart_Gant_Axis_Border"),
createBorderPane(axisColorPane)
createBorderPane(axisColorPane), true
);
}
private JPanel createContentBorderPane() {
contentColorPane = new ColorSelectBoxWithOutTransparent(100);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(
return new UIExpandablePane(
Toolkit.i18nText("Fine-Design_Chart_Gant_Content_Border"),
createBorderPane(contentColorPane)
);
}
private JPanel createBorderPane(ColorSelectBoxWithOutTransparent colorPane) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, TableLayout4VanChartHelper.EDIT_AREA_WIDTH};
double[] rowSize = {p, p};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")),
colorPane
}
};
return TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
}

6
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java

@ -1,8 +1,9 @@
package com.fr.van.chart.designer.style.label;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.label.LabelContentPaneWithCate;
import com.fr.van.chart.designer.component.label.LabelContentPaneWithPercent;
import com.fr.van.chart.designer.style.VanChartStylePane;
@ -64,6 +65,7 @@ public class VanChartGaugeCateOrPercentLabelDetailPane extends VanChartGaugeLabe
}
protected JPanel createTableLayoutPaneWithTitle(String title, Component component) {
return TableLayout4VanChartHelper.createTableLayoutPaneWithSmallTitle(title, component);
JPanel panel = FineLayoutBuilder.asBorderLayoutWrapped(component);
return new UIExpandablePane(title, panel, true);
}
}

4
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.designer.style.label;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.Plot;
import com.fr.chartx.TwoTuple;
@ -7,7 +8,6 @@ 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.style.ChartTextAttrPane;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithAuto;
import com.fr.plugin.chart.base.AttrLabelDetail;
@ -63,7 +63,7 @@ public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane {
initStyleListener();
return TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot), row, col);
return FineLayoutBuilder.compatibleTableLayout(10, getLabelStyleComponents(plot),new double[]{1.2, 3});
}
protected void initStyleListener() {

10
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPieValueLabelDetailPane.java

@ -68,16 +68,6 @@ public class VanChartPieValueLabelDetailPane extends VanChartPlotLabelDetailPane
protected JPanel createLabelBackgroundPane() {
VanChartBackgroundWithOutImagePane backgroundPane = new VanChartBackgroundWithOutImagePane() {
@Override
protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
return TableLayout4VanChartHelper.createGapTableLayoutPane(getPaneComponents(), rowSize, columnSize);
}
@Override
protected Component[][] getPaneComponents() {
return new Component[][]{

13
designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java

@ -26,7 +26,6 @@ import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutI
import com.fr.van.chart.designer.component.border.VanChartBorderWithShapePane;
import com.fr.van.chart.designer.style.VanChartStylePane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
@ -53,7 +52,6 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
private VanChartBorderWithShapePane borderPane;
private VanChartBackgroundWithOutImagePane backgroundPane;
private JPanel tractionLinePane;
private JPanel positionPane;
private Integer[] oldPositionValues;
@ -204,7 +202,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
}
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) {
return new UIExpandablePane(title, panel);
return new UIExpandablePane(title, panel, true);
}
protected TwoTuple<String[], Integer[]> getPositionNamesAndValues() {
@ -245,12 +243,11 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
if (plot.isSupportLeadLine()) {
tractionLine = new UIToggleButton(Toolkit.i18nText("Fine-Design_Chart_Show_Guideline"));
tractionLinePane = TableLayout4VanChartHelper.createGapTableLayoutPane("", tractionLine);
tractionLinePane.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
panel.add(tractionLinePane, BorderLayout.SOUTH);
panel.add(tractionLine, BorderLayout.SOUTH);
initPositionListener();
} else if (PlotFactory.plotAutoAdjustLabelPosition(plot)) {
panel.add(TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Auto_Adjust"), autoAdjust), BorderLayout.SOUTH);
panel.add(FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Auto_Adjust")), autoAdjust), BorderLayout.SOUTH);
}
return getLabelLayoutPane(panel, Toolkit.i18nText("Fine-Design_Form_Attr_Layout"));
@ -369,7 +366,7 @@ public class VanChartPlotLabelDetailPane extends BasicPane {
}
private void checkPositionEnabled() {
tractionLinePane.setVisible(position.getSelectedItem() != null && position.getSelectedItem() == Constants.OUTSIDE);
tractionLine.setVisible(position.getSelectedItem() != null && position.getSelectedItem() == Constants.OUTSIDE);
}
protected void checkPane() {

20
designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.designer.style.series;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.chart.chartdata.model.DataProcessor;
import com.fr.base.chart.chartdata.model.LargeDataModel;
@ -105,7 +106,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
scrollPane.setViewportView(getContentInPlotType());
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
}
return column(
return column(0,
cell(getColorPane()), cell(getContentInPlotType())
).getComponent();
}
@ -125,7 +126,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//获取颜色面板
protected JPanel getColorPane() {
JPanel panel = new JPanel(new BorderLayout());
JPanel panel = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
stylePane = createStylePane();
vanChartFillStylePane = getVanChartFillStylePane();
if (vanChartFillStylePane != null) {
@ -158,7 +159,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//线
protected JPanel createLineTypePane() {
lineTypePane = getLineTypePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Line"), lineTypePane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Line"), lineTypePane, true);
}
protected VanChartLineTypePane getLineTypePane() {
@ -174,7 +175,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//填充颜色
protected JPanel createAreaFillColorPane() {
areaSeriesFillColorPane = new VanChartAreaSeriesFillColorPane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Area"), areaSeriesFillColorPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Area"), areaSeriesFillColorPane, true);
}
//边框(默认没有圆角)
@ -205,7 +206,8 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
checkLarge();
}
});
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Large_Model"), largeDataModelGroup);
JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Chart_Large_Model")), largeDataModelGroup);
return createLargeDataModelPane(panel);
}
@ -227,8 +229,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
}
protected JPanel createLargeDataModelPane(JPanel jPanel) {
JPanel panel = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Large_Data"), jPanel);
return panel;
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Large_Data"), jPanel, true);
}
protected UIButtonGroup<DataProcessor> createLargeDataModelGroup() {
@ -270,13 +271,14 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
//不透明度
protected JPanel createAlphaPane() {
transparent = new UINumberDragPaneWithPercent(0, 100);
return TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Report_Alpha"), transparent);
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(Toolkit.i18nText("Fine-Design_Report_Alpha")), transparent);
}
//堆积和坐标轴设置(自定义柱形图等用到)
protected JPanel createStackedAndAxisPane() {
stackAndAxisEditPane = new VanChartStackedAndAxisListControlPane();
stackAndAxisEditExpandablePane = new UIExpandablePane(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane);
stackAndAxisEditExpandablePane = new UIExpandablePane(stackAndAxisEditPane.getPaneTitle(), stackAndAxisEditPane, true);
return stackAndAxisEditExpandablePane;
}

9
designer-chart/src/main/java/com/fr/van/chart/designer/style/tooltip/VanChartPlotTooltipPane.java

@ -7,12 +7,10 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartTooltipContentPane;
import com.fr.van.chart.designer.component.background.VanChartBackgroundWithOutImagePane;
import com.fr.van.chart.designer.component.border.VanChartBorderWithRadiusPane;
@ -93,11 +91,6 @@ public class VanChartPlotTooltipPane extends BasicPane {
showAllSeries = new UICheckBox(getShowAllSeriesLabelText());
followMouse = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Follow_Mouse"),
Toolkit.i18nText("Fine-Design_Chart_Not_Follow_Mouse")});
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[3][2];
components[0] = new Component[]{null,null};
components[1] = new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Prompt_Box")), UIComponentUtils.wrapWithBorderLayoutPane(followMouse)};
@ -105,7 +98,7 @@ public class VanChartPlotTooltipPane extends BasicPane {
if(plot.isSupportTooltipSeriesType() && hasTooltipSeriesType()){
components[2] = new Component[]{showAllSeries,null};
}
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components,rowSize,columnSize);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Display_Strategy"), panel);
}

47
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/other/VanChartDrillMapInteractivePane.java

@ -1,11 +1,12 @@
package com.fr.van.chart.drillmap.designer.other;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.base.DrillMapTools;
import com.fr.chart.chartattr.Chart;
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.backgroundpane.ColorBackgroundQuickPane;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
@ -16,11 +17,9 @@ import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.background.VanChartBackgroundPaneWithOutImageAndShadow;
import com.fr.van.chart.designer.other.VanChartInteractivePaneWithMapZoom;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
/**
@ -36,26 +35,21 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
@Override
protected JPanel getInteractivePane(VanChartPlot plot) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p, p, p, p, p, p, p, p, p};
Component[][] components = ChartEditContext.normalMode() ? new Component[][]{
new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize), null},
new Component[]{createToolBarPane(), null},
new Component[]{createAnimationPane(), null},
new Component[]{createZoomPane(plot), null},
new Component[]{createDrillToolsPane(), null},
new Component[]{createAutoRefreshPane(plot), null},
new Component[]{createHyperlinkPane(), null}
} : new Component[][]{
new Component[]{createToolBarPane(new double[]{p, p, p}, columnSize), null},
new Component[]{createToolBarPane(), null},
new Component[]{createAnimationPane(), null},
new Component[]{createZoomPane(plot), null},
new Component[]{createDrillToolsPane(), null}
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
private JPanel createDrillToolsPane() {
@ -65,12 +59,7 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
@Override
protected JPanel getContentPane(JPanel buttonPane) {
double p = TableLayout.PREFERRED;
double e = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
double[] columnSize = {e};
double[] rowSize = {p, p};
return TableLayout4VanChartHelper.createGapTableLayoutPane(getComponents(buttonPane), rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(10, getComponents(buttonPane), new double[]{1.2, 3});
}
@Override
@ -96,10 +85,6 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
};
catalogSuperLink = new VanChartCatalogHyperLinkPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f};
double[] rowSize = {p, p, p, p, p, p};
Component[][] components = ChartEditContext.duchampMode() ? new Component[][]{
new Component[]{null},
new Component[]{createTitlePane(Toolkit.i18nText("Fine-Design_Chart_Character"), textAttrPane)},
@ -112,11 +97,9 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
new Component[]{selectBackgroundPane},
new Component[]{catalogSuperLink}
};
drillPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
drillPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
JPanel panel = new JPanel(new BorderLayout());
panel.add(openOrClosePane, BorderLayout.NORTH);
panel.add(drillPane, BorderLayout.CENTER);
JPanel panel = FineLayoutBuilder.createVerticalLayout(10, openOrClosePane, drillPane);
openOrClose.addChangeListener(new ChangeListener() {
@Override
@ -124,16 +107,14 @@ public class VanChartDrillMapInteractivePane extends VanChartInteractivePaneWith
checkEnable();
}
});
JPanel panel1 = TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Drill"), panel);
panel.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 0));
return panel1;
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Drill"), panel);
}
private JPanel createTitlePane(String title, Component component) {
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(title, component, TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH);
panel.setBorder(BorderFactory.createEmptyBorder(0, 12, 0, 0));
return panel;
Component[][] components = new Component[][]{
new Component[]{new UILabel(title), component}
};
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3});
}
private void checkEnable() {

2
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/VanChartGanttDataAndLinkPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.gantt.designer.data;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
@ -55,6 +56,7 @@ public class VanChartGanttDataAndLinkPane extends MultiTabPane<ChartCollection>
paneList = initPaneList();
initComponents();
setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
}
private void initComponents(){

6
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/GanttPlotReportDataContentPane.java

@ -1,11 +1,11 @@
package com.fr.van.chart.gantt.designer.data.data;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.van.chart.gantt.designer.data.data.component.GanttReportDataContentPane;
import com.fr.van.chart.gantt.designer.data.data.component.GanttReportDataProjectPane;
import javax.swing.BorderFactory;
import java.awt.BorderLayout;
/**
@ -14,12 +14,10 @@ import java.awt.BorderLayout;
public class GanttPlotReportDataContentPane extends AbstractReportDataContentPane {
private GanttReportDataProjectPane projectPane;
private GanttReportDataContentPane contentPane;
private static final int V_GAP = 7;
public GanttPlotReportDataContentPane() {
initComponent();
this.setLayout(new BorderLayout(0, V_GAP));
projectPane.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
this.add(projectPane, BorderLayout.NORTH);
this.add(contentPane, BorderLayout.CENTER);
}

6
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/GanttPlotTableDataContentPane.java

@ -1,11 +1,11 @@
package com.fr.van.chart.gantt.designer.data.data;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.van.chart.gantt.designer.data.data.component.GanttTableDataContentPane;
import com.fr.van.chart.gantt.designer.data.data.component.GanttTableDataProjectPane;
import javax.swing.BorderFactory;
import javax.swing.JSeparator;
import java.awt.BorderLayout;
import java.util.List;
@ -16,12 +16,10 @@ import java.util.List;
public class GanttPlotTableDataContentPane extends AbstractTableDataContentPane {
private GanttTableDataProjectPane projectPane;
private GanttTableDataContentPane contentPane;
private static final int V_GAP = 7;
public GanttPlotTableDataContentPane() {
initComponent();
this.setLayout(new BorderLayout(0, V_GAP));
projectPane.setBorder(BorderFactory.createEmptyBorder(0,17,0,15));
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
this.add(projectPane, BorderLayout.NORTH);
this.add(new JSeparator(), BorderLayout.CENTER);
this.add(contentPane, BorderLayout.SOUTH);

20
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/ComboBoxWithButtonPane.java

@ -6,13 +6,15 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by hufan on 2017/1/10.
*/
@ -20,8 +22,6 @@ public abstract class ComboBoxWithButtonPane extends JPanel {
private UIComboBox comboBoxName;
private UIButton button;
private int index = 0;
private static final int H_GAP = 5;
private static final int LEFT_GAP = 7;
private UIObserverListener listener;
public ComboBoxWithButtonPane() {
@ -31,20 +31,16 @@ public abstract class ComboBoxWithButtonPane extends JPanel {
public ComboBoxWithButtonPane(int index) {
this.index = index;
comboBoxName = new UIComboBox();
comboBoxName.setPreferredSize(new Dimension(80,20));
button = new UIButton(getButtonIcon());
button.setPreferredSize(new Dimension(20, 20));
button.addActionListener(getButtonListener());
UILabel title = new UILabel(getTitleText());
title.setPreferredSize(new Dimension(80, 20));
this.setLayout(new BorderLayout(H_GAP, 0));
this.add(comboBoxName, BorderLayout.CENTER);
this.add(button, BorderLayout.EAST);
this.add(title, BorderLayout.WEST);
this.setBorder(BorderFactory.createEmptyBorder(0, LEFT_GAP, 0, 0));
this.setLayout(new BorderLayout());
this.add(row(
cell(title).weight(1.2), cell(comboBoxName).weight(2.4), flex(0.1), cell(button).weight(0.5)
).getComponent());
}
protected abstract String getTitleText();

33
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataContentPane.java

@ -1,21 +1,23 @@
package com.fr.van.chart.gantt.designer.data.data.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.gantt.data.VanGanttReportDefinition;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by hufan on 2017/1/11.
@ -29,13 +31,11 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
private TinyFormulaPane linkID;
public GanttReportDataContentPane() {
this.setLayout(new BorderLayout());
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
initAllComponent();
JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(10,24,0,15));
this.add(getJSeparator(), BorderLayout.NORTH);
this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
}
@ -57,25 +57,16 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
return new DefaultTinyFormulaPane() {
@Override
protected void initLayout() {
this.setLayout(new BorderLayout(4, 0));
this.setLayout(new BorderLayout());
UILabel label = new UILabel(title);
label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST);
formulaTextField.setPreferredSize(new Dimension(100, 20));
this.add(formulaTextField, BorderLayout.CENTER);
this.add(formulaTextFieldButton, BorderLayout.EAST);
this.add(row(
cell(label).weight(1.2), cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5)
).getComponent());
}
};
}
private JPanel getContentPane(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p,p,p,p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{seriesName},
new Component[]{startTime},
@ -85,7 +76,7 @@ public class GanttReportDataContentPane extends AbstractReportDataContentPane{
new Component[]{linkID}
};
return TableLayoutHelper.createTableLayoutPane(components, row, col);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
}
@Override

6
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttReportDataProjectPane.java

@ -1,5 +1,7 @@
package com.fr.van.chart.gantt.designer.data.data.component;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.design.event.UIObserver;
@ -25,7 +27,7 @@ public class GanttReportDataProjectPane extends AbstractReportDataContentPane im
private List<TinyFormulaWithButtonPane> processPaneList = new ArrayList<TinyFormulaWithButtonPane>();
public GanttReportDataProjectPane() {
firstProcessPane = new TinyFormulaWithButtonPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Project_Name"), "/com/fr/design/images/buttonicon/add.png") {
firstProcessPane = new TinyFormulaWithButtonPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Project_Name"), new LazyIcon("add")) {
@Override
protected void buttonEvent(TinyFormulaWithButtonPane pane) {
addProcessPane();
@ -38,7 +40,7 @@ public class GanttReportDataProjectPane extends AbstractReportDataContentPane im
};
firstProcessPane.registerChangeListener(listener);
this.setLayout(new BorderLayout(0, 7));
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
this.add(firstProcessPane, BorderLayout.NORTH);
if (center != null) {

16
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataContentPane.java

@ -1,11 +1,10 @@
package com.fr.van.chart.gantt.designer.data.data.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.general.ComparatorUtils;
@ -13,11 +12,9 @@ import com.fr.plugin.chart.gantt.data.VanGanttTableDefinition;
import com.fr.stable.StringUtils;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.List;
/**
@ -36,10 +33,7 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{
public GanttTableDataContentPane() {
this.setLayout(new BorderLayout());
initAllComponent();
JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
this.add(getContentPane(), BorderLayout.CENTER);
}
@ -62,10 +56,6 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{
}
private JPanel getContentPane(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p,p,p,p};
double[] col = {p,f};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name")), seriesComboBox},
@ -76,7 +66,7 @@ public class GanttTableDataContentPane extends AbstractTableDataContentPane{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Task_ID")), taskIDComboBox}
};
return TableLayoutHelper.createGapTableLayoutPane(components, row, col,24,6);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
@Override

9
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/GanttTableDataProjectPane.java

@ -1,6 +1,7 @@
package com.fr.van.chart.gantt.designer.data.data.component;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.design.event.UIObserver;
@ -44,7 +45,7 @@ public class GanttTableDataProjectPane extends AbstractTableDataContentPane impl
@Override
protected Icon getButtonIcon(){
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png");
return new LazyIcon("add");
}
@Override
protected ActionListener getButtonListener(){
@ -58,7 +59,7 @@ public class GanttTableDataProjectPane extends AbstractTableDataContentPane impl
}
};
this.setLayout(new BorderLayout(0, V_GAP));
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
if (center != null) {
this.add(center, BorderLayout.CENTER);
@ -93,7 +94,7 @@ public class GanttTableDataProjectPane extends AbstractTableDataContentPane impl
@Override
protected Icon getButtonIcon() {
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/delete.png");
return new LazyIcon("delete");
}
@Override

29
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/data/component/TinyFormulaWithButtonPane.java

@ -1,20 +1,25 @@
package com.fr.van.chart.gantt.designer.data.data.component;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.svg.IconUtils;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.chart.gui.UIEditLabel;
import com.fr.general.IOUtils;
import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by hufan on 2017/1/11.
*/
@ -26,10 +31,10 @@ public abstract class TinyFormulaWithButtonPane extends JPanel implements UIObse
protected UIObserverListener listener;
public TinyFormulaWithButtonPane(String text) {
this(text, "/com/fr/design/images/buttonicon/delete.png");
this(text, new LazyIcon("delete"));
}
public TinyFormulaWithButtonPane(String text, String iconUrl) {
public TinyFormulaWithButtonPane(String text, Icon icon) {
editLabel = new UIEditLabel(text,SwingConstants.LEFT){
protected void doAfterMousePress(){
clearAllBackground();
@ -40,19 +45,19 @@ public abstract class TinyFormulaWithButtonPane extends JPanel implements UIObse
return false;
}
};
editLabel.setPreferredSize(new Dimension(80,20));
tinyFormulaPane = new DefaultTinyFormulaPane();
UIButton button = new UIButton(IOUtils.readIcon(iconUrl));
button.setPreferredSize(new Dimension(20, 20));
UIButton button = new UIButton(icon);
button.addActionListener(initButtonListener(this));
this.setLayout(new BorderLayout());
this.add(row(
cell(editLabel).weight(1.2), cell(tinyFormulaPane).weight(2.4), flex(0.1), cell(button).weight(0.5)
).getComponent());
}
this.setLayout(new BorderLayout(4, 0));
this.add(editLabel, BorderLayout.WEST);
this.add(tinyFormulaPane, BorderLayout.CENTER);
this.add(button, BorderLayout.EAST);
public TinyFormulaWithButtonPane(String text, String iconUrl) {
this(text, IconUtils.readIcon(iconUrl));
}
private ActionListener initButtonListener(final TinyFormulaWithButtonPane pane){

31
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java

@ -1,21 +1,22 @@
package com.fr.van.chart.gantt.designer.data.link;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.gantt.data.VanGanttLinkReportDefinition;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by hufan on 2017/1/12.
@ -29,7 +30,6 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
this.setLayout(new BorderLayout());
initAllComponent();
JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER); }
private void initAllComponent() {
@ -44,32 +44,23 @@ public class GanttLinkReportDataContentPane extends AbstractReportDataContentPan
return new DefaultTinyFormulaPane() {
@Override
protected void initLayout() {
this.setLayout(new BorderLayout(4, 0));
UILabel label = new UILabel(title );
label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST);
formulaTextField.setPreferredSize(new Dimension(100, 20));
this.add(formulaTextField, BorderLayout.CENTER);
this.add(formulaTextFieldButton, BorderLayout.EAST);
this.setLayout(new BorderLayout());
UILabel label = new UILabel(title);
this.add(row(
cell(label).weight(1.2), cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5)
).getComponent());
}
};
}
private JPanel getContentPane(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{startTaskID},
new Component[]{endTaskID},
new Component[]{linkType}
};
return TableLayoutHelper.createTableLayoutPane(components, row, col);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1});
}
@Override

14
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkTableDataContentPane.java

@ -1,22 +1,19 @@
package com.fr.van.chart.gantt.designer.data.link;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.TopDefinition;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.plugin.chart.gantt.data.VanGanttLinkTableDefinition;
import com.fr.stable.StringUtils;
import com.fr.van.chart.gantt.designer.data.data.GanttDataPaneHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.util.List;
/**
@ -31,9 +28,7 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane
this.setLayout(new BorderLayout());
initAllComponent();
JPanel panel = getContentPane();
panel.setBorder(BorderFactory.createEmptyBorder(0,24,0,15));
this.add(panel, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(246,(int)this.getPreferredSize().getHeight()));
}
@ -47,18 +42,13 @@ public class GanttLinkTableDataContentPane extends AbstractTableDataContentPane
}
private JPanel getContentPane(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p};
double[] col = {p,f};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Start_Task_ID")), startTaskIDComboBox},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_End_Task_ID")), endTaskIDComboBox},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Link_Type")), linkTypeComboBox}
};
return TableLayoutHelper.createGapTableLayoutPane(components, row, col,24,6);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
@Override

12
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/axis/GanttAxisStylePane.java

@ -1,16 +1,14 @@
package com.fr.van.chart.gantt.designer.style.axis;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.beans.BasicBeanPane;
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.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent;
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane;
import com.fr.plugin.chart.gantt.attr.GanttAxisStyleAttr;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import java.awt.BorderLayout;
@ -39,15 +37,9 @@ public class GanttAxisStylePane extends BasicBeanPane<GanttAxisStyleAttr> {
public GanttAxisStylePane() {
initComponents();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = {p, p, p, p};
double[] col = {f, e};
Component[][] components = getUsedComponents();
JPanel content = TableLayoutHelper.createTableLayoutPane(components, row, col);
JPanel content = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
this.setLayout(new BorderLayout());
this.add(content, BorderLayout.CENTER);

10
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/axis/GanttAxisStylePaneWithPosition.java

@ -1,14 +1,12 @@
package com.fr.van.chart.gantt.designer.style.axis;
import com.fr.base.BaseUtils;
import com.fine.theme.utils.FineComponentsFactory;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.gantt.attr.GanttAxisStyleAttr;
import com.fr.plugin.chart.gantt.attr.GanttAxisStyleAttrWithPosition;
import com.fr.stable.Constants;
import javax.swing.Icon;
import java.awt.Component;
/**
@ -22,11 +20,7 @@ public class GanttAxisStylePaneWithPosition extends GanttAxisStylePane {
protected void initComponents() {
super.initComponents();
Icon[] alignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")};
Integer[] alignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT};
alignmentPane = new UIButtonGroup<>(alignmentIconArray, alignment);
alignmentPane = FineComponentsFactory.createHorizontalAlignmentButtonGroup();
}
protected Component[][] getUsedComponents() {

38
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/axis/GanttProcessAxisPane.java

@ -1,17 +1,16 @@
package com.fr.van.chart.gantt.designer.style.axis;
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.gui.ispinner.UISpinner;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.plugin.chart.gantt.attr.GanttProcessAxis;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.AbstractVanChartScrollPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
@ -32,20 +31,12 @@ public class GanttProcessAxisPane extends AbstractVanChartScrollPane<VanChart> {
@Override
protected JPanel createContentPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p,p,p,p,p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{createHorizontalProportionPane()},
new Component[]{createHorizontalHeaderPane()},
new Component[]{createVerticalHeaderPane()},
new Component[]{createBodyPane()}
};
return TableLayoutHelper.createTableLayoutPane(components, row, col);
return FineLayoutBuilder.createVerticalLayout(0,
createHorizontalProportionPane(),
createHorizontalHeaderPane(),
createVerticalHeaderPane(),
createBodyPane()
);
}
protected void layoutContentPane() {
@ -56,19 +47,19 @@ public class GanttProcessAxisPane extends AbstractVanChartScrollPane<VanChart> {
private Component createBodyPane() {
bodyPane = new GanttAxisStylePaneWithPosition();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content"), bodyPane);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Content"), bodyPane);
}
private Component createHorizontalHeaderPane() {
horizontalHeaderPane = new GanttAxisStylePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Horizontal_Table"), horizontalHeaderPane);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Horizontal_Table"), horizontalHeaderPane, true);
}
private Component createVerticalHeaderPane() {
verticalHeaderPane = new GanttAxisStylePaneWithPosition();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Vertical_Table"), verticalHeaderPane);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Vertical_Table"), verticalHeaderPane, true);
}
private Component createHorizontalProportionPane() {
@ -91,9 +82,10 @@ public class GanttProcessAxisPane extends AbstractVanChartScrollPane<VanChart> {
}
});
JPanel jPanel = TableLayout4VanChartHelper.createGapTableLayoutPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Horizontal_Proportion"), panel);
JPanel jPanel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Horizontal_Proportion")), panel);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Function_Percent"), jPanel);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Data_Function_Percent"), jPanel, true);
}
private void checkoutPaneVisible() {
@ -119,7 +111,7 @@ public class GanttProcessAxisPane extends AbstractVanChartScrollPane<VanChart> {
@Override
public void updateBean(VanChart vanChart){
VanChartGanttPlot ganttPlot = (VanChartGanttPlot) vanChart.getPlot();
VanChartGanttPlot ganttPlot = vanChart.getPlot();
GanttProcessAxis processAxis = new GanttProcessAxis();
processAxis.setCustomProportion(typeButton.getSelectedIndex() == 1);

25
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/axis/GanttTimeAxisPane.java

@ -1,17 +1,16 @@
package com.fr.van.chart.gantt.designer.style.axis;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.foldablepane.UIExpandablePane;
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.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.plugin.chart.gantt.attr.GanttTimeAxis;
import com.fr.plugin.chart.type.ZoomLevel;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.designer.AbstractVanChartScrollPane;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.JPanel;
import java.awt.Component;
@ -35,10 +34,6 @@ public class GanttTimeAxisPane extends AbstractVanChartScrollPane<VanChart> {
@Override
protected JPanel createContentPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p,p,p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{createConditionConfigPane()},
@ -46,7 +41,7 @@ public class GanttTimeAxisPane extends AbstractVanChartScrollPane<VanChart> {
new Component[]{createDownHeadPane()},
};
return TableLayoutHelper.createTableLayoutPane(components, row, col);
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
}
protected void layoutContentPane() {
@ -57,13 +52,13 @@ public class GanttTimeAxisPane extends AbstractVanChartScrollPane<VanChart> {
private Component createDownHeadPane() {
downHeadPane = new GanttAxisStylePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Down_Head_Table"),downHeadPane);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Down_Head_Table"),downHeadPane);
}
private Component createUpHeadPane() {
upHeadPane = new GanttAxisStylePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Up_Head_Table"),upHeadPane);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Up_Head_Table"),upHeadPane, true);
}
private Component createConditionConfigPane() {
@ -71,12 +66,6 @@ public class GanttTimeAxisPane extends AbstractVanChartScrollPane<VanChart> {
initialLevel = new UIComboBox(ZOOM_LEVELS);
weekendTooltip = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Open"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Close")});
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = {p, p, p, p};
double[] col = {f, e};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Time_Zoom")), timeZoom},
@ -84,9 +73,9 @@ public class GanttTimeAxisPane extends AbstractVanChartScrollPane<VanChart> {
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Weekend_Tooltip")), weekendTooltip}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Condition_Config"),panel);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Condition_Config"),panel, true);
}
@Override

47
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java

@ -1,19 +1,18 @@
package com.fr.van.chart.gantt.designer.style.series;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.LineComboBox;
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.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.stable.CoreConstants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartBeautyPane;
import com.fr.van.chart.designer.component.VanChartGanttTimeLinePane;
import com.fr.van.chart.designer.component.VanChartMarkerPane;
@ -40,49 +39,33 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane {
@Override
protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p,p,p,p,p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{createGanntStylePane()},
new Component[]{createLinkLinePane()},
new Component[]{createMarkerPane()},
new Component[]{createLargeDataModelPane()},
new Component[]{createGuideLinePane()}
};
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
contentPane = FineLayoutBuilder.createVerticalLayout(0,
createGanntStylePane(),
createLinkLinePane(),
createLargeDataModelPane(),
createGuideLinePane()
);
return contentPane;
}
private JPanel createGanntStylePane(){
seriesNewLine = 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_Series_New_Line"),seriesNewLine);
JPanel ganntStylePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Pattern"), panel);
return ganntStylePane;
JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_New_Line")), seriesNewLine);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Pattern"), panel, true);
}
private JPanel createLinkLinePane(){
lineWidth = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART);
colorSelect = new ColorSelectBoxWithOutTransparent(100);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] col = {f, e};
double[] row = {p,p,p};
Component[][] components = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")), lineWidth},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")), colorSelect}
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
JPanel linkLinePane = TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Link_Line"), panel);
return linkLinePane;
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10, components,new double[]{1.2, 3});
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Link_Line"), panel, true);
}
//标记点类型
@ -98,12 +81,12 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane {
return new VanChartImageMarkerWithoutWidthAndHeightPane();
}
};
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Gannt_Marker"), markerPane);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Gannt_Marker"), markerPane, true);
}
protected JPanel createGuideLinePane() {
timeLinePane = new VanChartGanttTimeLinePane();
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Guide_Line_Identify"), timeLinePane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Guide_Line_Identify"), timeLinePane);
}
@Override

14
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartImageMarkerWithoutWidthAndHeightPane.java

@ -4,7 +4,11 @@ import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane;
import com.fr.van.chart.designer.component.marker.VanChartImageMarkerPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
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.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by hufan on 2017/1/13.
@ -13,8 +17,10 @@ public class VanChartImageMarkerWithoutWidthAndHeightPane extends VanChartImageM
@Override
protected JPanel createContentPane(ImageBackgroundQuickPane imageBackgroundPane, JPanel sizePanel) {
JPanel panel = new JPanel(new BorderLayout());
panel.add(imageBackgroundPane, BorderLayout.CENTER);
return panel;
return row(
flex(1.2), column(10,
cell(imageBackgroundPane)
).weight(3)
).getComponent();
}
}

13
designer-chart/src/main/java/com/fr/van/chart/line/VanChartLineSeriesPane.java

@ -1,13 +1,12 @@
package com.fr.van.chart.line;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.Plot;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.foldablepane.UIExpandablePane;
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.marker.type.MarkerType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartBeautyPane;
import com.fr.van.chart.designer.component.VanChartMarkerPane;
import com.fr.van.chart.designer.component.marker.VanChartCommonMarkerPane;
@ -27,10 +26,6 @@ public class VanChartLineSeriesPane extends VanChartAbstractPlotSeriesPane {
}
protected JPanel getContentInPlotType() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] row = {p, p, p, p, p, p, p, p};
double[] col = {f};
Component[][] components = new Component[][]{
new Component[]{createLineTypePane()},
@ -41,7 +36,7 @@ public class VanChartLineSeriesPane extends VanChartAbstractPlotSeriesPane {
new Component[]{createTrendLinePane()},
};
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
contentPane = FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
return contentPane;
}
@ -62,6 +57,6 @@ public class VanChartLineSeriesPane extends VanChartAbstractPlotSeriesPane {
}
};
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Chart_Marker"), markerPane, true);
}
}

9
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/AreaPane.java

@ -1,11 +1,10 @@
package com.fr.van.chart.map.designer.data.component.report;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
@ -27,12 +26,8 @@ public class AreaPane extends AbstractReportDataContentPane {
protected JPanel createContentPane() {
areaName = new DefaultTinyFormulaPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p};
Component[][] components = getComponent();
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3});
}
protected Component[][] getComponent() {

9
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LongLatAreaPane.java

@ -1,11 +1,10 @@
package com.fr.van.chart.map.designer.data.component.report;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.formula.DefaultTinyFormulaPane;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import javax.swing.JPanel;
@ -30,12 +29,8 @@ public class LongLatAreaPane extends AreaPane {
areaName = new DefaultTinyFormulaPane();
longitude = new DefaultTinyFormulaPane();
latitude = new DefaultTinyFormulaPane();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p, p, p};
Component[][] components = getComponent();
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 12, 6);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
protected Component[][] getComponent() {

9
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/AreaPane.java

@ -1,10 +1,9 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
@ -42,12 +41,8 @@ public class AreaPane extends AbstractTableDataContentPane {
protected JPanel createAreaNamePane() {
initAreaNameCom();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p};
Component[][] components = getComponent();
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 12, 6);
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3});
}
protected Component[][] getComponent() {

4
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LineMapAreaPane.java

@ -1,5 +1,6 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
@ -15,7 +16,6 @@ import java.util.List;
* Created by hufan on 2016/12/21.
*/
public class LineMapAreaPane extends PointMapAreaPane {
private static final int V_GAP = 10;
protected AreaPane endAreaPane;
public LineMapAreaPane(VanPointMapPlotTableDataContentPane.LongLatAreaTableComboPane parentPane) {
@ -26,7 +26,7 @@ public class LineMapAreaPane extends PointMapAreaPane {
initAreaPane(parentPane);
initEndAreaPane(parentPane);
JPanel content = new JPanel(new BorderLayout(0, V_GAP));
JPanel content = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
content.add(areaPane, BorderLayout.NORTH);
content.add(endAreaPane, BorderLayout.CENTER);
return content;

9
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LongLatAreaPane.java

@ -1,9 +1,8 @@
package com.fr.van.chart.map.designer.data.component.table;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.van.chart.map.designer.data.component.LongitudeLatitudeAndArea;
import com.fr.van.chart.map.designer.data.contentpane.table.VanPointMapPlotTableDataContentPane;
@ -30,13 +29,9 @@ public class LongLatAreaPane extends AreaPane {
initLongitudeCom();
initLatitudeCom();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, COMPONENT_WIDTH};
double[] rowSize = {p, p, p};
Component[][] components = getComponent();
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 12, 6);
return FineLayoutBuilder.compatibleTableLayout(10, components,new double[]{1.2, 3});
}
protected Component[][] getComponent() {

18
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java

@ -10,12 +10,14 @@ import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane;
import com.fr.plugin.chart.map.data.VanMapReportDefinition;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by Mitisky on 16/5/16.
*/
@ -26,7 +28,6 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte
initEveryPane();
initAreaName();
JPanel panel = getContent();
panel.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
this.add(panel, "0,0,2,0");
}
@ -34,15 +35,12 @@ public class VanAreaMapPlotReportDataContentPane extends AbstractReportDataConte
areaName = new DefaultTinyFormulaPane() {
@Override
protected void initLayout() {
this.setLayout(new BorderLayout(4, 0));
this.setLayout(new BorderLayout());
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name"));
label.setPreferredSize(new Dimension(75, 20));
this.add(label, BorderLayout.WEST);
formulaTextField.setPreferredSize(new Dimension(100, 20));
this.add(formulaTextField, BorderLayout.CENTER);
this.add(formulaTextFieldButton, BorderLayout.EAST);
this.add(row(cell(label).weight(1.2),
cell(formulaTextField).weight(2.4), flex(0.1), cell(formulaTextFieldButton).weight(0.5)
).getComponent());
}
};
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save