Browse Source

REPORT-113994 【NewUI】设计器样式翻新-图表

newui
Levy.Xie-解安森 4 months ago
parent
commit
97777571ec
  1. 1
      designer-base/src/main/java/com/fine/theme/utils/FineUIStyle.java
  2. 11
      designer-base/src/main/java/com/fr/design/editor/editor/ColumnSelectedEditor.java
  3. 8
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  4. 17
      designer-base/src/main/java/com/fr/design/formula/TinyFormulaPane.java
  5. 7
      designer-base/src/main/java/com/fr/design/gui/controlpane/JControlPane.java
  6. 4
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java
  7. 20
      designer-base/src/main/java/com/fr/design/gui/frpane/FineTabbedPane.java
  8. 2
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  9. 17
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java
  10. 18
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java
  11. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/cell/CellStyleEditPane.java
  12. 3
      designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index.svg
  13. 3
      designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_index_disable.svg
  14. 3
      designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name.svg
  15. 3
      designer-base/src/main/resources/com/fine/theme/icon/editor/ds_column_name_disable.svg
  16. 4
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  17. 3
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  18. 3
      designer-chart/src/main/java/com/fr/design/chart/ChartDialog.java
  19. 20
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  20. 34
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/data/table/MeterPlotTableDataContentPane.java
  21. 19
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/series/AbstractPlotSeriesPane.java
  22. 14
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/type/ChartImagePane.java
  23. 14
      designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaSeriesPane.java
  24. 4
      designer-chart/src/main/java/com/fr/van/chart/custom/component/MeterCustomPlotTableDataContentPane.java
  25. 3
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java
  26. 56
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java
  27. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartMarkerPane.java
  28. 5
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTrendLinePane.java
  29. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java
  30. 12
      designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartCommonMarkerPane.java
  31. 29
      designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartImageMarkerPane.java
  32. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisScrollPaneWithTypeSelect.java
  33. 22
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartAxisStyleSettingPane.java
  34. 26
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  35. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartValueAxisPane.java
  36. 37
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/component/VanChartAxisButtonPane.java
  37. 43
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/gauge/VanChartGaugeDetailAxisPane.java
  38. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeCateOrPercentLabelDetailPane.java
  39. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartGaugeLabelDetailPane.java
  40. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/style/label/VanChartPlotLabelDetailPane.java
  41. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/style/series/VanChartAbstractPlotSeriesPane.java
  42. 14
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartImageMarkerWithoutWidthAndHeightPane.java
  43. 13
      designer-chart/src/main/java/com/fr/van/chart/line/VanChartLineSeriesPane.java
  44. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/AreaPane.java
  45. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/report/LongLatAreaPane.java
  46. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/AreaPane.java
  47. 4
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LineMapAreaPane.java
  48. 9
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/component/table/LongLatAreaPane.java
  49. 18
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanAreaMapPlotReportDataContentPane.java
  50. 26
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java
  51. 24
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java
  52. 18
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java
  53. 27
      designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java
  54. 35
      designer-chart/src/main/java/com/fr/van/chart/multilayer/data/MultiPiePlotTableDataContentPane.java
  55. 2
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

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

@ -32,6 +32,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";

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

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));

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

@ -167,4 +167,24 @@ public class FineTabbedPane extends Column {
public Component getSelectedComponent() {
return tabComponents.get(String.valueOf(tabGroup.getSelectedItem()));
}
/**
* 设置选中的Tab组件
*
* @param i 组件序号
*/
public void setSelectedIndex(int i) {
tabGroup.setSelectedIndex(i);
cards.show(centerPane, String.valueOf(tabGroup.getSelectedItem()));
}
/**
* 获取选中的组件序号
*
* @return 组件序号
*/
public int getSelectedIndex() {
return tabGroup.getSelectedIndex();
}
}

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));

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));
}

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

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

@ -275,6 +275,8 @@
"tab": "widget/tab.svg",
"text_area": "widget/text_area.svg",
"text_field": "widget/text_field.svg",
"widget_tree": "widget/tree.svg"
"widget_tree": "widget/tree.svg",
"ds_column_name": "editor/ds_column_name.svg",
"ds_column_index": "editor/ds_column_index.svg"
}
}

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

@ -1257,6 +1257,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;

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) {

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));
}
/**

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

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

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

@ -1,13 +1,10 @@
package com.fr.van.chart.designer.component;
import com.fine.theme.utils.FineLayoutBuilder;
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.mainframe.chart.mode.ChartEditContext;
import com.fr.design.utils.gui.GUICoreUtils;
@ -21,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;
@ -98,13 +94,6 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem
this.listenerList.add(ChangeListener.class, l);
}
@Override
protected JPanel getLeftTopPane(UIToolbar topToolBar) {
Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), topToolBar},
};
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3});
}
@Override
public void saveSettings() {

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

@ -8,7 +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.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -81,8 +80,6 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
};
radius = new UISpinnerWithPx(0, 100, 0.5, 0);
double p = TableLayout.PREFERRED;
markerTypePane = FineLayoutBuilder.compatibleTableLayout(10, getMarkerTypeComponent(), new double[]{1.2, 3});
markerConfigPane = FineLayoutBuilder.compatibleTableLayout(10, getMarkerConfigComponent(), new double[]{1.2, 3});
@ -92,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();
}
/**

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

@ -1,10 +1,12 @@
package com.fr.van.chart.designer.style.axis;
import com.fine.theme.utils.FineUIScale;
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;
@ -14,7 +16,6 @@ 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.JPanel;
@ -58,10 +59,12 @@ public class VanChartAxisScrollPaneWithTypeSelect extends AbstractVanChartScroll
}
protected void initLayout() {
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
JPanel northPane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Type"), jcb);
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);

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

@ -2,6 +2,7 @@ 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.Utils;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
@ -55,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;
/**
* 坐标轴的基础配置项分类时间值等公共的部分
*/
@ -136,13 +140,6 @@ 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(isXAxis), null},
new Component[]{createLabelPane(), null},
@ -152,7 +149,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
new Component[]{createValueStylePane(), null},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1});
}
protected JPanel createTitlePane(boolean isXAxis) {
@ -191,9 +188,9 @@ 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 new UIExpandablePane(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, jPanel, true);
}
@ -218,7 +215,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
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);
@ -402,9 +399,8 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
centerPane.add(htmlLabelPane, Toolkit.i18nText("Fine-Design_Chart_Custom"));
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 = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
@ -416,7 +412,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() {

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

@ -52,7 +52,7 @@ public class VanChartValueAxisPane extends VanChartBaseAxisPane {
new Component[]{createValueStylePane(), null},
};
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
return FineLayoutBuilder.compatibleTableLayout(0, components, new double[]{1.2, 3});
}
protected boolean showLabelDisplay() {

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

@ -1,6 +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;
@ -14,15 +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.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;
@ -63,7 +63,8 @@ public class VanChartAxisButtonPane extends BasicBeanPane<VanChartAxisPlot> {
addButton.setVisible(false);
this.add(eastPane, BorderLayout.EAST);
buttonPane = new JPanel();
buttonPane = new Column();
buttonPane.setSpacing(10);
this.add(buttonPane, BorderLayout.CENTER);
itemX = new UIMenuItem(VanChartAttrHelper.X_AXIS_PREFIX);
@ -88,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) {

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() {

11
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;
@ -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() {

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

@ -106,7 +106,7 @@ public abstract class VanChartAbstractPlotSeriesPane extends AbstractPlotSeriesP
scrollPane.setViewportView(getContentInPlotType());
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
}
return column(10,
return column(0,
cell(getColorPane()), cell(getContentInPlotType())
).getComponent();
}
@ -159,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() {
@ -175,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);
}
//边框(默认没有圆角)
@ -271,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;
}

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());
}
};
}

26
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/report/VanPointMapPlotReportDataContentPane.java

@ -1,23 +1,21 @@
package com.fr.van.chart.map.designer.data.contentpane.report;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
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.ChartDataPane;
import com.fr.plugin.chart.map.data.VanMapReportDefinition;
import com.fr.van.chart.map.designer.data.component.report.AbstractLongLatAreaPane;
import com.fr.van.chart.map.designer.data.component.report.PointMapAreaPane;
import com.fr.van.chart.map.designer.data.component.report.PointMapLongLatAreaPane;
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;
/**
@ -33,8 +31,7 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa
@Override
protected JPanel getContent() {
longLatReportFormulaPane = new LongLatReportFormulaPane();
JPanel content = new JPanel(new BorderLayout(0, 4));
content.setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 0));
JPanel content = new JPanel(new BorderLayout(0, FineUIScale.scale(10)));
content.add(longLatReportFormulaPane, BorderLayout.CENTER);
return content;
}
@ -55,9 +52,6 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa
public class LongLatReportFormulaPane extends BasicBeanPane<VanMapReportDefinition> {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
private UIButtonGroup<Integer> locationType;
private JPanel centerPane;
@ -65,7 +59,7 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa
private AbstractLongLatAreaPane longLatAreaPane;
public LongLatReportFormulaPane() {
this.setLayout(new BorderLayout(0, 5));
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
centerPane = new JPanel(new CardLayout()) {
@Override
public Dimension getPreferredSize() {
@ -94,15 +88,9 @@ public class VanPointMapPlotReportDataContentPane extends VanAreaMapPlotReportDa
locationType.setSelectedIndex(0);
double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Geographic")), locationType},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 12, 6);
JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Geographic")), locationType
);
this.add(panel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);

24
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanAreaMapPlotTableDataContentPane.java

@ -1,25 +1,22 @@
package com.fr.van.chart.map.designer.data.contentpane.table;
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.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.BoldFontTextLabel;
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.ChartDataPane;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.data.MapMatchResult;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
import com.fr.van.chart.map.designer.data.component.SeriesTypeUseComboxPaneWithOutFilter;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
@ -32,14 +29,12 @@ public class VanAreaMapPlotTableDataContentPane extends VanMapTableDataContentPa
protected SeriesTypeUseComboxPaneWithOutFilter seriesTypeUseComboxPane;
public VanAreaMapPlotTableDataContentPane(ChartDataPane parent) {
this.setLayout(new BorderLayout(0, 4));
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
initAreaNameCom();
JPanel areaNamePane = createAreaNamePane();
JSeparator jSeparator = new JSeparator();
areaNamePane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
jSeparator.setPreferredSize(new Dimension(246, 2));
this.add(areaNamePane, BorderLayout.NORTH);
this.add(jSeparator, BorderLayout.CENTER);
@ -63,19 +58,8 @@ public class VanAreaMapPlotTableDataContentPane extends VanMapTableDataContentPa
protected JPanel createAreaNamePane() {
UILabel label = new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Area_Name"));
label.setPreferredSize(new Dimension(80, 20));
areaNameCom.setPreferredSize(new Dimension(100, 20));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{label, createAreaPanel(areaNameCom)},
};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3}, label, createAreaPanel(areaNameCom));
}

18
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanMapTableDataContentPane.java

@ -1,6 +1,6 @@
package com.fr.van.chart.map.designer.data.contentpane.table;
import com.fr.base.BaseUtils;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.Utils;
import com.fr.chartx.TwoTuple;
import com.fr.design.chartx.component.MapAreaMatchPane;
@ -17,13 +17,15 @@ import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.tree.DefaultMutableTreeNode;
import java.util.Set;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
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 Bjorn
* @version 10.0
@ -55,13 +57,11 @@ public abstract class VanMapTableDataContentPane extends AbstractTableDataConten
}
public JPanel createAreaPanel(UIComboBox areaBox) {
JPanel areaPanel = new JPanel(new BorderLayout(4, 0));
areaBox.setPreferredSize(new Dimension(70, 20));
areaPanel.add(areaBox, BorderLayout.CENTER);
UIButton uiButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/config.png"));
UIButton uiButton = new UIButton(new LazyIcon("tool_config"));
uiButton.addActionListener(createActionListener(areaBox));
areaPanel.add(uiButton, BorderLayout.EAST);
return areaPanel;
return row(
cell(areaBox).weight(2.4), flex(0.1), cell(uiButton).weight(0.5)
).getComponent();
}
private ActionListener createActionListener(final UIComboBox areaBox){

27
designer-chart/src/main/java/com/fr/van/chart/map/designer/data/contentpane/table/VanPointMapPlotTableDataContentPane.java

@ -1,12 +1,12 @@
package com.fr.van.chart.map.designer.data.contentpane.table;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.plugin.chart.map.data.VanMapTableDefinitionProvider;
@ -15,7 +15,6 @@ import com.fr.van.chart.map.designer.data.component.table.AreaPane;
import com.fr.van.chart.map.designer.data.component.table.PointMapAreaPane;
import com.fr.van.chart.map.designer.data.component.table.PointMapLongLatAreaPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -29,8 +28,6 @@ import java.awt.Dimension;
* Created by Mitisky on 16/5/17.
*/
public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableDataContentPane {
private static final int LEFT_GAP = 19;
private static final int V_GAP = 15;
//改控件相当于面积图的区域名控件
private LongLatAreaTableComboPane longLatTableComboPane;
@ -43,10 +40,7 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData
}
protected JPanel createAreaNamePane() {
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(0, LEFT_GAP, V_GAP, 0));
panel.add(longLatTableComboPane, BorderLayout.CENTER);
return panel;
return FineLayoutBuilder.asBorderLayoutWrapped(longLatTableComboPane);
}
@Override
@ -91,11 +85,7 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData
public LongLatAreaTableComboPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double labelWidth = 65;
this.setLayout(new BorderLayout(0, 5));
this.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
centerPane = new JPanel(new CardLayout()) {
@Override
public Dimension getPreferredSize() {
@ -124,15 +114,10 @@ public class VanPointMapPlotTableDataContentPane extends VanAreaMapPlotTableData
centerPane.add(longLatAreaPane, "longLat");
locationType.setSelectedIndex(0);
double[] columnSize = {labelWidth, f};
double[] rowSize = {p};
UILabel label = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Chart_Geographic"));
Component[][] components = new Component[][]{
new Component[]{label, locationType},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 5, 6);
JPanel panel = FineLayoutBuilder.createHorizontalLayout(0, new double[]{1.2, 3},
label, locationType);
this.add(panel, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);

35
designer-chart/src/main/java/com/fr/van/chart/multilayer/data/MultiPiePlotTableDataContentPane.java

@ -1,5 +1,7 @@
package com.fr.van.chart.multilayer.data;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIScale;
import com.fr.chart.base.ChartConstants;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.chartdata.TopDefinition;
@ -11,7 +13,6 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
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.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane;
@ -21,9 +22,7 @@ import com.fr.plugin.chart.multilayer.data.MultiPieValueDefinition;
import com.fr.stable.ArrayUtils;
import com.fr.stable.AssistUtils;
import com.fr.stable.StringUtils;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import java.awt.BorderLayout;
@ -38,9 +37,6 @@ import java.util.List;
* Created by Fangjie on 2016/6/15.
*/
public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPane implements UIObserver {
private static final int HT = 20;
private static final int WD = 100;
private static final int LABEL_WIDTH = 72;
private UISpinner levelNumEdit;
private UITextField nameField;
@ -74,7 +70,6 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
levelNameList = new ArrayList<UIComboBox>();
for (int i = 0; i < levelNum; i++){
levelNameList.add(new UIComboBox());
levelNameList.get(i).setPreferredSize(new Dimension(WD, HT));
levelNameList.get(i).addItem(Toolkit.i18nText("Fine-Design_Chart_Use_None"));
}
}
@ -86,47 +81,32 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
contentPane = new JPanel();
contentPane.setLayout(new BorderLayout(0, 4));
contentPane.setLayout(new BorderLayout(0, FineUIScale.scale(10)));
contentPane.add(north, BorderLayout.NORTH);
contentPane.add(center, BorderLayout.CENTER);
}
private JPanel createCenterPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize_center = {LABEL_WIDTH, COMPONENT_WIDTH};
double[] rowSize_center = new double[levelNum + 3];
initLevelNameList();
for (int i = 0; i < levelNum + 3; i++){
rowSize_center[i] = p;
}
Component[][] components_center = new Component[levelNum + 3][];
for (int i = 0; i < levelNum; i++){
components_center[i] = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Level") + String.valueOf(i+1)), levelNameList.get(i)};
}
value = new UIComboBox();
value.setPreferredSize(new Dimension(WD, HT));
calculateCombox = new CalculateComboBox();
calculateCombox.reset();
calculateCombox.setPreferredSize(new Dimension(WD, HT));
components_center[levelNum] = new Component[]{getJSeparator(), null};
components_center[levelNum+1] = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Use_Value")), value};
components_center[levelNum+2] = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Summary_Method")), calculateCombox};
initCenterItemListener();
registerListener4Center();
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components_center,rowSize_center,columnSize_center);
panel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
return panel;
return FineLayoutBuilder.compatibleTableLayout(10, components_center, new double[]{1.2, 3});
}
@ -158,9 +138,6 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
}
private JPanel createNorthPane() {
double p = TableLayout.PREFERRED;
double[] columnSize_north = {LABEL_WIDTH, COMPONENT_WIDTH};
double[] rowSize_north = {p, p, p};
levelNumEdit = new UISpinner(1, 15, 1, levelNum){
@Override
@ -189,9 +166,7 @@ public class MultiPiePlotTableDataContentPane extends AbstractTableDataContentPa
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Level_Number")), levelNumEdit},
};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components_north, rowSize_north, columnSize_north);
panel.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
return panel;
return FineLayoutBuilder.compatibleTableLayout(10, components_north, new double[]{1.2, 3});
}
private void refreshCenterPane(){

2
designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

@ -140,7 +140,7 @@ public class RichTextToolBar extends BasicPane {
private void addToToolBar() {
this.setLayout(new BorderLayout());
this.add(row(10,
cell(fontNameComboBox).weight(0.3),cell(fontSizeComboBox).weight(0.1), cell(toolbar).weight(0.6)
cell(fontNameComboBox).weight(0.3),cell(fontSizeComboBox).weight(0.15), cell(toolbar).weight(0.6)
).getComponent());
}

Loading…
Cancel
Save