Browse Source

无jira 解决冲突

newui
Levy.Xie-解安森 6 months ago
parent
commit
b21b7a996f
  1. 11
      designer-base/src/main/java/com/fr/design/actions/UpdateAction.java
  2. 1
      designer-base/src/main/java/com/fr/design/condition/ConditionAttrSingleConditionPane.java
  3. 53
      designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java
  4. 1
      designer-base/src/main/java/com/fr/design/condition/HighLightConditionAction.java
  5. 5
      designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java
  6. 4
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  7. 40
      designer-base/src/main/java/com/fr/design/data/datapane/ESDStrategyConfigPane.java
  8. 52
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
  9. 13
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ItemEditableComboBoxPanel.java
  10. 5
      designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java
  11. 54
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  12. 19
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java
  13. 44
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureParameterPane.java
  14. 3
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureTableModel.java
  15. 66
      designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
  16. 3
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java
  17. 25
      designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java
  18. 7
      designer-base/src/main/java/com/fr/design/gui/controlpane/JListControlPane.java
  19. 4
      designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
  20. 27
      designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java
  21. 7
      designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java
  22. 2
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/ParameterTableModel.java
  23. 5
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UIArrayTableModel.java
  24. 37
      designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java
  25. 50
      designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/CheckBoxTreeCellRenderer.java
  26. 1
      designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java
  27. 79
      designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java
  28. 74
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  29. 23
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  30. 24
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java
  31. 23
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java
  32. 73
      designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java
  33. 20
      designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java
  34. 10
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupPane.java
  35. 2
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java
  36. 32
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java
  37. 89
      designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java
  38. 51
      designer-base/src/main/java/com/fr/design/javascript/EmailPane.java
  39. 20
      designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java
  40. 21
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java
  41. 4
      designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java
  42. 6
      designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java
  43. 25
      designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java
  44. 156
      designer-base/src/main/java/com/fr/design/style/BorderPane.java
  45. 212
      designer-base/src/main/java/com/fr/design/style/FRFontPane.java
  46. 23
      designer-base/src/main/java/com/fr/design/style/FontFamilyPane.java
  47. 91
      designer-base/src/main/java/com/fr/design/style/FontSizeStylePane.java
  48. 73
      designer-base/src/main/java/com/fr/design/style/FormatPane.java
  49. 8
      designer-base/src/main/java/com/fr/design/style/background/BackgroundButtonPane.java
  50. 7
      designer-base/src/main/java/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java
  51. 47
      designer-base/src/main/java/com/fr/design/style/background/BackgroundPane.java
  52. 7
      designer-base/src/main/java/com/fr/design/style/background/BackgroundPane4Browser.java
  53. 7
      designer-base/src/main/java/com/fr/design/style/background/BackgroundTabPane.java
  54. 56
      designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBackgroundPane.java
  55. 20
      designer-base/src/main/java/com/fr/design/style/background/impl/BPane.java
  56. 50
      designer-base/src/main/java/com/fr/design/style/background/impl/ImageBackgroundPane.java
  57. 3
      designer-base/src/main/java/com/fr/design/style/background/impl/NullBackgroundPane.java
  58. 40
      designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java
  59. 9
      designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java
  60. 62
      designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java
  61. 160
      designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java
  62. 41
      designer-base/src/main/java/com/fr/design/style/color/DetailColorSelectPane.java
  63. 75
      designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java
  64. 9
      designer-base/src/main/java/com/fr/design/style/color/RecentUseColorPane.java
  65. 1
      designer-base/src/main/java/com/fr/design/style/color/UsedColorPane.java
  66. 2
      designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java
  67. 6
      designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java
  68. 38
      designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java
  69. 66
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  70. 7
      designer-base/src/main/resources/com/fine/theme/icon/digitalPlatform.svg
  71. 4
      designer-base/src/main/resources/com/fine/theme/icon/logo.svg
  72. 3
      designer-base/src/main/resources/com/fine/theme/icon/pages.svg
  73. 14
      designer-base/src/main/resources/com/fine/theme/icon/previewSql.svg
  74. 8
      designer-base/src/main/resources/com/fine/theme/icon/tables.svg
  75. 3
      designer-base/src/main/resources/com/fine/theme/icon/time.svg
  76. 11
      designer-base/src/main/resources/com/fine/theme/icon/views.svg
  77. 8
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  78. BIN
      designer-base/src/main/resources/com/fr/design/images/data/hyperlink.png
  79. 11
      designer-base/src/main/resources/com/fr/design/images/data/hyperlink.svg
  80. BIN
      designer-base/src/main/resources/com/fr/design/images/data/user_widget.png
  81. 10
      designer-base/src/main/resources/com/fr/design/images/data/user_widget.svg
  82. 14
      designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg
  83. 3
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/bold.svg
  84. 3
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/italic.svg
  85. BIN
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_bold.png
  86. BIN
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_italic.png
  87. BIN
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_underline.png
  88. 3
      designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/underline.svg
  89. BIN
      designer-base/src/main/resources/com/fr/design/images/server/global_param.png
  90. 10
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java
  91. 41
      designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java
  92. 9
      designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java
  93. 33
      designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java
  94. 21
      designer-chart/src/main/java/com/fr/design/module/ChartPreStylePane.java
  95. 7
      designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java
  96. 1
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  97. 3
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/data/link/GanttLinkReportDataContentPane.java
  98. 179
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java
  99. 2
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceSouthPanel.java
  100. 29
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java
  101. Some files were not shown because too many files have changed in this diff Show More

11
designer-base/src/main/java/com/fr/design/actions/UpdateAction.java

@ -10,7 +10,6 @@ import com.fr.base.Style;
import com.fr.base.svg.SVGIcon;
import com.fr.base.svg.IconUtils;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenu.UICheckBoxMenuItem;
import com.fr.design.gui.imenu.UIMenuEastAttrItem;
@ -91,16 +90,6 @@ public abstract class UpdateAction extends ShortCut implements Action {
*/
public static final String DISABLED_ICON = "disabledIcon";
/**
* Constructor
*/
public UpdateAction() {
//设置默认的small icon,必须有一个默认的图片,这样菜单整体美观.
this.putValue(Action.SMALL_ICON, UIConstants.BLACK_ICON);
}
/**
* Returns true if the action is enabled.
*

1
designer-base/src/main/java/com/fr/design/condition/ConditionAttrSingleConditionPane.java

@ -40,6 +40,7 @@ public abstract class ConditionAttrSingleConditionPane<T> extends SingleConditio
conditionAttributesPane.resetUseAbleActionList();
conditionAttributesPane.updateMenuDef();
conditionAttributesPane.checkConditionPane();
conditionAttributesPane.resetWindow();
conditionAttributesPane.redraw();
}

53
designer-base/src/main/java/com/fr/design/condition/ConditionAttributesPane.java

@ -1,6 +1,10 @@
package com.fr.design.condition;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.common.annotations.Open;
import com.fr.design.actions.UpdateAction;
import com.fr.design.beans.BasicBeanPane;
@ -10,14 +14,21 @@ import com.fr.design.menu.ToolBarDef;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
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.fix;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
@Open
public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
@ -33,44 +44,47 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
//可用的Actions.
protected java.util.List<UpdateAction> useAbleActionList = new java.util.ArrayList<UpdateAction>();
protected void initComponents() {
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
// 属性 界面
JPanel propertyChangePane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(propertyChangePane);
protected JScrollPane selectedItemScrollPane = new JScrollPane();
propertyChangePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property") + ":", null));
protected void initComponents() {
this.setLayout(new BorderLayout());
// 选择要改变的属性.
JPanel addItemPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
JPanel addItemPane = new JPanel(new BorderLayout());
ToolBarDef toolbarDef = new ToolBarDef();
menuDef = new CellHighlightAddMenuDef();
menuDef.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Highlight_Click_to_Choose_Property_To_Modify"));
menuDef.setIconPath("com/fr/design/images/control/addPopup.png");
menuDef.setIcon(new LazyIcon("add_popup"));
toolbarDef.addShortCut(menuDef);
updateMenuDef();
UIToolbar toolBar = ToolBarDef.createJToolBar();
toolBar.setLayout(new BorderLayout());
toolBar.setBorder(new FineRoundBorder());
toolBar.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
toolbarDef.updateToolBar(toolBar);
addItemPane.add(toolBar);
addItemPane.add(toolBar, BorderLayout.WEST);
propertyChangePane.add(addItemPane);
addItemPane.setBorder(new FineRoundBorder());
selectedItemPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
// selectedItemPane.setLayout(new BoxLayout(selectedItemPane,BoxLayout.Y_AXIS));
// 选中的添加Itempane
JScrollPane selectedItemScrollPane = new JScrollPane();
selectedItemScrollPane.setViewportView(selectedItemPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
selectedItemScrollPane.setMinimumSize(new Dimension((int) selectedItemScrollPane.getPreferredSize().getWidth(), MIN_HEIGHT));
dealScrollPane(selectedItemScrollPane);
propertyChangePane.add(selectedItemScrollPane);
this.add(FineUIUtils.wrapComponentWithTitle(column(
10,
row(cell(addItemPane),flex()),
cell(selectedItemScrollPane).with(it -> it.setBorder(new FineRoundBorder())),
fix(10)
).getComponent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property")), BorderLayout.NORTH);
}
protected void dealScrollPane(JScrollPane scrollPane){
@ -125,6 +139,13 @@ public abstract class ConditionAttributesPane<T> extends BasicBeanPane<T> {
}
}
/**
* 根据所需属性个数设置属性布局大小
*/
public void resetWindow() {
selectedItemScrollPane.setPreferredSize(new Dimension(selectedItemScrollPane.getWidth(), Math.min(35 * (classPaneMap.size() - useAbleActionList.size()), 150)));
}
public void removeConditionAttrSingleConditionPane(JComponent component) {
selectedItemPane.remove(component);
}

1
designer-base/src/main/java/com/fr/design/condition/HighLightConditionAction.java

@ -29,6 +29,7 @@ public class HighLightConditionAction extends UpdateAction {
conditionAttributesPane.removeUpdateActionFromUsableList(this);
conditionAttributesPane.updateMenuDef();
conditionAttributesPane.checkConditionPane();
conditionAttributesPane.resetWindow();
conditionAttributesPane.redraw();
conditionAttrSingleConditionPane.setDefault();
}

5
designer-base/src/main/java/com/fr/design/condition/SingleConditionPane.java

@ -5,6 +5,7 @@ import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.layout.FRGUIPaneFactory;
@ -25,13 +26,11 @@ public abstract class SingleConditionPane<T> extends BasicPane {
if (isRemove) {
if(cancel == null) {
cancel = new UIButton(BaseUtils.readIcon("/com/fr/base/images/cell/control/remove.png"));
cancel = new UIButton(new LazyIcon("remove"));
cancel.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Action_Remove"));
cancel.addActionListener(cancleListener);
cancel.setMargin(new Insets(0, 0, 0, 0));
}
this.add(cancel);
}
}

4
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java

@ -133,11 +133,11 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
}
public ChoosePane(Previewable parent, int labelSize) {
this.initBasicComponet();
this.initBasicComponent();
this.initComponentsLayout(new PreviewLabel(parent == null ? this : parent), labelSize);
}
private void initBasicComponet() {
private void initBasicComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
dsNameComboBox = new StringUIComboBox();

40
designer-base/src/main/java/com/fr/design/data/datapane/ESDStrategyConfigPane.java

@ -1,5 +1,7 @@
package com.fr.design.data.datapane;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -33,6 +35,9 @@ import java.util.Collections;
import java.util.Date;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* @author rinoux
* @version 10.0
@ -72,21 +77,24 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
setLayout(FRGUIPaneFactory.createM_BorderLayout());
this.selectAutoUpdate = new UIRadioButton(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Every_Interval"));
this.updateInterval = new UITextField(4);
this.shouldEvolve = new UICheckBox(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Auto_Evolved_Strategy"), false);
this.shouldEvolve.setEnabled(false);
this.shouldEvolve.setBorder(new ScaledEmptyBorder(0, 4, 0, 0));
this.updateIntervalCheckTips = new UILabel(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Error_Interval_Format"));
this.updateIntervalCheckTips.setForeground(Color.RED);
this.updateIntervalCheckTips.setVisible(false);
this.selectBySchema = new UIRadioButton(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Cron"));
this.schemaTime = new UITextField(10);
this.schemaTimeCheckTips = new UILabel(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Error_Time_Format"));
this.schemaTimeCheckTips.setVisible(false);
this.schemaTimeCheckTips.setForeground(Color.RED);
addListener();
addCenterPanel();
}
private void addListener() {
this.selectAutoUpdate.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
ESDStrategyConfigPane.this.selectBySchema.setSelected(!ESDStrategyConfigPane.this.selectAutoUpdate.isSelected());
@ -105,19 +113,7 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
}
});
JPanel pane = FRGUIPaneFactory.createVerticalTitledBorderPane(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Cache_Update_Strategy"));
add(pane, BorderLayout.NORTH);
JPanel row1 = GUICoreUtils.createFlowPane(new Component[]{
this.selectAutoUpdate,
this.updateInterval,
new UILabel(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Minute_Update_Cache")),
this.shouldEvolve,
this.updateIntervalCheckTips
}, 0, 5);
pane.add(row1);
ActionLabel actionLabel = new ActionLabel(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Cron_Help"));
actionLabel = new ActionLabel(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Cron_Help"));
actionLabel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -128,6 +124,16 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
}
}
});
}
private void addCenterPanel() {
JPanel row1 = GUICoreUtils.createFlowPane(new Component[]{
this.selectAutoUpdate,
this.updateInterval,
new UILabel(InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Minute_Update_Cache")),
this.shouldEvolve,
this.updateIntervalCheckTips
}, 0, 5);
JPanel row2 = GUICoreUtils.createFlowPane(new Component[]{
this.selectBySchema,
@ -135,7 +141,9 @@ public class ESDStrategyConfigPane extends BasicBeanPane<StrategyConfig> {
actionLabel,
this.schemaTimeCheckTips
}, 0, 5);
pane.add(row2);
add(FineUIUtils.wrapComponentWithTitle(column(10, cell(row1), cell(row2)).getComponent(),
InterProviderFactory.getDesignI18nProvider().i18nText("Fine-Design_ESD_Cache_Update_Strategy")), BorderLayout.NORTH);
}

52
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java

@ -1,5 +1,8 @@
package com.fr.design.data.datapane.connect;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.BaseUtils;
import com.fr.base.svg.IconUtils;
import com.fr.data.core.db.TableProcedure;
@ -23,9 +26,11 @@ import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;
import javax.swing.UIManager;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -34,6 +39,9 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 数据集编辑面板左边的部分
*
@ -62,7 +70,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
}
private void init(SwitchableTableDataPane parent) {
this.setLayout(new BorderLayout(4, 4));
this.setLayout(new BorderLayout(4, 10));
// 初始化数据连接下拉框
initConnectionComboBox(parent);
// 初始化中间的面板
@ -75,6 +83,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
private JPanel initCenterPane() {
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane.setLayout(new BorderLayout(0, 5));
// 搜索面板
centerPane.add(createSearchPane(), BorderLayout.NORTH);
// 数据库表视图面板
@ -144,8 +153,9 @@ public class ConnectionTableProcedurePane extends BasicPane {
}
});
UIScrollPane tableViewListPane = new UIScrollPane(tableViewList);
tableViewListPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
tableViewListPane.setBorder(new UIRoundedBorder(UIManager.getColor("defaultBorderColor"), 1, UIConstants.ARC));
JPanel tableViewBorderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
tableViewBorderPane.setLayout(new BorderLayout(0, 5));
tableViewBorderPane.add(tableViewListPane, BorderLayout.CENTER);
JPanel checkBoxgroupPane = createCheckBoxgroupPane();
if (checkBoxgroupPane != null) {
@ -160,32 +170,15 @@ public class ConnectionTableProcedurePane extends BasicPane {
*/
private JPanel createSearchPane() {
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel searchPane = new JPanel(new BorderLayout(10, 0));
searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR));
// searchPane.setBackground(Color.WHITE);
searchField = new UITextField();
searchField.setBorderPainted(false);
searchField.setPlaceholder(Toolkit.i18nText("Fine-Design_Basic_Table_Search"));
searchField.getDocument().addDocumentListener(searchListener);
searchField.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
super.mouseEntered(e);
searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.CHECKBOX_HOVER_SELECTED));
}
@Override
public void mouseExited(MouseEvent e) {
super.mouseExited(e);
searchPane.setBorder(BorderFactory.createLineBorder(UIConstants.TOOLBAR_BORDER_COLOR));
}
});
// 搜索图标
UILabel searchLabel = new UILabel(IconUtils.readIcon("/com/fr/design/images/data/search"));
searchLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
searchPane.add(searchField, BorderLayout.CENTER);
searchPane.add(searchLabel, BorderLayout.EAST);
panel.add(searchPane, BorderLayout.CENTER);
searchLabel.setBorder(BorderFactory.createEmptyBorder(0, 3, 0, 3));
searchField.setBorder(null);
panel.add(row(cell(searchLabel), cell(searchField).weight(1)).with(it -> it.setBorder(new FineRoundBorder())).getComponent());
panel.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
return panel;
}
@ -199,6 +192,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
protected JPanel createCheckBoxgroupPane() {
JPanel checkBoxgroupPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
checkBoxgroupPane.setLayout(new BorderLayout(20, 0));
JPanel first = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
tableCheckBox = new UICheckBox();
tableCheckBox.setSelected(true);
@ -214,19 +208,19 @@ public class ConnectionTableProcedurePane extends BasicPane {
// 根据环境是否为中文设置不同的显示
if (GeneralContext.isChineseEnv()) {
first.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_Table"),
BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING));
new LazyIcon("tables"), UILabel.LEADING));
second.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_View"),
BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING));
new LazyIcon("views"), UILabel.LEADING));
} else {
UILabel ui1 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/tables.png"), UILabel.LEADING);
UILabel ui2 = new UILabel(BaseUtils.readIcon("/com/fr/design/images/data/views.png"), UILabel.LEADING);
UILabel ui1 = new UILabel(new LazyIcon("tables"), UILabel.LEADING);
UILabel ui2 = new UILabel(new LazyIcon("views"), UILabel.LEADING);
ui1.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_Table"));
ui2.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_SQL_View"));
first.add(ui1);
second.add(ui2);
}
checkBoxgroupPane.add(first);
checkBoxgroupPane.add(second);
checkBoxgroupPane.add(first, BorderLayout.WEST);
checkBoxgroupPane.add(second, BorderLayout.CENTER);
return checkBoxgroupPane;
}

13
designer-base/src/main/java/com/fr/design/data/datapane/connect/ItemEditableComboBoxPanel.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane.connect;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.UIComboBox;
@ -7,7 +8,9 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.log.FineLoggerFactory;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.util.Iterator;
import java.util.concurrent.CancellationException;
@ -45,17 +48,21 @@ public abstract class ItemEditableComboBoxPanel extends JPanel {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
Dimension buttonSize = new Dimension(26, 20);
Dimension buttonSize = new Dimension(24, 24);
itemComboBox = new UIComboBox();
itemComboBox.setEnabled(true);
this.add(itemComboBox, BorderLayout.CENTER);
refreshButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
JPanel jPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 4 ,4);
refreshButton = new UIButton(new LazyIcon("refresh"));
JPanel jPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 0 ,4);
editButton = initEditButton(editButton, buttonSize);
editButton.setBorder(null);
editButton.setBackground(new Color(246, 248, 250, 255));
jPanel.add(editButton);
jPanel.add(refreshButton);
this.add(jPanel, BorderLayout.EAST);
refreshButton.setPreferredSize(buttonSize);
refreshButton.setBorder(null);
refreshButton.setBackground(new Color(246, 248, 250, 255));
refreshButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
refreshItems();

5
designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane.preview.sql;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.Parameter;
import com.fr.base.ParameterHelper;
import com.fr.base.ParameterMapNameSpace;
@ -117,8 +118,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
}
imagePanel.add(imageLabel);
topPanel.add(imagePanel, BorderLayout.WEST);
topPanel.add(messagePanel, BorderLayout.CENTER);
topPanel.add(messagePanel, BorderLayout.WEST);
topPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
//中间的SQL面板
@ -141,6 +141,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
}
scrollPane.setViewportView(checkArea);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
checkArea.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
centerPanel.add(scrollPane);
//底部的按钮面板

54
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.Parameter;
import com.fr.base.ParameterHelper;
import com.fr.data.core.db.TableProcedure;
@ -71,6 +72,7 @@ import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JToolBar;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import java.awt.BorderLayout;
@ -93,7 +95,7 @@ import java.util.List;
*/
public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implements SwitchableTableDataPane {
private static final int BOTTOM = 6;
private static final int BOTTOM = 9;
private static final String PREVIEW_BUTTON = Toolkit.i18nText("Fine-Design_Basic_Preview");
private static final String REFRESH_BUTTON = Toolkit.i18nText("Fine-Design_Basic_Refresh");
private ConnectionTableProcedurePane connectionTableProcedurePane;
@ -162,7 +164,25 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
};
editorPane = new UITableEditorPane<>(model);
initConnectionTableProcedurePane();
this.sqlTextPane.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
barErrorTips.setVisible(false);
}
@Override
public void focusLost(FocusEvent e) {
if (DBTableDataPane.this.isPreviewOrRefreshButton(e)) {
DBTableDataPane.this.checkParameter();
}
}
});
}
private void initConnectionTableProcedurePane() {
this.connectionTableProcedurePane = new ConnectionTableProcedurePane(this) {
@Override
protected void filter(Connection connection, String conName, List<String> nameList) {
@ -172,7 +192,6 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
});
}
@Override
protected void addKeyMonitor() {
this.searchField.addKeyListener(new KeyListener() {
@ -196,6 +215,10 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
});
}
};
addConnectionTableProcedurePaneListener();
}
private void addConnectionTableProcedurePaneListener() {
this.connectionTableProcedurePane.addDoubleClickListener(new ConnectionTableProcedurePane.DoubleClickSelectedNodeOnTreeListener() {
@Override
public void actionPerformed(TableProcedure target) {
@ -210,35 +233,20 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
DBTableDataPane.this.sqlTextPane.requestFocus();
}
});
this.sqlTextPane.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
barErrorTips.setVisible(false);
}
@Override
public void focusLost(FocusEvent e) {
if (DBTableDataPane.this.isPreviewOrRefreshButton(e)) {
DBTableDataPane.this.checkParameter();
}
}
});
}
private void initMainSplitPane() {
Box box = new Box(BoxLayout.Y_AXIS);
JPanel northPane = new JPanel(new BorderLayout(4, 4));
JToolBar editToolBar = createToolBar();
editToolBar.setBorder(null);
northPane.add(editToolBar, BorderLayout.CENTER);
northPane.setBorder(BorderFactory.createEmptyBorder(0, 0, BOTTOM, 0));
RTextScrollPane sqlTextScrollPane = new RTextScrollPane(this.sqlTextPane);
sqlTextScrollPane.setLineNumbersEnabled(true);
sqlTextScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
sqlTextScrollPane.setBorder(new UIRoundedBorder(UIManager.getColor("defaultBorderColor"), 1, UIConstants.ARC));
sqlTextScrollPane.setPreferredSize(new Dimension(680, 600));
JPanel paraMeanPane = new JPanel(new BorderLayout());
@ -262,7 +270,6 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
this.connectionTableProcedurePane.setMaximumSize(new Dimension(500, 400));
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, this.connectionTableProcedurePane, sqlSplitPane);
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
mainSplitPane.setOneTouchExpandable(true);
contentPane.add(mainSplitPane, BorderLayout.CENTER);
}
@ -333,6 +340,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
this.barErrorTips.setVisible(false);
esdSettingsBtn = new UIButton(Toolkit.i18nText("Fine-Design_ESD_Strategy_Config"));
esdSettingsBtn.setPreferredSize(new Dimension(72, 24));
esdSettingsBtn.addActionListener(new ActionListener() {
@Override
@ -594,7 +602,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
public PreviewAction() {
setName(PREVIEW_BUTTON);
setMnemonic('P');
setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_file/preview.png"));
setSmallIcon(new LazyIcon("preview"));
}
@ -609,7 +617,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
public PreviewPerformedSQLAction() {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview_Performed_Sql"));
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_file/preview_sql.png"));
this.setSmallIcon(new LazyIcon("preview_sql"));
}
@Override
@ -623,7 +631,7 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
public EditPageQueryAction() {
this.setName(Toolkit.i18nText("Fine-Design_Basic_Layer_Page_Report_Page_Query"));
this.setMnemonic('L');
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/m_file/text.png"));
this.setSmallIcon(new LazyIcon("text"));
}
@Override

19
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ProcedureDataPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.BaseUtils;
import com.fr.base.StoreProcedureParameter;
import com.fr.data.core.db.TableProcedure;
@ -42,6 +43,7 @@ import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JToolBar;
import javax.swing.SwingWorker;
import javax.swing.UIManager;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Dimension;
@ -89,13 +91,15 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
queryText = new UILabel(StringUtils.EMPTY);
Box box = new Box(BoxLayout.Y_AXIS);
JPanel northpane = new JPanel(new BorderLayout(4, 4));
northpane.add(creatToolBar(), BorderLayout.CENTER);
JToolBar editToolBar = creatToolBar();
editToolBar.setBorder(null);
northpane.add(editToolBar, BorderLayout.NORTH);
northpane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0));
storeProcedureContext = new SQLEditPane(SQLEditPane.UNREQUEST_DROPTARGET);
storeProcedureContext.setEditable(false);
UIScrollPane storeProcedureContextPane = new UIScrollPane(storeProcedureContext);
storeProcedureContextPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
storeProcedureContextPane.setBorder(new UIRoundedBorder(UIManager.getColor("defaultBorderColor"), 1, UIConstants.ARC));
storeProcedureContextPane.setPreferredSize(new Dimension(680, 600));
JPanel namePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
@ -122,11 +126,11 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
// 左边的Panel,上面是选择DatabaseConnection的ComboBox,下面DatabaseConnection对应的Table
initconnectionTableProcedurePane();
this.setLayout(new BorderLayout(4, 4));
connectionTableProcedurePane.setMinimumSize(new Dimension(155, 500));
box.setMinimumSize(new Dimension(310, 400));
this.connectionTableProcedurePane.setMinimumSize(new Dimension(230, 400));
this.connectionTableProcedurePane.setMaximumSize(new Dimension(500, 400));
box.setMinimumSize(new Dimension(300, 400));
// 使用SplitPane
JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, connectionTableProcedurePane, sqlSplitPane);
mainSplitPane.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
mainSplitPane.setOneTouchExpandable(true);
this.add(mainSplitPane, BorderLayout.CENTER);
}
@ -167,6 +171,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
isShareCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Is_Share_DBTableData"));
maxPanel = new MaxMemRowCountPanel();
maxPanel.setBorder(null);
maxPanel.setBackground(null);
UIToolbar toolbar = ToolBarDef.createJToolBar();
toolBarDef.updateToolBar(toolbar);
toolbar.add(isShareCheckBox);
@ -376,7 +381,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
public PreviewAction(ProcedureDataPane procedureDataPane) {
this.setName(PREVIEW_BUTTON);
this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png"));
this.setSmallIcon(new LazyIcon("preview"));
this.procedureDataPane = procedureDataPane;
}
@ -391,7 +396,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
protected class RefreshAction extends UITableEditAction {
public RefreshAction() {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh"));
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png"));
this.setSmallIcon(new LazyIcon("refresh"));
}
@Override

44
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureParameterPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.tabledata.tabledatapane;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.StoreProcedureParameter;
import com.fr.data.impl.storeproc.StoreProcedureConstants;
@ -21,6 +22,11 @@ import java.awt.*;
import java.util.Date;
import java.util.HashMap;
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;
public class StoreProcedureParameterPane extends BasicPane {
@ -70,27 +76,25 @@ public class StoreProcedureParameterPane extends BasicPane {
schemaCombo = new UIComboBox();
initUIComboBox(schemaCombo, schemaName);
JPanel namePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
namePane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), BorderLayout.WEST);
nameField = new UITextField(10);
namePane.add(nameField, BorderLayout.CENTER);
namePane.add(new UILabel(" "), BorderLayout.EAST);
valuePane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_CellWrite_InsertRow_Default") + ":"), BorderLayout.WEST);
valuePane.add(valueEditPane, BorderLayout.CENTER);
valuePane.add(new UILabel(" "), BorderLayout.EAST);
Component[][] components = {{null},
{namePane},
{addPane("Fine-Design_Basic_Model", 1, schemaCombo)},
{valuePane},
{null}
};
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p, p};
double[] columnSize = {p};
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(
components, rowSize, columnSize, 20, 10);
this.add(centerPane, BorderLayout.CENTER);
this.add(FineUIUtils.wrapComponentWithTitle(column(
10,
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name"))).weight(0.07),
cell(nameField).weight(0.2),
flex(0.2)
),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model"))).weight(0.07),
cell(schemaCombo).weight(0.2),
flex(0.2)
),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_CellWrite_InsertRow_Default"))).weight(0.07),
cell(valueEditPane).weight(0.2),
flex(0.2)
)).getComponent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
}
private JPanel addPane(String s, int i, UIComboBox combo){

3
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/StoreProcedureTableModel.java

@ -35,7 +35,6 @@ public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedure
final StoreProcedureParameterPane pane = new StoreProcedureParameterPane();
pane.populate(spp);
pane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
BasicDialog stpEditDialog = pane.showWindow(DesignerContext.getDesignerFrame());
stpEditDialog.addDialogActionListener(new DialogActionAdapter() {
@ -89,7 +88,6 @@ public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedure
StoreProcedureParameter para = new StoreProcedureParameter();
final StoreProcedureParameterPane pane = new StoreProcedureParameterPane();
pane.populate(para);
pane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
BasicDialog stpEditDialog = pane.showWindow(DesignerContext.getDesignerFrame());
stpEditDialog.addDialogActionListener(new DialogActionAdapter() {
@ -111,7 +109,6 @@ public class StoreProcedureTableModel extends UITableModelAdapter<StoreProcedure
StoreProcedureParameter para = getSelectedValue();
final StoreProcedureParameterPane pane = new StoreProcedureParameterPane();
pane.populate(para);
pane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
BasicDialog stpEditDialog = pane.showWindow(DesignerContext.getDesignerFrame());
stpEditDialog.addDialogActionListener(new DialogActionAdapter() {

66
designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java

@ -1,5 +1,6 @@
package com.fr.design.formula;
import com.fr.base.svg.IconUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
import com.fr.design.dialog.BasicDialog;
@ -31,6 +32,11 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.row;
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.column;
public class FunctionManagerPane extends BasicPane {
private FunctionControlPane functionControlPane;
@ -94,7 +100,9 @@ public class FunctionManagerPane extends BasicPane {
@Override
public NameableCreator[] createNameableCreators() {
NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), FunctionDef.class,
NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"),
IconUtils.readIcon("com/fr/design/images/server/global_param.png"),
FunctionDef.class,
FunctionContentPane.class);
return new NameableCreator[]{funcDef};
}
@ -119,15 +127,10 @@ public class FunctionManagerPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0));
JPanel northPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(northPane, BorderLayout.NORTH);
JPanel reportletNamePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(25);
reportletNamePane.add(classNameTextField);
JPanel reportletNamePane = new JPanel(new BorderLayout());
classNameTextField = new UITextField();
UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));
reportletNamePane.add(browserButton);
browserButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
browserButton.addActionListener(evt -> {
final ClassNameSelectPane bPane = new ClassNameSelectPane();
bPane.setClassPath(classNameTextField.getText());
bPane.showWindow( (Dialog) SwingUtilities.getWindowAncestor(FunctionContentPane.this),
@ -136,31 +139,46 @@ public class FunctionManagerPane extends BasicPane {
classNameTextField.setText(bPane.getClassPath());
}
}).setVisible(true);
}
});
});
UIButton editorButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editorButton.setPreferredSize(new Dimension(editorButton.getPreferredSize().width, classNameTextField.getPreferredSize().height));
reportletNamePane.add(editorButton);
editorButton.addActionListener(createEditorButtonActionListener());
JPanel classNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
classNamePane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name") + ":"), BorderLayout.NORTH);
classNamePane.add(reportletNamePane, BorderLayout.CENTER);
northPane.add(classNamePane);
reportletNamePane.add(row(10,
cell(classNameTextField).weight(0.7),
cell(browserButton).weight(0.15),
cell(editorButton).weight(0.15)
).getComponent());
JPanel classNamePane = new JPanel(new BorderLayout());
classNamePane.add(column(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_DS_Class_Name"))),
cell(reportletNamePane)
).getComponent());
DescriptionTextArea descriptionArea = new DescriptionTextArea();
descriptionArea.setWrapStyleWord(true);
descriptionArea.setLineWrap(true);
northPane.add(descriptionArea);
descriptionArea.setForeground(Color.GRAY);
descriptionArea.setBorder(null);
northPane.add(column(10,
cell(classNamePane),
cell(descriptionArea)
).getComponent());
String path1 = getEscapePath(File.separator + ProjectConstants.WEBINF_NAME + File.separator + ProjectConstants.CLASSES_NAME);
String path2 = getEscapePath(WorkContext.getCurrent().getPath() + File.separator + ProjectConstants.CLASSES_NAME);
descriptionArea.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function_Description_Area_Text", path1, path2));
JPanel descriptionPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //Description Pane
this.add(descriptionPane, BorderLayout.SOUTH);
descriptionPane.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
descriptionPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Description") + ":"), BorderLayout.NORTH);
this.descriptionTextArea = new UITextArea(6, 24);
descriptionPane.add(new JScrollPane(this.descriptionTextArea), BorderLayout.CENTER);
JPanel descriptionPane = new JPanel(new BorderLayout()); //Description Pane
this.descriptionTextArea = new UITextArea();
descriptionPane.add(column(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Description"))),
cell(new JScrollPane(this.descriptionTextArea)).weight(0.9)
).getComponent());
this.add(column(10,
cell(northPane).weight(0.35),
cell(descriptionPane).weight(0.65)
).getComponent());
}
private String getEscapePath(String path) {

3
designer-base/src/main/java/com/fr/design/fun/impl/AbstractHyperlinkProvider.java

@ -1,5 +1,6 @@
package com.fr.design.fun.impl;
import com.fr.base.svg.IconUtils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.gui.controlpane.NameObjectCreator;
@ -25,7 +26,7 @@ public abstract class AbstractHyperlinkProvider extends AbstractProvider impleme
@Override
public NameableCreator createHyperlinkCreator() {
return new NameObjectCreator(text(), target(), appearance());
return new NameObjectCreator(text(), IconUtils.readIcon("com/fr/design/images/data/hyperlink.svg"), target(), appearance());
}
@Override

25
designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java

@ -7,7 +7,10 @@ import javax.swing.JPanel;
import com.fr.design.layout.FRGUIPaneFactory;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
/**
* @author kunsnat E-mail:kunsnat@gmail.com
@ -24,19 +27,17 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
JPanel pane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
this.add(pane, BorderLayout.NORTH);
JPanel colPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
colPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column") + ":"));
pane.add(colPane);
UILabel colLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column"));
initColSpinner();
colPane.add(columnSpinner);
JPanel rowPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
pane.add(rowPane);
rowPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row") + ":"));
UILabel rowLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Row"));
initRowSpinner();
rowPane.add(rowSpinner);
pane.add(column(10,
row(flex(0.005), cell(rowLabel).weight(0.195), cell(rowSpinner).weight(0.8)),
row(flex(0.005), cell(colLabel).weight(0.195), cell(columnSpinner).weight(0.8))
).getComponent());
this.addDocumentListener(d);
}

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

@ -3,6 +3,7 @@ package com.fr.design.gui.controlpane;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.FineJOptionPane;
@ -34,6 +35,7 @@ import javax.swing.event.ListSelectionListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
@ -368,19 +370,20 @@ public abstract class JListControlPane extends JControlPane implements ListContr
setLayout(new BorderLayout());
this.textLabel = new JLabel();
this.iconLabel = new JLabel();
this.textLabel.setBorder(new ScaledEmptyBorder(0, 4, 0, 0));
this.iconLabel.setBorder(new ScaledEmptyBorder(0, 4, 0, 0));
add(this.textLabel, BorderLayout.CENTER);
add(this.iconLabel, BorderLayout.WEST);
this.iconLabel.setBackground(FlatUIUtils.getUIColor("List.cellRender.background", Color.WHITE));
//iconLabel和textLabel的背景颜色不会被JList背景颜色覆盖,开发者自定义
this.textLabel.setOpaque(true);
this.iconLabel.setOpaque(true);
this.setBorder(FineBorderFactory.createUnderlineBorder(FlatUIUtils.getUIColor("defaultBorderColor", Color.GRAY)));
}
@Override
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
setPreferredSize(new Dimension(list.getWidth(), 24));
if (value instanceof ListModelElement) {
ListModelElement element = ((ListModelElement) value);
Nameable nameable = element.wrapper;

4
designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java

@ -51,7 +51,9 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
JScrollPane selectedItemScrollPane = new JScrollPane();
selectedItemScrollPane.setViewportView(northPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
this.add(selectedItemScrollPane, BorderLayout.CENTER);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.add(selectedItemScrollPane);
this.add(centerPane, BorderLayout.CENTER);
}
@Override

27
designer-base/src/main/java/com/fr/design/gui/frpane/ReportletParameterViewPane.java

@ -16,6 +16,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.stable.ArrayUtils;
import com.fr.stable.ParameterProvider;
import javax.swing.JPanel;
import javax.swing.event.TableModelListener;
import java.awt.*;
import java.util.List;
@ -41,15 +42,26 @@ public class ReportletParameterViewPane extends BasicPane {
public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType) {
this(actions, useParaType, ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType),
ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType));
ValueEditorPaneFactory.createVallueEditorPaneWithUseType(useParaType), null);
}
public ReportletParameterViewPane(int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) {
this(null, useParaType, valueEditorPane, valueRenderPane);
this(null, useParaType, valueEditorPane, valueRenderPane, null);
}
public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) {
this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane);
public ReportletParameterViewPane(int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane,
JPanel otherPane) {
this(null, useParaType, valueEditorPane, valueRenderPane, otherPane);
}
public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane,
ValueEditorPane valueRenderPane) {
this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane, null);
}
public ReportletParameterViewPane(UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane,
ValueEditorPane valueRenderPane, JPanel otherPane) {
this.initComponent(actions, useParaType, valueEditorPane, valueRenderPane, otherPane);
}
/**
@ -58,7 +70,8 @@ public class ReportletParameterViewPane extends BasicPane {
* @param actions Chart的热点链接actions
* @param useParaType 类型
*/
public void initComponent(final UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane) {
public void initComponent(final UITableEditAction[] actions, int useParaType, ValueEditorPane valueEditorPane, ValueEditorPane valueRenderPane,
JPanel otherPanel) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
if (useParaType != ParameterTableModel.NO_CHART_USE) {
@ -70,14 +83,14 @@ public class ReportletParameterViewPane extends BasicPane {
return (UITableEditAction[]) ArrayUtils.addAll(tableEditActions, actions);
}
};
editorPane = new UITableEditorPane<ParameterProvider>(model);
editorPane = new UITableEditorPane<ParameterProvider>(model, otherPanel);
} else {
editorPane = new UITableEditorPane<ParameterProvider>(new ParameterTableModel() {
@Override
public UITableEditAction[] createAction() {
return (UITableEditAction[]) ArrayUtils.addAll(super.createAction(), actions);
}
});
}, otherPanel);
}
this.add(editorPane, BorderLayout.CENTER);

7
designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java

@ -1,6 +1,7 @@
package com.fr.design.gui.ilist;
import com.fine.theme.icon.LazyIcon;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.BaseUtils;
import com.fr.data.core.DataCoreUtils;
import com.fr.data.core.db.TableProcedure;
@ -23,6 +24,7 @@ import javax.swing.Icon;
import javax.swing.JList;
import javax.swing.ListSelectionModel;
import javax.swing.SwingWorker;
import java.awt.Color;
import java.awt.Component;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DragGestureEvent;
@ -57,6 +59,7 @@ public class TableViewList extends UIList {
// this.setBackground(UIConstants.NORMAL_BACKGROUND);
this.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
this.setCellRenderer(new TableListCellRenderer());
this.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
new TableProcessorTreeDragSource(this, DnDConstants.ACTION_COPY);
this.addFocusListener(new FocusAdapter() {
@ -248,9 +251,9 @@ public class TableViewList extends UIList {
String type = tableProcedure == null ? null : tableProcedure.getType();
Icon icon = null;
if (ComparatorUtils.equals(type, TableProcedure.TABLE)) {
icon = BaseUtils.readIcon("/com/fr/design/images/data/tables.png");
icon = new LazyIcon("tables");
} else if (ComparatorUtils.equals(type, TableProcedure.VIEW)) {
icon = BaseUtils.readIcon("/com/fr/design/images/data/views.png");
icon = new LazyIcon("views");
} else {
icon = new LazyIcon("store_procedure");
}

2
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/ParameterTableModel.java

@ -241,7 +241,7 @@ public class ParameterTableModel extends UITableModelAdapter<ParameterProvider>
public ParameterValueRenderer(ValueEditorPane valueEditorPane) {
disableLable = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Paramete_Name"));
disableLable.setForeground(Color.pink);
disableLable.setHorizontalAlignment(SwingConstants.CENTER);
disableLable.setHorizontalAlignment(SwingConstants.LEFT);
editor = valueEditorPane;
}

5
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UIArrayTableModel.java

@ -3,6 +3,7 @@ package com.fr.design.gui.itableeditorpane;
import java.awt.event.ActionEvent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class UIArrayTableModel extends UITableModelAdapter<Object[]> implements ActionStyle {
@ -67,7 +68,9 @@ public class UIArrayTableModel extends UITableModelAdapter<Object[]> implements
@Override
public void actionPerformed(ActionEvent e) {
super.actionPerformed(e);
addRow(new Object[getColumnCount()]);
Object[] values = new Object[getColumnCount()];
Arrays.fill(values, "=");
addRow(values);
fireTableDataChanged();
}
}

37
designer-base/src/main/java/com/fr/design/gui/itableeditorpane/UITableEditorPane.java

@ -9,8 +9,12 @@ import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableCellRenderer;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.GridLayout;
import java.awt.Insets;
import java.util.List;
@ -37,6 +41,11 @@ public class UITableEditorPane<T> extends BasicPane {
this.initComponent(model.createAction());
}
public UITableEditorPane(UITableModelAdapter<T> model, JPanel panel) {
this.tableModel = model;
this.initComponent(model.createAction(), panel);
}
public UITableEditorPane(UITableModelAdapter<T> model, String s) {
leftLabelName = s;
this.tableModel = model;
@ -44,6 +53,11 @@ public class UITableEditorPane<T> extends BasicPane {
}
protected void initComponent(UITableEditAction[] action) {
this.initComponent(action, null);
}
protected void initComponent(UITableEditAction[] action, JPanel content) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = new JPanel(new BorderLayout(4, 4));
this.add(pane, BorderLayout.CENTER);
@ -57,10 +71,14 @@ public class UITableEditorPane<T> extends BasicPane {
initbuttonPane(action);
JPanel controlPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
controlPane.add(buttonPane, BorderLayout.EAST);
controlPane.add(l, BorderLayout.WEST);
controlPane.add(content == null ? l : content, BorderLayout.WEST);
pane.add(controlPane, BorderLayout.NORTH);
}
this.editTable.getTableHeader().setDefaultRenderer(new TableHeaderRenderer());
}
public UITableModelAdapter<T> getTableModel() {
return tableModel;
@ -169,4 +187,19 @@ public class UITableEditorPane<T> extends BasicPane {
editTable.getTableHeader().setResizingAllowed(resizingAllowed);
}
/**
* 设置 TableHeader 文字左对齐
*/
public static class TableHeaderRenderer extends DefaultTableCellRenderer {
public TableHeaderRenderer() {
setHorizontalAlignment(SwingConstants.LEFT);
}
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
setBorder(UIManager.getBorder("TableHeader.cellBorder"));
return this;
}
}
}

50
designer-base/src/main/java/com/fr/design/gui/itree/checkboxtree/CheckBoxTreeCellRenderer.java

@ -6,12 +6,14 @@
package com.fr.design.gui.itree.checkboxtree;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JTree;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
@ -54,12 +56,15 @@ public class CheckBoxTreeCellRenderer extends NullPanel implements TreeCellRende
public CheckBoxTreeCellRenderer(TreeCellRenderer renderer) {
if (noFocusBorder == null) {
noFocusBorder = new EmptyBorder(1, 1, 1, 1);
noFocusBorder = new ScaledEmptyBorder(1, 1, 1, 10);
}
_checkBox.setOpaque(false);
setBorder(noFocusBorder);
setLayout(FRGUIPaneFactory.createBorderLayout());
add(_checkBox, BorderLayout.BEFORE_LINE_BEGINS);
add(_checkBox, BorderLayout.WEST);
JPanel gapPanel = new JPanel();
gapPanel.setPreferredSize(new Dimension(4, 20));
add(gapPanel, BorderLayout.CENTER);
_actualTreeRenderer = renderer;
}
@ -76,19 +81,7 @@ public class CheckBoxTreeCellRenderer extends NullPanel implements TreeCellRende
setComponentOrientation(tree.getComponentOrientation());
TreePath path = tree.getPathForRow(row);
if (path != null && tree instanceof CheckBoxTree) {
CheckBoxTreeSelectionModel selectionModel = ((CheckBoxTree) tree).getCheckBoxTreeSelectionModel();
if (selectionModel != null) {
_checkBox.setEnabled(((CheckBoxTree) tree).isCheckBoxEnabled() && ((CheckBoxTree) tree).isCheckBoxEnabled(path));
if (selectionModel.isPathSelected(path, selectionModel.isDigIn())) {
_checkBox.setState(TristateCheckBox.SELECTED);
} else if (selectionModel.isDigIn() && selectionModel.isPartiallySelected(path)) {
_checkBox.setState(TristateCheckBox.DO_NOT_CARE);
} else {
_checkBox.setState(TristateCheckBox.NOT_SELECTED);
}
}
}
handleCheckBox(tree, path);
if (_actualTreeRenderer != null) {
JComponent treeCellRendererComponent = (JComponent) _actualTreeRenderer.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
@ -103,12 +96,37 @@ public class CheckBoxTreeCellRenderer extends NullPanel implements TreeCellRende
remove((Component) this._actualTreeRenderer);
add(treeCellRendererComponent);
add(treeCellRendererComponent, BorderLayout.EAST);
}
return this;
}
private void handleCheckBox(JTree tree, TreePath path) {
if (path == null || !(tree instanceof CheckBoxTree)) {
return;
}
CheckBoxTree checkBoxTree = (CheckBoxTree) tree;
CheckBoxTreeSelectionModel selectionModel = checkBoxTree.getCheckBoxTreeSelectionModel();
if (selectionModel == null) {
return;
}
setCheckBoxState(path, selectionModel, checkBoxTree);
}
private void setCheckBoxState(TreePath path, CheckBoxTreeSelectionModel selectionModel, CheckBoxTree checkBoxTree) {
_checkBox.setEnabled(checkBoxTree.isCheckBoxEnabled() && checkBoxTree.isCheckBoxEnabled(path));
if (selectionModel.isPathSelected(path, selectionModel.isDigIn())) {
_checkBox.setState(TristateCheckBox.SELECTED);
} else if (selectionModel.isDigIn() && selectionModel.isPartiallySelected(path)) {
_checkBox.setState(TristateCheckBox.DO_NOT_CARE);
} else {
_checkBox.setState(TristateCheckBox.NOT_SELECTED);
}
}
public String getToolTipText(MouseEvent event) {
if (_actualTreeRenderer instanceof JComponent) {
Point p = event.getPoint();

1
designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java

@ -75,7 +75,6 @@ public class FollowingThemePane extends BasicPane implements UIObserver {
JPanel followingThemePane =
TableLayoutHelper.createGapTableLayoutPane( new Component[][]{new Component[] { followingThemeLabel, FRGUIPaneFactory.createBorderLayoutNorthPaneWithComponent(followingThemeButtonGroup)}},
new double[] { p }, new double[] { SETTING_LABEL_WIDTH, f }, 10, 0);
followingThemePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
followingThemePane.setVisible(false);
add(followingThemePane, BorderLayout.NORTH);

79
designer-base/src/main/java/com/fr/design/hyperlink/AbstractHyperNorthPane.java

@ -4,6 +4,7 @@ import com.fr.base.Utils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.js.Hyperlink;
@ -17,6 +18,12 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.fix;
public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicBeanPane<T> {
public static final int NEW_WINDOW = 0;
public static final int DIALOG = 1;
@ -31,11 +38,11 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
/**
* 对话框高度输入框
*/
private UINumberField heightTextFiled;
private UISpinner heightTextFiled;
/**
* 对话框宽度输入框
*/
private UINumberField widthTextFiled;
private UISpinner widthTextFiled;
public AbstractHyperNorthPane() {
@ -46,8 +53,7 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel headerPane = this.setHeaderPanel();
this.add(headerPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
targetFrameComboBox = new UIComboBox(getTargetFrames());
targetFrameComboBox.setRenderer(new DefaultListCellRenderer() {
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
@ -55,38 +61,37 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
return this;
}
});
JPanel targetFramePanel = new JPanel();
targetFramePanel.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In")));
targetFramePanel.add(targetFrameComboBox);
UILabel targetFrameLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In"));
targetFrameComboBox.setEditable(true);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20));
final JPanel newWindowConfPane = new JPanel();
newWindowConfPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height") + ": "));
heightTextFiled = new UINumberField();
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE));
heightTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(heightTextFiled);
newWindowConfPane.add(new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ": "));
widthTextFiled = new UINumberField();
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE));
widthTextFiled.setPreferredSize(new Dimension(40, 20));
newWindowConfPane.add(widthTextFiled);
final JPanel newWindowConfPane = new JPanel(new BorderLayout());
UILabel heightLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height"));
heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE);
UILabel widthLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width"));
widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE);
newWindowConfPane.add(column(10,
row(cell(heightLabel).weight(0.13), cell(heightTextFiled).weight(0.87)),
row(cell(widthLabel).weight(0.13), cell(widthTextFiled).weight(0.87))
).getComponent());
JPanel centerPanel = new JPanel(new BorderLayout());
centerPanel.add(targetFramePanel, BorderLayout.WEST);
centerPanel.add(newWindowConfPane, BorderLayout.EAST);
centerPanel.add(column(
10,
row(cell(targetFrameLabel).weight(0.13), cell(targetFrameComboBox).weight(0.87)),
cell(newWindowConfPane)
).getComponent());
newWindowConfPane.setVisible(false);
centerPane.add(centerPanel);
targetFrameComboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex());
}
});
targetFrameComboBox.addActionListener(e -> newWindowConfPane.setVisible(DIALOG == targetFrameComboBox.getSelectedIndex()));
this.add(this.setFootPanel(), BorderLayout.SOUTH);
this.add(column(
cell(headerPane),
cell(centerPane),
cell(this.setFootPanel())
).getComponent());
}
protected String[] getTargetFrames() {
@ -107,19 +112,19 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
this.targetFrameComboBox = targetFrameComboBox;
}
public UINumberField getHeightTextFiled() {
public UISpinner getHeightTextFiled() {
return heightTextFiled;
}
public void setHeightTextFiled(UINumberField heightTextFiled) {
public void setHeightTextFiled(UISpinner heightTextFiled) {
this.heightTextFiled = heightTextFiled;
}
public UINumberField getWidthTextFiled() {
public UISpinner getWidthTextFiled() {
return widthTextFiled;
}
public void setWidthTextFiled(UINumberField widthTextFiled) {
public void setWidthTextFiled(UISpinner widthTextFiled) {
this.widthTextFiled = widthTextFiled;
}
@ -127,8 +132,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
public void populateBean(T link) {
String name = link.getTargetFrame();
targetFrameComboBox.setSelectedIndex(HyperlinkTargetFrame.convert(name));
heightTextFiled.setText(String.valueOf(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight()));
widthTextFiled.setText(String.valueOf(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth()));
heightTextFiled.setValue(link.getHeight() == 0 ? DEFAULT_H_VALUE : link.getHeight());
widthTextFiled.setValue(link.getWidth() == 0 ? DEFAULT_V_VALUE : link.getWidth());
populateSubHyperlinkBean(link);
}
@ -148,8 +153,8 @@ public abstract class AbstractHyperNorthPane<T extends Hyperlink> extends BasicB
public void updateBean(T link) {
updateSubHyperlinkBean(link);
link.setTargetFrame(HyperlinkTargetFrame.parse(targetFrameComboBox.getSelectedIndex()).getName());
link.setHeight(Utils.objectToNumber(heightTextFiled.getText(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getText(), false).intValue());
link.setHeight(Utils.objectToNumber(heightTextFiled.getValue(), false).intValue());
link.setWidth(Utils.objectToNumber(widthTextFiled.getValue(), false).intValue());
}
}

74
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java

@ -10,6 +10,7 @@ import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itree.filetree.ReportletPane;
@ -39,6 +40,10 @@ import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
/**
* 热点链接部分 上方 定义特征 样式 报表 等属性的界面.
*
@ -143,12 +148,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
JPanel reportletNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 路径输入框
reportPathTextField = new UITextField(20);
reportletNamePane.add(reportPathTextField, BorderLayout.CENTER);
// 选择路径按钮
browserButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20));
reportletNamePane.add(browserButton, BorderLayout.EAST);
browserButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
@ -165,6 +169,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
reportletDialog.setVisible(true);
}
});
reportletNamePane.add(row(10,
cell(reportPathTextField).weight(0.85),
cell(browserButton).weight(0.15)
).getComponent());
return reportletNamePane;
}
@ -274,19 +283,19 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
*/
@Override
protected JPanel setFootPanel() {
JPanel content = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
JPanel content = new JPanel(new BorderLayout());
// 参数传递方式下拉框
postComboBox = new UIComboBox(new String[]{"GET", "POST"});
postComboBox.setPreferredSize(new Dimension(60, 20));
postComboBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
content.add(postComboBox);
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
showParameterInterface.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
content.add(showParameterInterface);
content.add(row(10,
cell(postComboBox).weight(0.75),
cell(showParameterInterface).weight(0.25)
).getComponent());
return content;
}
@ -324,7 +333,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 是否有重命名属性
if (this.needRenamePane) {
itemNameTextField = new UITextField();
Component[] renameComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Name") + ":"), itemNameTextField};
Component[] renameComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Name")), itemNameTextField};
dialogComponents.add(renameComponents);
othersComponents.add(renameComponents);
}
@ -333,7 +342,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
private void initHeaderPanel(List<Component[]> dialogComponents, List<Component[]> othersComponents) {
//最上方位置的面板
JPanel headerPane = this.setHeaderPanel();
Component[] headerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet") + ":"), headerPane};
Component[] headerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet")), headerPane};
dialogComponents.add(headerComponents);
othersComponents.add(headerComponents);
}
@ -343,10 +352,9 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
UIComboBox targetFrameComboBox = new UIComboBox(getTargetFrames());
this.setTargetFrameComboBox(targetFrameComboBox);
targetFrameComboBox.setEditable(false);
targetFrameComboBox.setPreferredSize(new Dimension(100, 20));
JPanel targetFramePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
JPanel targetFramePanel = new JPanel(new BorderLayout());
targetFramePanel.add(targetFrameComboBox);
Component[] targetComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In") + ":"), targetFramePanel};
Component[] targetComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In")), targetFramePanel};
dialogComponents.add(targetComponents);
othersComponents.add(targetComponents);
}
@ -355,36 +363,26 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
// 对话框标题
titleFiled = new TinyFormulaPane();
titleFiled.getUITextField().setColumns(15);
final JPanel titlePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
final JPanel titlePanel = new JPanel(new BorderLayout());
titlePanel.add(titleFiled);
Component[] titleComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Title") + ":"), titlePanel};
Component[] titleComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Title")), titlePanel};
dialogComponents.add(titleComponents);
}
private void initDialogSizePanel(List<Component[]> dialogComponents) {// 对话框大小
final JPanel sizeJPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height") + ":");
heightLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
sizeJPanel.add(heightLabel);
UINumberField heightTextFiled = new UINumberField();
heightTextFiled.setMinValue(0);
heightTextFiled.canFillNegativeNumber(false);
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE));
heightTextFiled.setPreferredSize(new Dimension(40, 20));
sizeJPanel.add(heightTextFiled);
final JPanel sizePane = new JPanel(new BorderLayout());
UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height"));
UISpinner heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE);
this.setHeightTextFiled(heightTextFiled);
UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ":");
widthLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
sizeJPanel.add(widthLabel);
UINumberField widthTextFiled = new UINumberField();
widthTextFiled.setMinValue(0);
widthTextFiled.canFillNegativeNumber(false);
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE));
widthTextFiled.setPreferredSize(new Dimension(40, 20));
sizeJPanel.add(widthTextFiled);
UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width"));
UISpinner widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE);
this.setWidthTextFiled(widthTextFiled);
sizeJPanel.setVisible(true);
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size") + ":"), sizeJPanel});
sizePane.add(column(8,
row(10, cell(heightLabel).weight(0.15), cell(heightTextFiled).weight(0.85)),
row(10, cell(widthLabel).weight(0.15), cell(widthTextFiled).weight(0.85))
).getComponent());
sizePane.setVisible(true);
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size")), sizePane});
}
private void initDialogLocationPanel(List<Component[]> dialogComponents) {
@ -408,13 +406,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
leftLabel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 10));
leftLocation = new UINumberField();
leftLocation.setMinValue(0);
leftLocation.setPreferredSize(new Dimension(40, 20));
// 位置 距上
final UILabel topLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Position_Top"));
topLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
topLocation = new UINumberField();
topLocation.setMinValue(0);
topLocation.setPreferredSize(new Dimension(40, 20));
locationPanel.add(leftLabel);
locationPanel.add(leftLocation);
@ -439,13 +435,13 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
center.addChangeListener(actionListener);
custom.addChangeListener(actionListener);
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Show_Position") + ":"), locationPanel});
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Show_Position")), locationPanel});
}
private void initFooterPanel(List<Component[]> dialogComponents, List<Component[]> othersComponents) {
// 最下方的配置面板
// 参数传递方式
Component[] footerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Reportlet_Parameter_Type") + ":"), this.setFootPanel()};
Component[] footerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Reportlet_Parameter_Type")), this.setFootPanel()};
dialogComponents.add(footerComponents);
othersComponents.add(footerComponents);
}

23
designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java

@ -17,12 +17,14 @@ import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import javax.swing.JOptionPane;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JPanel;
import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyperlink> {
/**
* 超链配置面板
@ -47,23 +49,26 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
this.setLayout(FRGUIPaneFactory.createBorderLayout());
northPane = new ReportletHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
JPanel extendPane = new JPanel();
extendPane.add(extendParametersCheckBox);
parameterViewPane = new ReportletParameterViewPane(
new UITableEditAction[]{
new HyperlinkParametersAction()
},
getChartParaType(),
getValueEditorPane(),
getValueEditorPane()
getValueEditorPane(),
extendPane
);
this.add(parameterViewPane, BorderLayout.CENTER);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameter"), null));
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
this.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, FlowLayout.LEFT), BorderLayout.SOUTH);
this.add(column(
cell(northPane),
cell(parameterViewPane).weight(1.0)
).getComponent());
}
@Override

24
designer-base/src/main/java/com/fr/design/hyperlink/WebHyperNorthPane.java

@ -3,6 +3,7 @@ package com.fr.design.hyperlink;
import com.fr.config.ServerPreferenceConfig;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
@ -13,7 +14,10 @@ import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import static com.fine.swing.ui.layout.Layouts.row;
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.fix;
/**
* chart 网页链接 定义属性 target url 特征的 界面
@ -45,20 +49,26 @@ public class WebHyperNorthPane extends AbstractHyperNorthPane<WebHyperlink> {
@Override
protected JPanel setHeaderPanel() {
JPanel headerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel headerPane = new JPanel(new BorderLayout());
urlTextField = new UITextField(headerPane.getWidth());
urlTextField = new UITextField();
urlTextField.setText(ProductConstants.WEBSITE_URL);
JPanel urlWithHelp = GUICoreUtils.createNamedPane(urlTextField, "URL:");
UILabel urlLabel = new UILabel("URL");
JPanel urlWithHelp = new JPanel(new BorderLayout());
urlWithHelp.add(row(
flex(0.018),
cell(urlLabel).weight(0.125),
cell(urlTextField).weight(0.85),
flex(0.015)
).getComponent());
if (this.needRenamePane) {
headerPane.setLayout(new BorderLayout(LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_SMALL));
itemNameTextField = new UITextField();
headerPane.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), BorderLayout.NORTH);
headerPane.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name")), BorderLayout.NORTH);
headerPane.add(urlWithHelp, BorderLayout.CENTER);
} else {
headerPane.add(urlWithHelp, BorderLayout.NORTH);
headerPane.add(urlWithHelp);
}
return headerPane;

23
designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java

@ -11,12 +11,14 @@ import com.fr.js.WebHyperlink;
import com.fr.stable.ParameterProvider;
import javax.swing.BorderFactory;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import javax.swing.JPanel;
import java.util.HashMap;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
private static final int BORDER_WIDTH = 4;
private WebHyperNorthPane northPane;
@ -38,14 +40,17 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
this.setBorder(BorderFactory.createEmptyBorder(BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH, BORDER_WIDTH));
northPane = new WebHyperNorthPane(needRenamePane());
this.add(northPane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
this.add(parameterViewPane, BorderLayout.CENTER);
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
JPanel extendPane = new JPanel();
extendPane.add(extendParametersCheckBox);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(),
getValueEditorPane(), extendPane);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null));
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
this.add(GUICoreUtils.createFlowPane(new Component[]{extendParametersCheckBox}, FlowLayout.LEFT), BorderLayout.SOUTH);
this.add(column(
cell(northPane),
cell(parameterViewPane).weight(1.0)
).getComponent());
}
@Override

73
designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java

@ -1,5 +1,6 @@
package com.fr.design.hyperlink.popup;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
@ -10,6 +11,7 @@ import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itableeditorpane.UITableEditAction;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.itree.filetree.ReportletPane;
@ -31,6 +33,10 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperlink> {
private JPanel popupTargetPane;
private UIRadioButton templatePopupButton;
@ -47,7 +53,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
public ContentSettingPane() {
super();
this.initCompoennt();
this.initComponent();
}
public void addTargetRadioActionListener(ActionListener listener) {
@ -64,10 +70,8 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
}
private void initCompoennt() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
this.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Content")));
private void initComponent() {
this.setLayout(new BorderLayout(10, 10));
popupTargetPane = this.createPopupTargetPane();
this.add(popupTargetPane, BorderLayout.NORTH);
@ -87,10 +91,17 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
popupTargetButtons.add(textPopupButton);
JPanel popupButtonsPanel = new JPanel();
popupButtonsPanel.setLayout( new FlowLayout(FlowLayout.LEFT, 10, 0));
popupButtonsPanel.setLayout(new BorderLayout());
popupButtonsPanel.add(templatePopupButton);
popupButtonsPanel.add(textPopupButton);
return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Target"), popupButtonsPanel);
UILabel popupLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Target"));
popupButtonsPanel.add(row(40,
cell(popupLabel),
row(20, cell(templatePopupButton),
cell(textPopupButton))
).getComponent());
return popupButtonsPanel;
}
private ActionListener radioActionListener = new ActionListener() {
@ -111,15 +122,15 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
private JPanel createTemplateContentPane() {
JPanel templateContentPane = new JPanel();
templateContentPane.setLayout(new BorderLayout(0,8));
templateContentPane.add(this.createTemplateSelectPanel(), BorderLayout.NORTH);
parameterViewPane = this.createReportletParameterViewPane();
templateContentPane.add(parameterViewPane, BorderLayout.CENTER);
extendParametersCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Extends_Report_Parameters"));
templateContentPane.add(GUICoreUtils.createFlowPane(extendParametersCheckBox, FlowLayout.LEFT), BorderLayout.SOUTH);
JPanel extendPane = new JPanel();
extendPane.add(extendParametersCheckBox);
parameterViewPane = this.createReportletParameterViewPane(extendPane);
templateContentPane.add(column(10,
cell(this.createTemplateSelectPanel()),
cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Parameter")))
).getComponent());
return templateContentPane;
}
@ -127,12 +138,10 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
JPanel templatePanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 路径输入框
templatePathTextField = new UITextField(20);
templatePanel.add(templatePathTextField, BorderLayout.CENTER);
// 选择路径按钮
UIButton templateSelectButton = new UIButton(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Select"));
templateSelectButton.setPreferredSize(new Dimension(templateSelectButton.getPreferredSize().width, 20));
templatePanel.add(templateSelectButton, BorderLayout.EAST);
templateSelectButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent evt) {
@ -149,19 +158,26 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
reportletDialog.setVisible(true);
}
});
return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Template"), templatePanel);
UILabel templateLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Template"));
templatePanel.add(row(40,
cell(templateLabel),
row(
cell(templatePathTextField),
cell(templateSelectButton))
).getComponent());
return templatePanel;
}
private ReportletParameterViewPane createReportletParameterViewPane() {
private ReportletParameterViewPane createReportletParameterViewPane(JPanel extendPane) {
ReportletParameterViewPane templateParameterViewPane = new ReportletParameterViewPane(
new UITableEditAction[]{
new HyperlinkParametersAction()
},
getChartParaType(),
getValueEditorPane(),
getValueEditorPane()
getValueEditorPane(),
extendPane
);
templateParameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Parameter"), null));
templateParameterViewPane.setPreferredSize(new Dimension(this.getWidth(), 200));
return templateParameterViewPane;
}
@ -172,15 +188,16 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
textContentPane = new TinyFormulaPane();
textContentPane.getUITextField().setColumns(20);
textSettingPanel.add(
MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"), textContentPane),
BorderLayout.CENTER);
fontPane = new CustomFontPane();
textSettingPanel.add(
MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"), fontPane),
BorderLayout.SOUTH);
return MobilePopupUIUtils.createTitleSplitLineContentPane("", textSettingPanel);
textSettingPanel.add(column(10,
row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"))),
cell(textContentPane)),
row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"))),
cell(fontPane))
).getComponent());
return textSettingPanel;
}
private String getReportletName() {

20
designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java

@ -14,6 +14,9 @@ import javax.swing.*;
import java.awt.*;
import java.util.Vector;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
public class CustomFontPane extends JPanel {
private static final int MAX_FONT_SIZE = 100;
private static final Dimension BUTTON_SIZE = new Dimension(20, 18);
@ -43,19 +46,22 @@ public class CustomFontPane extends JPanel {
fontSizeComboBox.setEditable(true);
colorSelectPane = new UIColorButton();
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));
underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"));
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.svg"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.svg"));
underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.svg"));
this.setButtonsTips();
this.setButtonsSize(BUTTON_SIZE);
Component[] components_font = new Component[]{
fontSizeComboBox, colorSelectPane, bold, underline, italic
};
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(GUICoreUtils.createFlowPane(components_font, FlowLayout.LEFT, LayoutConstants.HGAP_SMALL));
buttonPane.add(row(10,
cell(fontSizeComboBox).weight(0.6),
cell(colorSelectPane).weight(0.1),
cell(bold).weight(0.1),
cell(italic).weight(0.1),
cell(underline).weight(0.1)
).getComponent());
this.setLayout(new BorderLayout(0,0));
this.add(buttonPane, BorderLayout.CENTER);

10
designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupPane.java

@ -1,5 +1,6 @@
package com.fr.design.hyperlink.popup;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.i18n.Toolkit;
@ -10,6 +11,9 @@ import java.awt.*;
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;
public class MobilePopupPane extends FurtherBasicBeanPane<MobilePopupHyperlink> {
private ContentSettingPane contentSettingPane;
private StyleSettingPane styleSettingPane;
@ -26,9 +30,11 @@ public class MobilePopupPane extends FurtherBasicBeanPane<MobilePopupHyperlink>
JPanel scrollContent = new JPanel();
scrollContent.setLayout(new BorderLayout(10, 10));
contentSettingPane = new ContentSettingPane();
scrollContent.add(contentSettingPane, BorderLayout.NORTH);
styleSettingPane = new StyleSettingPane();
scrollContent.add(styleSettingPane, BorderLayout.CENTER);
scrollContent.add(column(20,
cell(FineUIUtils.wrapComponentWithTitle(contentSettingPane, Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Content"))),
cell(FineUIUtils.wrapComponentWithTitle(styleSettingPane, Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style")))
).getComponent());
contentSettingPane.addTargetRadioActionListener(radioActionListener);

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

@ -55,7 +55,7 @@ public class MobilePopupRegularPane extends BasicPane {
radiosPane.add(customRadio);
radiosPane.add(autoRadio);
return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane);
return MobilePopupUIUtils.createLeftTileRightContentPanel(this.label, radiosPane, Color.GRAY);
}
private ActionListener radioActionListener = new ActionListener() {

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

@ -2,24 +2,42 @@ package com.fr.design.hyperlink.popup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.widget.UITitleSplitLine;
import sun.awt.windows.WComponentPeer;
import javax.swing.*;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
public class MobilePopupUIUtils {
static public int Line_Height = 20;
static public int SplitLineWidth = 520;
static public int Left_Title_width = 80;
static public JPanel createLeftTileRightContentPanel(String title, JComponent contentPanel) {
return createLeftTileRightContentPanel(title, contentPanel, null);
}
/**
* 创建子标题和组件行布局
* @param title 子标题
* @param contentPanel 组件
* @param color 子标题颜色默认黑色
* @return JPanel
*/
static public JPanel createLeftTileRightContentPanel(String title, JComponent contentPanel, Color color) {
JPanel jp = new JPanel();
jp.setBorder(BorderFactory.createEmptyBorder(0,0,0, 30));
jp.setLayout(new BorderLayout(10,0));
UILabel titleLabel = new UILabel(title + ":");
titleLabel.setPreferredSize(new Dimension(MobilePopupUIUtils.Left_Title_width, Line_Height));
titleLabel.setHorizontalAlignment(SwingConstants.RIGHT);
jp.add(titleLabel, BorderLayout.WEST);
jp.add(contentPanel, BorderLayout.CENTER);
jp.setLayout(new BorderLayout());
UILabel titleLabel = new UILabel(title);
if (color != null) {
titleLabel.setForeground(color);
}
titleLabel.setForeground(color);
jp.add(row(10,
cell(titleLabel),
cell(contentPanel)
).getComponent());
return jp;
}

89
designer-base/src/main/java/com/fr/design/hyperlink/popup/StyleSettingPane.java

@ -7,15 +7,18 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.js.MobilePopupHyperlink;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
private double maxNumber = 100;
private double maxBorderRadius = 24;
@ -40,65 +43,78 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
}
private void initComponent() {
this.setLayout(new BorderLayout(0, 10));
this.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style")));
this.setLayout(new BorderLayout());
typePane = this.createTypePane();
this.add(typePane, BorderLayout.NORTH);
stylePane = this.createStylePane();
this.add(stylePane, BorderLayout.CENTER);
this.add(column(10,
cell(typePane),
cell(stylePane)
).getComponent());
}
private JPanel createTypePane() {
JPanel typePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
popupTypeLabel = new UILabel("");
typePane.add(popupTypeLabel, BorderLayout.CENTER);
return MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"), typePane);
UILabel typeLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Type"));
typePane.add(row(40,
cell(typeLabel),
cell(popupTypeLabel)
).getComponent());
return typePane;
}
private JPanel createStylePane() {
JPanel stylePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
stylePane.add(this.createBorderSettingPane(), BorderLayout.NORTH);
stylePane.add(this.createBackgroundSettingPane(), BorderLayout.CENTER);
stylePane.add(this.createPopupSizePane(), BorderLayout.SOUTH);
stylePane.add(column(10,
cell(this.createBorderSettingPane()),
cell(this.createBackgroundSettingPane()),
cell(this.createPopupSizePane())
).getComponent());
return stylePane;
}
private JPanel createBorderSettingPane() {
JPanel borderPane = new JPanel();
VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 10);
layout.setAlignLeft(true);
borderPane.setLayout(layout);
borderPane.setLayout(new BorderLayout());
borderType = new LineComboBox(MobilePopupConstants.BORDER_LINE_STYLE_ARRAY);
borderType.setPreferredSize(new Dimension(115, 20));
borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType));
borderColor = new NewColorSelectBox(100);
borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor));
borderRadiusSpinner = new UISpinner(0, maxBorderRadius, 1, 20);
borderRadiusSpinner.setPreferredSize(new Dimension(120, 20));
borderPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner));
return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border"), borderPane);
UILabel borderLabel = new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Border"));
borderPane.add(row(40,
column(10,
cell(borderLabel).weight(0.3),
flex().weight(0.7)),
column(10,
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Line"), borderType, Color.GRAY)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), borderColor, Color.GRAY)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Radius"), borderRadiusSpinner, Color.GRAY)))
).getComponent());
return borderPane;
}
private JPanel createBackgroundSettingPane() {
JPanel bgPane = new JPanel();
VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 10);
layout.setAlignLeft(true);
bgPane.setLayout(layout);
bgPane.setLayout(new BorderLayout());
JPanel colorPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0,0));
bgColor = new NewColorSelectBox(100);
colorPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor));
bgPane.add(colorPane);
JPanel transparencyPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.numberDragPane = new UINumberDragPane(0,100);
this.numberDragPane.setPreferredSize(new Dimension(140, 20));
transparencyPane.add(numberDragPane, BorderLayout.CENTER);
transparencyPane.add(new UILabel(" %"), BorderLayout.EAST);
bgPane.add(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane));
return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background"), bgPane);
JLabel bgLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Background"));
bgPane.add(row(40,
column(10,
cell(bgLabel).weight(0.6),
flex().weight(0.4)),
column(10,
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Colors"), bgColor, Color.GRAY)),
cell(MobilePopupUIUtils.createLeftTileRightContentPanel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Opacity"), transparencyPane, Color.GRAY))
)
).getComponent());
return bgPane;
}
private JPanel createPopupSizePane() {
@ -107,10 +123,17 @@ public class StyleSettingPane extends BasicBeanPane<MobilePopupHyperlink> {
mobileRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Mobile_Rules"));
padRegularPane = new MobilePopupRegularPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Pad_Rules"));
sizePane.add(mobileRegularPane, BorderLayout.NORTH);
sizePane.add(padRegularPane, BorderLayout.CENTER);
return MobilePopupUIUtils.createTitleSplitLineContentPane(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size"), sizePane);
JLabel sizeLabel = new JLabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Size"));
sizePane.add(row(14,
column(10,
cell(sizeLabel).weight(0.16),
flex().weight(0.84)),
column(10,
cell(mobileRegularPane),
cell(padRegularPane)
)
).getComponent());
return sizePane;
}
@Override

51
designer-base/src/main/java/com/fr/design/javascript/EmailPane.java

@ -8,14 +8,25 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.js.EmailJavaScript;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import javax.swing.text.JTextComponent;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Color;
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;
public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
@ -37,12 +48,12 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10));
tipsPane1 = new UILabel();
tipsPane1.setHorizontalAlignment(SwingConstants.RIGHT);
tipsPane1.setForeground(Color.pink);
tipsPane1.setHorizontalAlignment(SwingConstants.LEFT);
tipsPane1.setForeground(Color.gray);
tipsPane2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Tips"));
UILabel mainTextLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Content") + ":");
mainTextLabel.setHorizontalAlignment(SwingConstants.RIGHT);
UILabel mainTextLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Content"));
mainTextLabel.setHorizontalAlignment(SwingConstants.LEFT);
mainTextLabel.setVerticalAlignment(SwingConstants.TOP);
JScrollPane scrollPane = new JScrollPane(mainTextEditor = new JTextArea());
scrollPane.setBorder(null);
@ -62,21 +73,23 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
double[] rowSize = { preferred, preferred, preferred, preferred, preferred, fill, preferred, preferred, preferred };
double[] columnSize = { preferred, fill};
showTplContent = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Email_Can_Preview_Report_Content"));
centerPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{
{new UILabel(), tipsPane1},
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_Mail_to"), maitoEditor = new UITextField()),
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_CC_To"), ccEditor = new UITextField()),
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Bcc"), bccEditor = new UITextField()),
createLinePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Subject"), titleEditor = new UITextField()),
{mainTextLabel, scrollPane},
{new UILabel(), showTplContent},
{new UILabel(), tipsPane2}},rowSize, columnSize, 8);
centerPane = new JPanel(new BorderLayout());
centerPane.add(column(10,
row(cell(tipsPane1), cell(new UILabel())),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_Mail_to"))).weight(0.1), flex(0.04), cell(maitoEditor = new UITextField()).weight(0.86)),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_HJS_CC_To"))).weight(0.1), flex(0.04), cell(ccEditor = new UITextField()).weight(0.86)),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Bcc"))).weight(0.1), flex(0.04), cell(bccEditor = new UITextField()).weight(0.86)),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Subject"))).weight(0.1), flex(0.04), cell(titleEditor = new UITextField()).weight(0.86)),
row(cell(mainTextLabel).weight(0.1), flex(0.04), cell(scrollPane).weight(0.86)).weight(1.0),
row(cell(new UILabel()).weight(0.1), flex(0.04), cell(showTplContent).weight(0.86)),
row(cell(new UILabel()).weight(0.14), cell(tipsPane2).weight(0.86))
).getComponent());
}
protected JComponent[] createLinePane(String string, JTextComponent textComp) {
UILabel label = new UILabel(string + ":");
label.setPreferredSize(new Dimension(70, label.getPreferredSize().height));
label.setHorizontalAlignment(SwingConstants.RIGHT);
UILabel label = new UILabel(string);
label.setHorizontalAlignment(SwingConstants.LEFT);
return new JComponent[] { label, textComp };
}

20
designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java

@ -26,6 +26,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.general.IOUtils;
import com.fr.js.JavaScriptImpl;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.KeyStroke;
import javax.swing.SwingConstants;
@ -40,6 +41,9 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
public class JSContentPane extends BasicPane {
protected RSyntaxTextArea contentTextArea;
private UILabel funNameLabel = new UILabel();
@ -47,7 +51,7 @@ public class JSContentPane extends BasicPane {
private static final Dimension FUNCTION_NAME_LABEL_SIZE = new Dimension(300, 80);
private String[] defaultArgs;
private int titleWidth = 180;
private JPanel labelPane = new JPanel(new BorderLayout(6, 4));;
private JPanel labelPane = new JPanel();
private NewJavaScriptImplPane newJavaScriptImplPane = null;
private JavaScriptImpl javaScript;
private JSImplUpdateAction jsImplUpdateAction;
@ -97,7 +101,6 @@ public class JSContentPane extends BasicPane {
private void addNewPaneLabel(){
UILabel advancedEditorLabel = new UILabel(Toolkit.i18nText("Fine-Design_Advanced_Editor"), IconUtils.readIcon("com/fr/design/images/edit/advancedEditor.svg"), SwingConstants.LEFT);
advancedEditorLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
advancedEditorLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
@ -183,15 +186,16 @@ public class JSContentPane extends BasicPane {
}.execute();
}
});
labelPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
labelPane.add(label,BorderLayout.CENTER);
JPanel jsParaPane = new JPanel(new BorderLayout(4, 4));
jsParaPane.setPreferredSize(new Dimension(300, 80));
JPanel jsParaPane = new JPanel(new BorderLayout());
UIScrollPane scrollPane = new UIScrollPane(funNameLabel);
scrollPane.setPreferredSize(FUNCTION_NAME_LABEL_SIZE);
scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC));
jsParaPane.add(scrollPane, BorderLayout.WEST);
jsParaPane.add(labelPane, BorderLayout.EAST);
jsParaPane.add(row(10,
cell(scrollPane).weight(0.6),
cell(labelPane).weight(0.4)
).getComponent());
return jsParaPane;
}

21
designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java

@ -25,11 +25,14 @@ import javax.swing.event.TableModelListener;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridLayout;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
private static final int BOTTOM_BORDER = 12;
private UITextField itemNameTextField;
@ -64,21 +67,23 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
protected void initComponents() {
parameterPane = createParameterViewPane();
importedJsPane = createImportedJsPane();
importedJsPane.setPreferredSize(new Dimension(265, 150));
jsPane = createJSContentPane(defaultArgs);
jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript")));
parameterPane.setPreferredSize(new Dimension(265, 150));
JPanel topPane = new JPanel(new GridLayout(1,2));
topPane.add(importedJsPane);
topPane.add(parameterPane);
JPanel topPane = new JPanel(new BorderLayout());
topPane.add(row(10,
cell(importedJsPane).weight(0.5),
cell(parameterPane).weight(0.5)
).getComponent());
topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, BOTTOM_BORDER, 0));
this.setLayout(new BorderLayout());
this.add(topPane, BorderLayout.NORTH);
this.add(jsPane, BorderLayout.CENTER);
this.add(column(10,
cell(topPane).weight(0.5),
cell(jsPane).weight(0.5)
).getComponent());
this.reLayoutForChart();
}

4
designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataTableEditor.java

@ -12,8 +12,8 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.editor.editor.Editor;
import com.fr.form.data.DataTableConfig;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

6
designer-base/src/main/java/com/fr/design/parameter/ParameterArrayPane.java

@ -2,6 +2,7 @@ package com.fr.design.parameter;
import com.fr.base.Parameter;
import com.fr.base.ParameterConfig;
import com.fr.base.svg.IconUtils;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.controlpane.NameableSelfCreator;
@ -57,7 +58,10 @@ public class ParameterArrayPane extends JListControlPane {
*/
public NameableCreator[] createNameableCreators() {
return new NameableCreator[]{
new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"), Parameter.class, ParameterPane.class) {
new NameableSelfCreator(Toolkit.i18nText("Fine-Design_Basic_Engine_Parameter_Name"),
"com/fr/design/images/server/global_param.png",
Parameter.class,
ParameterPane.class) {
public Parameter createNameable(UnrepeatedNameHelper helper) {
// 返回参数设置面板.
return new Parameter(helper.createUnrepeatedName(DEFAULT_PARAMETER_NAME_PREFIX));

25
designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java

@ -1,5 +1,7 @@
package com.fr.design.roleAuthority;
import com.fine.theme.icon.LazyIcon;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction;
@ -9,6 +11,7 @@ import com.fr.design.data.tabledata.Prepare4DataSourceChange;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
import com.fr.design.layout.FRGUIPaneFactory;
@ -40,6 +43,10 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Enumeration;
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;
/**
* 设计器左下角面板用于在权限编辑时存放角色
* Author : daisy
@ -80,17 +87,20 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
this.add(iniToolBarPane(), BorderLayout.NORTH);
refreshAction.setEnabled(true);
UIScrollPane scrollPane = new UIScrollPane(roleTree);
scrollPane.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 0));
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
initbuttonGroup();
JPanel jPanel = new JPanel(new BorderLayout(4, 4));
JPanel buttonPane = new JPanel(new GridLayout());
buttonPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.LINE_COLOR));
buttonPane.add(buttonGroup, BorderLayout.CENTER);
jPanel.add(buttonPane, BorderLayout.NORTH);
jPanel.add(scrollPane, BorderLayout.CENTER);
buttonGroup.setBorder(null);
buttonGroup.setOpaque(false);
jPanel.setOpaque(true);
jPanel.add(column(
4,
row(2, cell(new UILabel(new LazyIcon("digitalPlatform"))), cell(buttonGroup)),
cell(scrollPane)
).getComponent());
this.add(jPanel, BorderLayout.CENTER);
jPanel.setBorder(new ScaledEmptyBorder(0, 4, 4, 4));
registerDSChangeListener();
}
@ -197,7 +207,6 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
}
}
};
buttonGroup.setBorder(BorderFactory.createMatteBorder(1, LEFT_GAP, 0, 0, UIConstants.LINE_COLOR));
}
/**
@ -253,7 +262,7 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
public RefreshAction() {
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Refresh"));
this.setSmallIcon("/com/fr/design/images/buttonicon/refresh");
this.setSmallIcon(new LazyIcon("refresh"));
}
@Override

156
designer-base/src/main/java/com/fr/design/style/BorderPane.java

@ -3,25 +3,24 @@
*/
package com.fr.design.style;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseUtils;
import com.fr.base.CellBorderStyle;
import com.fr.base.GraphHelper;
import com.fr.base.Style;
import com.fr.design.border.UITitledBorder;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants;
import com.fr.stable.CoreConstants;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JPanel;
@ -29,10 +28,9 @@ import javax.swing.JToggleButton;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
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.event.ActionEvent;
@ -40,6 +38,11 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
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;
/**
* CellBorder Pane.
*/
@ -73,7 +76,6 @@ public class BorderPane extends BasicPane {
private LineComboBox currentLineCombo;
private NewColorSelectBox currentLineColorPane;
private UIButton insidebutton;
public BorderPane() {
@ -81,89 +83,57 @@ public class BorderPane extends BasicPane {
}
protected void initComponents() {
borderComponent = new BorderComponent();
topToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png"), BorderPane.TOP_BORDER);
horizontalToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png"), BorderPane.HORIZONTAL_BORDER);
bottomToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png"), BorderPane.BOTTOM_BORDER);
initBasicComponents();
JPanel borderAllControlPane = initButtonPanel();
JPanel borderLeftPane = column(flex(), cell(topToggleButton), cell(horizontalToggleButton), cell(bottomToggleButton), flex()).getComponent();
JPanel borderBottomPane = row(flex(), cell(leftToggleButton), cell(verticalToggleButton), cell(rightToggleButton), flex()).getComponent();
this.currentLineColorPane.setSelectObject(Color.BLUE);
Component northPane1 = initNorthPanel();
Component centerPane1 = FineUIUtils.wrapComponentWithTitle(row(5, cell(borderLeftPane),
column(5, row(flex(), cell(borderAllControlPane),flex()), cell(borderComponent).with(it -> it.setPreferredSize(new Dimension(600, 300))), cell(borderBottomPane))
).getComponent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"));
this.add(column(10, cell(northPane1), cell(centerPane1)).getComponent());
}
leftToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png"), BorderPane.LEFT_BORDER);
verticalToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png"), BorderPane.VERTICAL_BORDER);
rightToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/right.png"), BorderPane.RIGHT_BORDER);
private void initBasicComponents() {
borderComponent = new BorderComponent();
topToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/top.png"), BorderPane.TOP_BORDER, false);
horizontalToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/horizontal.png"), BorderPane.HORIZONTAL_BORDER, false);
bottomToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/bottom.png"), BorderPane.BOTTOM_BORDER, false);
leftToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/left.png"), BorderPane.LEFT_BORDER, true);
verticalToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/vertical.png"), BorderPane.VERTICAL_BORDER, true);
rightToggleButton = new ToggleButton(BaseUtils.readIcon("/com/fr/base/images/dialog/border/right.png"), BorderPane.RIGHT_BORDER, true);
this.currentLineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY);
this.currentLineColorPane = new NewColorSelectBox(100);
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane.setBorder(UITitledBorder.createBorderWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview")));
JPanel borderAllControlPane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane();
centerPane.add(borderAllControlPane, BorderLayout.NORTH);
borderAllControlPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 4, 0));
borderAllControlPane.add(new UILabel(" "));
// Button reseting borders
borderAllControlPane.add(createVerButtonPane(NO_BORDERS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No")));
// Button setting all borders to active with
// current color and current style excepting inside borders
borderAllControlPane.add(createVerButtonPane(EXTERNAL_BORDERS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_External")));
borderAllControlPane.add(createVerButtonPane(INSIDE_BORDERS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Inner")));
// Control
JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane.add(borderPane, BorderLayout.CENTER);
borderPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 4));
borderComponent.addBorderChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
fireStateChanged();
}
});
}
borderPane.add(borderComponent, BorderLayout.CENTER);
JPanel borderLeftPane = new JPanel();
JPanel borderCornerPane = new JPanel();
JPanel borderBottomPane = new JPanel();
borderPane.add(borderLeftPane, BorderLayout.WEST);
JPanel tmpBorderBottomPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
borderPane.add(tmpBorderBottomPane, BorderLayout.SOUTH);
tmpBorderBottomPane.add(borderBottomPane, BorderLayout.CENTER);
tmpBorderBottomPane.add(borderCornerPane, BorderLayout.WEST);
borderLeftPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.CENTER, 4, 16));
borderLeftPane.add(topToggleButton);
borderLeftPane.add(horizontalToggleButton);
borderLeftPane.add(bottomToggleButton);
borderBottomPane.setLayout(new /**/FlowLayout(FlowLayout.CENTER, 42, 5));
borderBottomPane.add(leftToggleButton);
borderBottomPane.add(verticalToggleButton);
borderBottomPane.add(rightToggleButton);
borderCornerPane.setPreferredSize(new Dimension(borderLeftPane.getPreferredSize().width, borderBottomPane.getPreferredSize().height));
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
northPane.setBorder(UITitledBorder.createBorderWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Line")));
JPanel rightTopPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
northPane.add(rightTopPane, BorderLayout.NORTH);
JPanel first = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
first.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style") + ":"));
first.add(this.currentLineCombo);
rightTopPane.add(first, BorderLayout.NORTH);
JPanel second = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
second.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Color") + ":"));
private JPanel initButtonPanel() {
UIButton button1 = createVerButtonPane(NO_BORDERS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_No"));
UIButton button2 = createVerButtonPane(EXTERNAL_BORDERS, "");
UIButton button3 = createVerButtonPane(INSIDE_BORDERS, "");
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.add(button1);
buttonGroup.add(button2);
buttonGroup.add(button3);
return row(cell(button1), cell(button2), cell(button3)).getComponent();
}
second.add(this.currentLineColorPane);
rightTopPane.add(second, BorderLayout.CENTER);
this.currentLineColorPane.setSelectObject(Color.BLACK);
this.add(northPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
private Component initNorthPanel() {
return FineUIUtils.wrapComponentWithTitle(column(
10, row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style"))).weight(0.1),
cell(this.currentLineCombo).weight(0.25),
flex(0.5)),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Color"))).weight(0.1),
cell(this.currentLineColorPane).weight(0.25),
flex(0.5))
).getComponent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Line"));
}
public void addChangeListener(ChangeListener changeListener) {
@ -186,15 +156,16 @@ public class BorderPane extends BasicPane {
}
}
private JPanel createVerButtonPane(int display, String text) {
private UIButton createVerButtonPane(int display, String text) {
JPanel verPane = new JPanel();
verPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.CENTER, 2, 2));
BorderButton button = new BorderButton(display);
if (StringUtils.isNotEmpty(text)) {
button.setText(text);
}
verPane.add(button);
verPane.add(new UILabel(text));
insidebutton = button;
return verPane;
return button;
}
private void refreshAllToggleButtons() {
@ -206,14 +177,6 @@ public class BorderPane extends BasicPane {
rightToggleButton.setSelected(this.cellBorderStyle.getRightStyle() != Constants.LINE_NONE);
}
public CellBorderStyle getCellBorderStyle() {
return this.cellBorderStyle;
}
public void setCellBorderStyle(CellBorderStyle cellBorderStyle) {
this.cellBorderStyle = cellBorderStyle;
}
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Border");
@ -282,11 +245,18 @@ public class BorderPane extends BasicPane {
private class ToggleButton extends JToggleButton implements ActionListener {
private int borderType = 0;
public ToggleButton(Icon icon, int borderType) {
/**
* 根据水平 或者 垂直布局设置控件大小
*/
public ToggleButton(Icon icon, int borderType, boolean horizontal) {
super(icon);
this.borderType = borderType;
this.setPreferredSize(new Dimension(32, 32));
if (horizontal) {
this.setPreferredSize(new Dimension(40, 24));
} else {
this.setPreferredSize(new Dimension(24, 40));
}
this.addActionListener(this);
}
@ -346,7 +316,7 @@ public class BorderPane extends BasicPane {
this.setIcon(BaseUtils.readIcon("com/fr/design/images/m_format/in.png"));
}
this.addActionListener(this);
setPreferredSize(new Dimension(32, 32));
setPreferredSize(new Dimension(36, 24));
setFocusPainted(false);
}

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

@ -3,34 +3,31 @@
*/
package com.fr.design.style;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.FRContext;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.DesignUtils;
import com.fr.general.DefaultValues;
import com.fr.general.FRFont;
import com.fr.stable.CoreConstants;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.event.EventListenerList;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
@ -38,17 +35,24 @@ import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
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.fix;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Pane to edit Font.
*/
public class FRFontPane extends BasicPane {
private FontFamilyPane familyPane;
private FontSizeStylePane fontSizeStylePane;
//foreground.
private ColorSelectBox foregroundColorPane;
private UIComboBox fontNameComboBox;
//underline
private LineComboBox underlineCombo;
@ -76,88 +80,37 @@ public class FRFontPane extends BasicPane {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
// 纵向布局 放置list 和 下划线 颜色
JPanel listVPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(listVPane, BorderLayout.NORTH);
JPanel listHPane =FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
listVPane.add(listHPane);
// 名字
familyPane = new FontFamilyPane();
listHPane.add(familyPane);
fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
this.fontNameComboBox.addActionListener(actionListener);
// 字形和大小
fontSizeStylePane = new FontSizeStylePane();
listHPane.add(fontSizeStylePane);
fontSizeStylePane.getStyleList().addListSelectionListener(listSelectionListener);
//Richie:直接输入FRFont的size.
fontSizeStylePane.getSizeField().getDocument().addDocumentListener(documentListener);
fontSizeStylePane.getSizeField().getDocument().addDocumentListener(new DocumentListener() {
public void changedUpdate(DocumentEvent e) {// 这是更改操作的处理
updatePreviewLabel();
}
public void insertUpdate(DocumentEvent e) {// 这是插入操作的处理
updatePreviewLabel();
}
public void removeUpdate(DocumentEvent e) {// 这是删除操作的处理
updatePreviewLabel();
}
});
fontSizeStylePane.getSizeList().addListSelectionListener(listSelectionListener);
// 下划线 和 颜色
JPanel listVBottomPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(2);
listVPane.add(listVBottomPane);
// underline pane
JPanel underlinePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
listVBottomPane.add(underlinePane);
underlinePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FRFont_Underline"), null));
this.underlineCombo = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY);
this.underlineCombo.addActionListener(actionListener);
underlinePane.add(this.underlineCombo, BorderLayout.CENTER);
// foreground
JPanel foregroundPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
listVBottomPane.add(foregroundPane);
foregroundPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Font_Foreground"),null));
foregroundColorPane = new ColorSelectBox(140);
foregroundColorPane.addSelectChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
fireStateChanged();
}
});
foregroundPane.add(foregroundColorPane, BorderLayout.WEST);
// center pane
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(centerPane, BorderLayout.CENTER);
centerPane.setLayout(FRGUIPaneFactory.createM_BorderLayout());
// other reportFont dialog
JPanel otherFontPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane.add(otherFontPane, BorderLayout.WEST);
// otherFontPane.setLayout(FRGUIPaneFactory.createBorderLayout());
initCheckbox();
// preview pane.
preview = new FRFontPreviewArea();
preview.setPreferredSize(FineUIScale.scale(new Dimension(640, 240)));
// effects pane
JPanel effectsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
otherFontPane.add(effectsPane, BorderLayout.CENTER);
// effectsPane.setLayout(FRGUIPaneFactory.createBorderLayout());
effectsPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Font_Effects"),null));
//peteter:这里主动从Context, 获得默认的FRFont的值.
DefaultValues defaultValues = FRContext.getDefaultValues();
populate(defaultValues.getFRFont());
JPanel effectsPane2 = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
effectsPane.add(effectsPane2, BorderLayout.NORTH);
addCenterPanel();
}
private void initCheckbox() {
isStrikethroughCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Font_Strikethrough") + " ");
isStrikethroughCheckBox.addChangeListener(changeListener);
isStrikethroughCheckBox.setMnemonic('K');
@ -170,23 +123,6 @@ public class FRFontPane extends BasicPane {
isSubscriptCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Font_Subscript"));
isSubscriptCheckBox.addChangeListener(changeListener);
isSubscriptCheckBox.setMnemonic('B');
effectsPane2.add(this.getLeftJustPane(isStrikethroughCheckBox));
effectsPane2.add(this.getLeftJustPane(isShadowCheckBox));
effectsPane2.add(this.getLeftJustPane(isSuperscriptCheckBox));
effectsPane2.add(this.getLeftJustPane(isSubscriptCheckBox));
// right pane
JPanel rightPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane.add(rightPane, BorderLayout.CENTER);
// rightPane.setLayout(FRGUIPaneFactory.createBorderLayout());
// preview pane.
preview = new FRFontPreviewArea();
preview.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview")));
rightPane.add(preview, BorderLayout.CENTER);
// Cannot select superscript and subscript in the same time.
this.isSuperscriptCheckBox.addChangeListener(changeListener);
this.isSuperscriptCheckBox.addChangeListener(new ChangeListener() {
@ -204,10 +140,34 @@ public class FRFontPane extends BasicPane {
}
}
});
}
//peteter:这里主动从Context, 获得默认的FRFont的值.
DefaultValues defaultValues = FRContext.getDefaultValues();
populate(defaultValues.getFRFont());
private void addCenterPanel() {
add(column(10,
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FRFont_Family"))).weight(0.1),
cell(fontNameComboBox).weight(0.2),
flex(0.4)
),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Font_Size"))).weight(0.1),
cell(fontSizeStylePane.fontComboBox).weight(0.25),
fix(5),
cell(fontSizeStylePane.fontSizeComboBox).weight(0.2),
flex(0.15)
),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FRFont_Underline"))).weight(0.1),
cell(underlineCombo).weight(0.2),
flex(0.4)
),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Font_Foreground"))).weight(0.1),
cell(foregroundColorPane).weight(0.2),
flex(0.4)
),
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Font_Effects"))).weight(0.1),
row(cell(this.isStrikethroughCheckBox), fix(5), cell(this.isShadowCheckBox), fix(5),
cell(this.isSuperscriptCheckBox), fix(5), cell(this.isSubscriptCheckBox), flex()).weight(0.6)
),
column(5, cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"))), cell(preview))
).getComponent());
}
public void addChangeListener(ChangeListener changeListener) {
@ -242,37 +202,6 @@ public class FRFontPane extends BasicPane {
}
};
ListSelectionListener listSelectionListener = new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
fireStateChanged();
}
};
DocumentListener documentListener = new DocumentListener() {
public void changedUpdate(DocumentEvent e) {
fireStateChanged();
}
public void insertUpdate(DocumentEvent e) {
fireStateChanged();
}
public void removeUpdate(DocumentEvent e) {
fireStateChanged();
}
};
//use the method to make all checkbox donot margin == 0.
private JPanel getLeftJustPane(JComponent comp) {
JPanel leftJustPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// leftJustPane.setLayout(FRGUIPaneFactory.createBorderLayout());
leftJustPane.add(comp, BorderLayout.CENTER);
leftJustPane.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0));
return leftJustPane;
}
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Sytle_FRFont");
@ -282,9 +211,24 @@ public class FRFontPane extends BasicPane {
* Use font to populate pane.
*/
public void populate(FRFont frFont) {
familyPane.populate(frFont);
fontSizeStylePane.populate(frFont);
this.fontNameComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
updatePreviewLabel();
}
});
this.fontSizeStylePane.fontComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
updatePreviewLabel();
}
});
this.fontSizeStylePane.fontSizeComboBox.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
updatePreviewLabel();
}
});
//foreground.
this.foregroundColorPane.setSelectObject(frFont.getForeground());
@ -297,12 +241,6 @@ public class FRFontPane extends BasicPane {
this.isSuperscriptCheckBox.setSelected(frFont.isSuperscript());
this.isSubscriptCheckBox.setSelected(frFont.isSubscript());
//添加ListHandler.
ListHandler listHandler = new ListHandler();
familyPane.addListSelectionListener(listHandler);
fontSizeStylePane.getStyleList().addListSelectionListener(listHandler);
fontSizeStylePane.getSizeList().addListSelectionListener(listHandler);
//actionlistner
ActionListener updatePreviewActionListener = new ActionListener() {
@ -336,13 +274,13 @@ public class FRFontPane extends BasicPane {
* Update pane to get new font.
*/
public FRFont update() {
double fs = fontSizeStylePane.getSizeField().getValue();
double fs = (double)((int)fontSizeStylePane.fontSizeComboBox.getSelectedItem());
if (!(fs + "").endsWith(".5")) {
fs = (int)fs;
}
return FRFont.getInstance(this.familyPane.getText(),
this.fontSizeStylePane.getStyleList().getSelectedIndex(),
(float)fs,
return FRFont.getInstance((String) this.fontNameComboBox.getSelectedItem(),
this.fontSizeStylePane.fontComboBox.getSelectedIndex(),
(float)((int)fontSizeStylePane.fontSizeComboBox.getSelectedItem()),
this.foregroundColorPane.getSelectObject(),
this.underlineCombo.getSelectedLineStyle(),
@ -393,10 +331,4 @@ public class FRFontPane extends BasicPane {
private void updatePreviewLabel() {
preview.setFontObject(this.update());
}
class ListHandler implements ListSelectionListener {
public void valueChanged(ListSelectionEvent evt) {
updatePreviewLabel();
}
}
}

23
designer-base/src/main/java/com/fr/design/style/FontFamilyPane.java

@ -1,6 +1,8 @@
package com.fr.design.style;
import com.fr.base.Utils;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
@ -13,32 +15,35 @@ import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.BorderLayout;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
public class FontFamilyPane extends JPanel {
private UITextField familyField;
private JList familyList;
private UIComboBox familyComBox;
public FontFamilyPane() {
this.init();
}
private void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setLayout(new BorderLayout());
// 名字
familyField = new UITextField();
familyField.setEditable(false);
familyList = new JList(DesignUtils.getAvailableFontFamilyNames4Report());
familyList.setVisibleRowCount(4);
familyList.addListSelectionListener(listener);
JPanel familyPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// familyPane.setLayout(FRGUIPaneFactory.createBorderLayout());
familyPane.add(FRFontPane.createTextFieldListPane("", familyField, familyList), BorderLayout.CENTER);
familyPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FRFont_Family"),null));
familyComBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
this.add(familyPane);
familyList.addListSelectionListener(listener);
this.add(row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_FRFont_Family"))).weight(0.1),
cell(familyComBox).weight(0.4)
).getComponent());
}
ListSelectionListener listener = new ListSelectionListener() {

91
designer-base/src/main/java/com/fr/design/style/FontSizeStylePane.java

@ -7,6 +7,8 @@ import javax.swing.JPanel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
@ -14,25 +16,22 @@ import com.fr.general.FRFont;
import com.fr.design.utils.gui.GUICoreUtils;
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;
public class FontSizeStylePane extends JPanel {
private UINumberField sizeField;
private JList sizeList;
private UITextField styleField;
private JList styleList;
public UIComboBox fontComboBox;
public UIComboBox fontSizeComboBox;
public FontSizeStylePane() {
this.init();
}
private void init() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel fontVSizPane = FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane();
this.add(fontVSizPane);
// fontVSizPane.setLayout(new BoxLayout(fontVSizPane, BoxLayout.X_AXIS));
fontVSizPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Font_Size"), null));
String[] styles = {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Plain"),
@ -40,67 +39,15 @@ public class FontSizeStylePane extends JPanel {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Italic"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Font_Bold_Italic")};
styleField = new UITextField();
styleField.setEditable(false);
styleList = new JList(styles);
styleList.setVisibleRowCount(4);
JPanel stylePanel = FRFontPane.createTextFieldListPane("", styleField, styleList);
fontVSizPane.add(stylePanel);
fontVSizPane.add(Box.createHorizontalStrut(6));
fontComboBox = new UIComboBox(styles);
fontSizeComboBox = new UIComboBox(FRFontPane.Font_Sizes);
JPanel sizePanel = FRFontPane.createTextFieldListPane("", sizeField = new UINumberField(), sizeList = new JList(FRFontPane.Font_Sizes));
sizeField.setMaxDecimalLength(1);
sizeField.setEditable(false);
sizeList.setVisibleRowCount(4);
fontVSizPane.add(sizePanel);
styleField.setText((String) styleList.getSelectedValue());
sizeList.addListSelectionListener(listener);
styleList.addListSelectionListener(listener);
this.add(row(
10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Font_Size"))).weight(0.1),
cell(fontComboBox).weight(0.2),
cell(fontSizeComboBox).weight(0.2),
flex(0.2)
).getComponent());
}
ListSelectionListener listener = new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) {
Object source = evt.getSource();
if (source == getSizeList()) {
Integer size = (Integer) getSizeList().getSelectedValue();
if (size != null) {
getSizeField().setValue(size.intValue());
}
} else if (source == getStyleList()) {
String style = (String) getStyleList().getSelectedValue();
if (style != null) getStyleField().setText(style);
}
}
};
public UINumberField getSizeField() {
return sizeField;
}
public JList getStyleList() {
return styleList;
}
public JList getSizeList() {
return sizeList;
}
public UITextField getStyleField() {
return styleField;
}
public void populate(FRFont frFont) {
styleList.setSelectedIndex(frFont.getStyle());
sizeList.setSelectedValue(new Integer(frFont.getSize()), true);
sizeField.setValue(frFont.getSize2D());
}
}

73
designer-base/src/main/java/com/fr/design/style/FormatPane.java

@ -3,6 +3,7 @@
*/
package com.fr.design.style;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.FRContext;
import com.fr.base.TextFormat;
import com.fr.data.core.FormatField;
@ -40,6 +41,10 @@ import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.Date;
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;
/**
* 属性界面中的格式面板
*/
@ -81,43 +86,17 @@ public class FormatPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
//sample pane
JPanel samplePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(samplePane, BorderLayout.NORTH);
samplePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Sample"), null));
samplePane.setLayout(FRGUIPaneFactory.createBorderLayout());
sampleLabel = new UILabel(FormatField.getInstance().getFormatValue());
samplePane.add(sampleLabel, BorderLayout.CENTER);
sampleLabel.setBorder(BorderFactory.createEmptyBorder(2, 4, 4, 4));
sampleLabel.setHorizontalAlignment(SwingConstants.CENTER);
sampleLabel.setFont(FRContext.getDefaultValues().getFRFont());
//left control pane
JPanel leftControlPane =FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
this.add(leftControlPane, BorderLayout.WEST);
leftControlPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Format_Category"), null));
initRadioButton();
ButtonGroup categoryButtonGroup = new ButtonGroup();
categoryButtonGroup.add(nullRadioButton);
categoryButtonGroup.add(numberRadioButton);
categoryButtonGroup.add(currencyRadioButton);
categoryButtonGroup.add(percentRadioButton);
categoryButtonGroup.add(thousandthsRadioButton);
categoryButtonGroup.add(scientificRadioButton);
categoryButtonGroup.add(dateRadioButton);
categoryButtonGroup.add(timeRadioButton);
categoryButtonGroup.add(textRadioButton);
initRadioButtonGroup();
//left control pane
JPanel leftControlPane = initLeftControlPane();
leftControlPane.add(this.createRadioCenterPane(nullRadioButton));
leftControlPane.add(this.createRadioCenterPane(numberRadioButton));
leftControlPane.add(this.createRadioCenterPane(currencyRadioButton));
leftControlPane.add(this.createRadioCenterPane(percentRadioButton));
leftControlPane.add(this.createRadioCenterPane(thousandthsRadioButton));
leftControlPane.add(this.createRadioCenterPane(scientificRadioButton));
leftControlPane.add(this.createRadioCenterPane(dateRadioButton));
leftControlPane.add(this.createRadioCenterPane(timeRadioButton));
leftControlPane.add(this.createRadioCenterPane(textRadioButton));
//content pane.
JPanel contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(contentPane, BorderLayout.CENTER);
contentPane.setBorder(BorderFactory.createEmptyBorder(4, 0, 2, 0));
patternTextField = new UITextField();
contentPane.add(patternTextField, BorderLayout.NORTH);
@ -128,6 +107,16 @@ public class FormatPane extends BasicPane {
//init values.
nullRadioButton.setSelected(true);
this.applyRadioActionListener(this.nullRadioButton);
this.add(column(
10,
cell(FineUIUtils.wrapComponentWithTitle(sampleLabel, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Sample"))),
row(
10,
cell(FineUIUtils.wrapComponentWithTitle(leftControlPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Format_Category"))).weight(0.1),
cell(contentPane).weight(0.5)
)
).getComponent());
}
private void initRadioButton () {
@ -161,6 +150,32 @@ public class FormatPane extends BasicPane {
textRadioButton.addActionListener(radioActionListener);
}
private void initRadioButtonGroup() {
ButtonGroup categoryButtonGroup = new ButtonGroup();
categoryButtonGroup.add(nullRadioButton);
categoryButtonGroup.add(numberRadioButton);
categoryButtonGroup.add(currencyRadioButton);
categoryButtonGroup.add(percentRadioButton);
categoryButtonGroup.add(thousandthsRadioButton);
categoryButtonGroup.add(scientificRadioButton);
categoryButtonGroup.add(dateRadioButton);
categoryButtonGroup.add(timeRadioButton);
categoryButtonGroup.add(textRadioButton);
}
private JPanel initLeftControlPane() {
JPanel leftControlPane =FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
leftControlPane.add(this.createRadioCenterPane(nullRadioButton));
leftControlPane.add(this.createRadioCenterPane(numberRadioButton));
leftControlPane.add(this.createRadioCenterPane(currencyRadioButton));
leftControlPane.add(this.createRadioCenterPane(percentRadioButton));
leftControlPane.add(this.createRadioCenterPane(thousandthsRadioButton));
leftControlPane.add(this.createRadioCenterPane(scientificRadioButton));
leftControlPane.add(this.createRadioCenterPane(dateRadioButton));
leftControlPane.add(this.createRadioCenterPane(timeRadioButton));
leftControlPane.add(this.createRadioCenterPane(textRadioButton));
return leftControlPane;
}
/**
* Create radio center pane.
*/

8
designer-base/src/main/java/com/fr/design/style/background/BackgroundButtonPane.java

@ -19,7 +19,7 @@ public class BackgroundButtonPane extends BackgroundPane {
for (Class<? extends Background> key : BackgroundFactory.buttonKindsOfKey()) {
BackgroundUIWrapper wrapper = BackgroundFactory.getButtonWrapper(key);
wrapper.setIndex(index++);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
tabbedPaneBuilder.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), getTabItemPaneByIndex(wrapper.getIndex()));
}
}
@ -31,11 +31,7 @@ public class BackgroundButtonPane extends BackgroundPane {
BackgroundDetailPane quickPane = cacheMap.get(index);
if (quickPane == null) {
quickPane = BackgroundFactory.createButtonIfAbsent(background == null ? null : background.getClass());
quickPane.addChangeListener(backgroundChangeListener);
cacheMap.put(index, quickPane);
}
tabbedPane.setComponentAt(index, quickPane);
tabbedPane.setSelectedIndex(index);
return quickPane;
}
@ -43,9 +39,7 @@ public class BackgroundButtonPane extends BackgroundPane {
BackgroundDetailPane quickPane = cacheMap.get(index);
if (quickPane == null) {
quickPane = BackgroundFactory.createButtonIfAbsent(index);
tabbedPane.setComponentAt(index, quickPane);
cacheMap.put(index, quickPane);
quickPane.addChangeListener(backgroundChangeListener);
}
return quickPane;
}

7
designer-base/src/main/java/com/fr/design/style/background/BackgroundCardSwitchButtonPane.java

@ -47,7 +47,7 @@ public class BackgroundCardSwitchButtonPane extends BackgroundButtonPane {
for (Class<? extends Background> key : cardSwitchButton.keySet()) {
BackgroundUIWrapper wrapper = cardSwitchButton.get(key);
wrapper.setIndex(index++);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
tabbedPaneBuilder.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), getTabItemPaneByIndex(wrapper.getIndex()));
}
}
@ -63,11 +63,8 @@ public class BackgroundCardSwitchButtonPane extends BackgroundButtonPane {
if (quickPane == null) {
BackgroundUIWrapper uiWrapper = getBackgroundUIWrapper(background);
quickPane = BackgroundFactory.createByWrapper(uiWrapper);
quickPane.addChangeListener(backgroundChangeListener);
cacheMap.put(index, quickPane);
}
tabbedPane.setComponentAt(index, quickPane);
tabbedPane.setSelectedIndex(index);
return quickPane;
}
@ -76,9 +73,7 @@ public class BackgroundCardSwitchButtonPane extends BackgroundButtonPane {
BackgroundDetailPane quickPane = cacheMap.get(index);
if (quickPane == null) {
quickPane = createDetailPaneByIndex(index);
tabbedPane.setComponentAt(index, quickPane);
cacheMap.put(index, quickPane);
quickPane.addChangeListener(backgroundChangeListener);
}
return quickPane;
}

47
designer-base/src/main/java/com/fr/design/style/background/BackgroundPane.java

@ -3,13 +3,12 @@
*/
package com.fr.design.style.background;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.HashMap;
import java.util.Map;
import com.fr.base.background.ColorBackground;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.frpane.FineTabbedPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -23,10 +22,14 @@ import com.fr.design.style.background.impl.ColorNoThemeBackgroundPane;
import com.fr.general.Background;
import com.fr.log.FineLoggerFactory;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
public class BackgroundPane extends BasicPane {
protected UITabbedPane tabbedPane = null;
protected FineTabbedPane.TabPaneBuilder tabbedPaneBuilder = new FineTabbedPane.TabPaneBuilder();
protected FineTabbedPane tabbedPane = null;
private EventListenerList eventChangeList = new EventListenerList();
protected Map<Integer, BackgroundDetailPane> cacheMap = new HashMap<>();
@ -42,21 +45,12 @@ public class BackgroundPane extends BasicPane {
protected void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
previewPane = new BackgroundPreviewLabel();
previewPane.addBackgroundChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
fireStateChanged();
}
});
tabbedPane = new UITabbedPane();
this.add(tabbedPane, BorderLayout.CENTER);
initTabPane();
tabbedPane = tabbedPaneBuilder.withHeadRatio(0.65f).build();
tabbedPane.addChangeListener(backgroundChangeListener);
tabbedPane.setPreferredSize(new Dimension(200, 210));
add(column(
cell(tabbedPane)
).getComponent());
}
protected void initTabPane() {
@ -64,7 +58,7 @@ public class BackgroundPane extends BasicPane {
for (Class<? extends Background> key : BackgroundFactory.kindsOfKey()) {
BackgroundUIWrapper wrapper = BackgroundFactory.getWrapper(key);
wrapper.setIndex(index++);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
tabbedPaneBuilder.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), getTabItemPaneByIndex(wrapper.getIndex()));
}
}
@ -98,11 +92,8 @@ public class BackgroundPane extends BasicPane {
BackgroundDetailPane quickPane = cacheMap.get(index);
if (quickPane == null) {
quickPane = BackgroundFactory.createIfAbsent(background == null ? null : background.getClass());
quickPane.addChangeListener(backgroundChangeListener);
cacheMap.put(index, quickPane);
}
tabbedPane.setComponentAt(index, quickPane);
tabbedPane.setSelectedIndex(index);
return quickPane;
}
@ -110,9 +101,7 @@ public class BackgroundPane extends BasicPane {
BackgroundDetailPane quickPane = cacheMap.get(index);
if (quickPane == null) {
quickPane = BackgroundFactory.createIfAbsent(index);
tabbedPane.setComponentAt(index, quickPane);
cacheMap.put(index, quickPane);
quickPane.addChangeListener(backgroundChangeListener);
}
return quickPane;
}
@ -129,9 +118,6 @@ public class BackgroundPane extends BasicPane {
int index = wrapper.getIndex();
BackgroundDetailPane quickPane = getTabItemPane(background, index);
quickPane.populate(background);
tabbedPane.doLayout();
tabbedPane.validate();
}
protected BackgroundUIWrapper getBackgroundUIWrapper(Background background) {
@ -151,16 +137,5 @@ public class BackgroundPane extends BasicPane {
}
return null;
}
/**
* Change listener.
*/
protected ChangeListener backgroundChangeListener = new ChangeListener() {
public void stateChanged(ChangeEvent evt) {
previewPane.setBackgroundObject(update());
previewPane.repaint();
}
};
private BackgroundPreviewLabel previewPane = null;
}

7
designer-base/src/main/java/com/fr/design/style/background/BackgroundPane4Browser.java

@ -18,7 +18,7 @@ public class BackgroundPane4Browser extends BackgroundPane {
for (Class<? extends Background> key : BackgroundFactory.browserKindsOfKey()) {
BackgroundUIWrapper wrapper = BackgroundFactory.getBrowserWrapper(key);
wrapper.setIndex(index++);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
tabbedPaneBuilder.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), getTabItemPaneByIndex(wrapper.getIndex()));
}
}
@ -30,11 +30,8 @@ public class BackgroundPane4Browser extends BackgroundPane {
BackgroundDetailPane quickPane = cacheMap.get(index);
if (quickPane == null) {
quickPane = BackgroundFactory.createBrowserIfAbsent(background == null ? null : background.getClass());
quickPane.addChangeListener(backgroundChangeListener);
cacheMap.put(index, quickPane);
}
tabbedPane.setComponentAt(index, quickPane);
tabbedPane.setSelectedIndex(index);
return quickPane;
}
@ -42,9 +39,7 @@ public class BackgroundPane4Browser extends BackgroundPane {
BackgroundDetailPane quickPane = cacheMap.get(index);
if (quickPane == null) {
quickPane = BackgroundFactory.createBrowserIfAbsent(index);
tabbedPane.setComponentAt(index, quickPane);
cacheMap.put(index, quickPane);
quickPane.addChangeListener(backgroundChangeListener);
}
return quickPane;
}

7
designer-base/src/main/java/com/fr/design/style/background/BackgroundTabPane.java

@ -44,7 +44,7 @@ public class BackgroundTabPane extends BackgroundPane {
for (Class<? extends Background> key : tabpane.keySet()) {
BackgroundUIWrapper wrapper = tabpane.get(key);
wrapper.setIndex(index++);
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane());
tabbedPaneBuilder.addTab(com.fr.design.i18n.Toolkit.i18nText(wrapper.getTitle()), getTabItemPaneByIndex(wrapper.getIndex()));
}
}
@ -57,11 +57,8 @@ public class BackgroundTabPane extends BackgroundPane {
if (quickPane == null) {
BackgroundUIWrapper uiWrapper = getBackgroundUIWrapper(background);
quickPane = BackgroundFactory.createByWrapper(uiWrapper);
quickPane.addChangeListener(backgroundChangeListener);
cacheMap.put(index, quickPane);
}
tabbedPane.setComponentAt(index, quickPane);
tabbedPane.setSelectedIndex(index);
return quickPane;
}
@ -69,9 +66,7 @@ public class BackgroundTabPane extends BackgroundPane {
BackgroundDetailPane quickPane = cacheMap.get(index);
if (quickPane == null) {
quickPane = createDetailPaneByIndex(index);
tabbedPane.setComponentAt(index, quickPane);
cacheMap.put(index, quickPane);
quickPane.addChangeListener(backgroundChangeListener);
}
return quickPane;
}

56
designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBackgroundPane.java

@ -1,5 +1,6 @@
package com.fr.design.style.background.gradient;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.background.GradientBackground;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
@ -20,6 +21,12 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 渐变色的面板不是很pp面板应用显得繁琐有写可以写成控件类型比如色彩选择的可以做得花哨点
* @author ben
@ -33,45 +40,44 @@ public class GradientBackgroundPane extends BackgroundDetailPane {
private ChangeListener changeListener = null;
public GradientBackgroundPane() {
// bug 5452 简化GradientPane
JPanel jpanel = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Background_Choose_Gradient_Color"));
jpanel.setPreferredSize(new Dimension(450, 320));
jpanel.setLayout(new BorderLayout());
// neil:增加渐变色拖动条
JPanel gradientPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel blankJp = new JPanel();
gradientBar = new GradientBar(4, DEFAULT_GRADIENT_WIDTH);
blankJp.add(gradientBar);
UILabel jl = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Drag_To_Select_Gradient"));
jl.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20));
jl.setHorizontalAlignment(SwingConstants.CENTER);
gradientPanel.add(jl, BorderLayout.NORTH);
gradientPanel.add(blankJp, BorderLayout.SOUTH);
jpanel.add(gradientPanel, BorderLayout.NORTH);
JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
JPanel innercenterPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
centerPane.add(new UILabel(" "));
centerPane.add(innercenterPane);
innercenterPane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Gradient_Direction") + ":"));
left2right = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Page_Setup_Horizontal"));
innercenterPane.add(left2right);
left2right.setSelected(true);
left2right.addActionListener(reviewListener);
top2bottom = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Page_Setup_Vertical"));
innercenterPane.add(top2bottom);
top2bottom.addActionListener(reviewListener);
ButtonGroup toggle = new ButtonGroup();
toggle.add(left2right);
toggle.add(top2bottom);
jpanel.add(centerPane, BorderLayout.CENTER);
this.add(jpanel);
JPanel jpanel = column(
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Drag_To_Select_Gradient"))),
flex()
),
fix(100),
row(
flex(),
cell(gradientBar),
flex()
),
fix(100),
row(
5,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Gradient_Direction") + ":")),
cell(left2right),
cell(top2bottom),
flex()
)
).getComponent();
jpanel.setPreferredSize(new Dimension(600, 450));
this.add(FineUIUtils.wrapComponentWithTitle(jpanel, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Background_Choose_Gradient_Color")));
}

20
designer-base/src/main/java/com/fr/design/style/background/impl/BPane.java

@ -1,11 +1,15 @@
package com.fr.design.style.background.impl;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.style.background.BackgroundDetailPane;
import javax.swing.*;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* Created by richie on 16/5/18.
*/
@ -18,20 +22,16 @@ public abstract class BPane extends BackgroundDetailPane {
protected void initComponents(int nColumn) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(contentPane, BorderLayout.NORTH);
// contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
// type type.
JPanel typePane = FRGUIPaneFactory.createTitledBorderPane(titleOfTypePane());
contentPane.add(typePane);
JPanel typePane2 = new JPanel();
typePane.add(typePane2);
typePane2.setLayout(layoutOfTypePane(nColumn));
setChildrenOfTypePane(typePane2);
JPanel contentPane = column(
10,
cell(FineUIUtils.wrapComponentWithTitle(typePane2, titleOfTypePane()))
).getComponent();
this.add(contentPane, BorderLayout.NORTH);
setChildrenOfContentPane(contentPane);
}

50
designer-base/src/main/java/com/fr/design/style/background/impl/ImageBackgroundPane.java

@ -1,5 +1,6 @@
package com.fr.design.style.background.impl;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Style;
import com.fr.base.background.ImageBackground;
import com.fr.base.background.ImageFileBackground;
@ -19,14 +20,20 @@ import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.UIManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Image;
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;
/**
* Image background pane.
*/
@ -47,36 +54,35 @@ public class ImageBackgroundPane extends BackgroundDetailPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
// preview pane
JPanel previewContainerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(previewContainerPane, BorderLayout.CENTER);
JPanel previewOwnerPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"));
previewOwnerPane.setLayout(new BorderLayout());
previewContainerPane.add(previewOwnerPane, BorderLayout.CENTER);
previewContainerPane.add(initSelectFilePane(), BorderLayout.EAST);
previewPane = new ImagePreviewPane();
previewOwnerPane.add(new JScrollPane(previewPane));
previewPane.addChangeListener(imageSizeChangeListener);
// init image file chooser.
imageFileChooser = new ImageFileChooser();
imageFileChooser.setMultiSelectionEnabled(false);
this.add(column(
5,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"))),
row(
10,
cell(new JScrollPane(previewPane)).weight(0.65).with(it -> {
it.getViewport().setBackground(Color.WHITE);
it.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, UIManager.getColor("defaultBorderColor")));
}),
cell(initSelectFilePane()).weight(0.1)
).with(it -> it.setPreferredSize(new Dimension(it.getWidth(), 400)))
).with(it -> it.setBorder(new ScaledEmptyBorder(10,10,10,10))).getComponent());
}
public JPanel initSelectFilePane() {
JPanel selectFilePane = FRGUIPaneFactory.createBorderLayout_L_Pane();
selectFilePane.setBorder(BorderFactory.createEmptyBorder(8, 2, 4, 0));
UIButton selectPictureButton = new UIButton(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background_Image_Select"));
selectFilePane.add(selectPictureButton, BorderLayout.NORTH);
selectPictureButton.setMnemonic('S');
selectPictureButton.addActionListener(selectPictureActionListener);
JPanel layoutPane = FRGUIPaneFactory.createMediumHGapHighTopFlowInnerContainer_M_Pane();
selectFilePane.add(layoutPane, BorderLayout.CENTER);
//布局
defaultRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Layout_Default"));
tiledRadioButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Layout_Image_Titled"));
@ -92,16 +98,20 @@ public class ImageBackgroundPane extends BackgroundDetailPane {
for (UIRadioButton button : imageLayoutButtons()) {
jp.add(button);
}
layoutPane.add(jp);
ButtonGroup layoutBG = new ButtonGroup();
layoutBG.add(defaultRadioButton);
layoutBG.add(tiledRadioButton);
layoutBG.add(extendRadioButton);
layoutBG.add(adjustRadioButton);
defaultRadioButton.setSelected(true);
return selectFilePane;
return column(
15,
cell(selectPictureButton),
column(
15,
cell(jp)
)
).getComponent();
}
protected UIRadioButton[] imageLayoutButtons() {

3
designer-base/src/main/java/com/fr/design/style/background/impl/NullBackgroundPane.java

@ -19,10 +19,9 @@ public class NullBackgroundPane extends BackgroundDetailPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel centerLabel = new UILabel(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background_Background_Is_Null") + "...");
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background_Background_Is_Null"));
this.add(centerLabel);
centerLabel.setHorizontalAlignment(SwingConstants.CENTER);
centerLabel.setBorder(BorderFactory.createLineBorder(GUICoreUtils.getTitleLineBorderColor()));
}
public void populate(Background background) {

40
designer-base/src/main/java/com/fr/design/style/background/impl/PatternBackgroundPane.java

@ -1,5 +1,6 @@
package com.fr.design.style.background.impl;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.GraphHelper;
import com.fr.base.background.PatternBackground;
import com.fr.design.gui.ilable.UILabel;
@ -16,6 +17,10 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.Rectangle2D;
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;
/**
* Pattern background pane.
*/
@ -64,30 +69,27 @@ public class PatternBackgroundPane extends BPane {
protected void setChildrenOfContentPane(JPanel contentPane) {
// colors
JPanel colorPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Colors"));
contentPane.add(colorPane);
foregroundColorPane = new ColorSelectBox(80);
foregroundColorPane.setPreferredSize(new Dimension(80, 24));
backgroundColorPane = new ColorSelectBox(80);
backgroundColorPane.setPreferredSize(new Dimension(80, 24));
foregroundColorPane.setSelectObject(Color.lightGray);
backgroundColorPane.setSelectObject(Color.black);
colorPane.add(Box.createHorizontalStrut(2));
colorPane.add(this.createLabelColorPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Foreground")
+ ":", foregroundColorPane));
colorPane.add(Box.createHorizontalStrut(8));
colorPane.add(this.createLabelColorPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background")
+ ":", backgroundColorPane));
}
private JPanel createLabelColorPane(String text,
ColorSelectBox colorPane) {
JPanel labelColorPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
labelColorPane.add(new UILabel(text));
labelColorPane.add(colorPane);
return labelColorPane;
contentPane.add(FineUIUtils.wrapComponentWithTitle(row(
10,
row(
10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Foreground") + ":")),
cell(foregroundColorPane)
).weight(0.1),
row(
10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background") + ":")),
cell(backgroundColorPane)
).weight(0.1),
flex(0.1)
).getComponent(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Colors")));
}
public void populate(Background background) {

9
designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java

@ -1,5 +1,6 @@
package com.fr.design.style.color;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils;
import com.fr.chart.base.ChartConstants;
import com.fr.design.DesignerEnvManager;
@ -13,6 +14,7 @@ import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
@ -36,7 +38,7 @@ public class ColorAdjustPane extends JPanel implements UIObserver {
public static final Color[] DEFAULT_COLORS = ChartConstants.NEW_FEATURES;
private static final int COUNT_OF_ROW = 8;
private static final int COUNT_OF_ROW = 20;
private static final int MAX_BUTTON = 40;
@ -81,10 +83,10 @@ public class ColorAdjustPane extends JPanel implements UIObserver {
private void createContentPane() {
VerticalFlowLayout layout = new VerticalFlowLayout(0, 0, 0);
layout.setAlignLeft(true);
this.setLayout(layout);
this.setLayout(new BorderLayout());
for (int i = 0, size = colorButtons.size(); i < size; i += COUNT_OF_ROW) {
JPanel panel = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
JPanel panel = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(2, 2);
int count = i + COUNT_OF_ROW > colorButtons.size() ? colorButtons.size() : i + COUNT_OF_ROW;
for (int j = i; j < count; j++) {
colorButtons.get(j).setLastButton(false);
@ -124,6 +126,7 @@ public class ColorAdjustPane extends JPanel implements UIObserver {
};
colorButton.addChangeListener(changeListener);
colorButton.setBorder(new ScaledEmptyBorder(0, 0, 0, 15));
return colorButton;
}

62
designer-base/src/main/java/com/fr/design/style/color/ColorSelectDetailPane.java

@ -1,6 +1,11 @@
package com.fr.design.style.color;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
@ -11,6 +16,10 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
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;
import static com.fr.design.i18n.Toolkit.i18nText;
/**
@ -26,9 +35,6 @@ public class ColorSelectDetailPane extends BasicPane {
// 颜色选择器面板
private JColorChooser selectedPanel;
// 最近使用颜色面板
private JPanel recentUsePanel;
// 预览
private JPanel previewPanel;
@ -76,20 +82,12 @@ public class ColorSelectDetailPane extends BasicPane {
swatchChooserPanel = new SwatchChooserPanel();
customChooserPanel = new CustomChooserPanel();
selectedPanel.setChooserPanels(new AbstractColorChooserPanel[]{customChooserPanel, swatchChooserPanel});
this.add(selectedPanel, BorderLayout.NORTH);
// 最近使用面板
recentUsePanel = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Used"));
RecentUseColorPane recent = new RecentUseColorPane(selectedPanel);
recentUsePanel.add(recent);
this.add(recentUsePanel, BorderLayout.CENTER);
selectedPanel.setPreviewPanel(new JPanel());
// 预览
previewPanel = FRGUIPaneFactory.createTitledBorderPaneCenter(i18nText("Fine-Design_Basic_Preview"));
previewPanel = new JPanel(new BorderLayout());
final ColorChooserPreview colorChooserPreview = new ColorChooserPreview();
colorChooserPreview.setBackground(Color.WHITE);
ColorSelectionModel model = selectedPanel.getSelectionModel();
model.addChangeListener(new ChangeListener() {
@Override
@ -99,8 +97,42 @@ public class ColorSelectDetailPane extends BasicPane {
colorChooserPreview.repaint();
}
});
previewPanel.add(colorChooserPreview);
this.add(previewPanel, BorderLayout.SOUTH);
previewPanel.add(row(
flex(),
column(flex(), cell(colorChooserPreview), flex()),
flex()
).getComponent());
add(initCenterPane());
}
private FineTabbedPane buildTabbedPane() {
return FineTabbedPane.builder().withHeadRatio(0.3f)
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom"), customChooserPanel)
.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Swatch"), swatchChooserPanel).build();
}
private JPanel initCenterPane() {
// 最近使用面板
RecentUseColorPane recent = new RecentUseColorPane(selectedPanel);
UILabel label = new UILabel( i18nText("Fine-Design_Basic_Used"));
FineUIUtils.wrapBoldLabelWithUnderline(label);
FineTabbedPane tabbedPane = buildTabbedPane();
return column(
cell(tabbedPane),
column(
10,
cell(label), cell(recent),
column(
2,
cell(new UILabel(i18nText("Fine-Design_Basic_Preview"))),
cell(previewPanel).with(it -> {
it.setBorder(new FineRoundBorder());
it.setPreferredSize(new Dimension(this.getPreferredSize().width, 120));
it.setBackground(Color.WHITE);
})
)).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 10)))
).getComponent();
}
public void populate(Color color){

160
designer-base/src/main/java/com/fr/design/style/color/CustomChooserPanel.java

@ -29,6 +29,12 @@ import com.fr.design.gui.ispinner.UIBasicSpinner;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.log.FineLoggerFactory;
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.fix;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 颜色选择器自定义面板
@ -114,17 +120,17 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
/**
* The default width of the gradient image.
*/
private static final int IMG_WIDTH = 200;
private static final int IMG_WIDTH = 180;
/**
* The default height of the gradient image.
*/
private static final int IMG_HEIGHT = 205;
private static final int IMG_HEIGHT = 180;
/**
* The default width of the track gradient.
*/
private static final int TRACK_WIDTH = 20;
private static final int TRACK_WIDTH = 12;
/**
* The UILabel for Red.
@ -156,6 +162,9 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
private static final int TWENTY_FOUR = 24;
private static final int HEX_FF = 0xff;
private static final int BUTTON_SPINNER_GAP = 5;
private static final int HSB_GAP = 10;
// 占位label
private static final UILabel PLACE_HOLDER_LABEL = new UILabel();
@ -583,8 +592,9 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
* This method builds the DefaultHSBChooserPanel.
*/
protected void buildChooser() {
setLayout(new BorderLayout());
add(buildRightPanel(), BorderLayout.EAST);
setLayout(new BorderLayout(10, 0));
setPreferredSize(new Dimension((int) this.getPreferredSize().getWidth(), 180));
add(buildRightPanel(), BorderLayout.CENTER);
JPanel container = new JPanel();
container.setLayout(new BorderLayout());
@ -679,47 +689,50 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
* @return The right side panel.
*/
private Container buildRightPanel() {
JPanel container = new JPanel();
container.setLayout(new FlowLayout(FlowLayout.RIGHT));
// 主面板
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BorderLayout(0, 10));
UILabel label = new UILabel();
label.setSize(200, 200);
container.add(label);
container.add(mainPanel);
// hsb和rgb面板
JPanel hsbAndRgbPanel = new JPanel();
hsbAndRgbPanel.setLayout(new BorderLayout(0, 16));
hsbAndRgbPanel.add(initialHSBPanel(), BorderLayout.CENTER);
hsbAndRgbPanel.add(initialRGBPanel(), BorderLayout.SOUTH);
// 十六进制面板
JPanel hexPanel = new JPanel();
hexPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 8, 0));
hexPanel.add(new UILabel("#"));
hexPanel.add(field);
mainPanel.add(hsbAndRgbPanel, BorderLayout.CENTER);
mainPanel.add(hexPanel, BorderLayout.SOUTH);
JPanel rightPane = new JPanel(new BorderLayout());
JPanel container = new JPanel(new BorderLayout());
JButton pickColorButton = PickColorButtonFactory.getPickColorButton(this, PickColorButtonFactory.IconType.ICON18, true);
JPanel blankArea = new JPanel();
blankArea.setPreferredSize(new Dimension(100, 175));
rightPane.add(blankArea, BorderLayout.CENTER);
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(pickColorButton, BorderLayout.WEST);
rightPane.add(buttonPane, BorderLayout.SOUTH);
container.add(rightPane);
container.add(column(
10,
row(
10,
cell(initialHSBPanel()),
cell(initialRGBPanel()),
flex()
),
row(
BUTTON_SPINNER_GAP,
row(fix((int) hRadio.getPreferredSize().getHeight()), cell(new UILabel("#")), flex()).with(it -> it.setPreferredSize(hRadio.getPreferredSize())),
cell(field),
column(
flex(),
cell(pickColorButton),
flex()
)
)
).getComponent());
return container;
}
//初始化HSB部分
private JPanel initialHSBPanel() {
initButtonGroup();
initSpinner();
MouseAdapter cl = new RadioStateListener();
locked = HLOCKED;
hRadio.setSelected(true);
hRadio.addMouseListener(cl);
sRadio.addMouseListener(cl);
bRadio.addMouseListener(cl);
return column(HSB_GAP, row(BUTTON_SPINNER_GAP, cell(hRadio), cell(hSpinner)),
row(BUTTON_SPINNER_GAP, cell(sRadio), cell(sSpinner)),
row(BUTTON_SPINNER_GAP, cell(bRadio), cell(bSpinner))
).getComponent();
}
private void initButtonGroup() {
hRadio = new UIRadioButton("H");
sRadio = new UIRadioButton("S");
bRadio = new UIRadioButton("B");
@ -727,54 +740,37 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
group.add(hRadio);
group.add(sRadio);
group.add(bRadio);
}
private void initSpinner() {
hSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, 359, 1));
setBackground(hSpinner);
sSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, 100, 1));
setBackground(sSpinner);
bSpinner = new UIBasicSpinner(new SpinnerNumberModel(100, 0, 100, 1));
setBackground(bSpinner);
hSpinner.setEnabled(true);
sSpinner.setEnabled(false);
bSpinner.setEnabled(false);
MouseAdapter cl = new RadioStateListener();
locked = HLOCKED;
hRadio.setSelected(true);
hRadio.addMouseListener(cl);
sRadio.addMouseListener(cl);
bRadio.addMouseListener(cl);
ChangeListener scroll = new ImageScrollListener();
hSpinner.addChangeListener(scroll);
sSpinner.addChangeListener(scroll);
bSpinner.addChangeListener(scroll);
}
JPanel hsbPanel = new JPanel();
hsbPanel.setLayout(new GridLayout(3, 0, 0, 5));
JPanel hPanel = new JPanel();
hPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0));
hPanel.add(hRadio);
hPanel.add(hSpinner);
hsbPanel.add(hPanel);
JPanel sPanel = new JPanel();
sPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0));
sPanel.add(sRadio);
sPanel.add(sSpinner);
hsbPanel.add(sPanel);
JPanel lPanel = new JPanel();
lPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0));
lPanel.add(bRadio);
lPanel.add(bSpinner);
hsbPanel.add(lPanel);
return hsbPanel;
private void setBackground(Component component) {
component.setBackground(Color.WHITE);
}
private JPanel initialRGBPanel() {
// 初始化RGB部分
rSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, 255, 1));
setBackground(rSpinner);
gSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, 255, 1));
setBackground(gSpinner);
bbSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, 255, 1));
setBackground(bbSpinner);
rSpinner.setEnabled(true);
gSpinner.setEnabled(true);
@ -784,31 +780,15 @@ class CustomChooserPanel extends AbstractColorChooserPanel implements ColorSelec
TextDocumentListener listen = new TextDocumentListener();
field = new UITextField();
field.setPreferredSize(new Dimension(70, 18));
field.setPreferredSize(new Dimension(hSpinner.getPreferredSize()));
field.getDocument().addDocumentListener(listen);
JPanel rgbPanel = new JPanel();
rgbPanel.setLayout(new GridLayout(3, 0, 0, 5));
JPanel rPanel = new JPanel();
rPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0));
rPanel.add(R);
rPanel.add(rSpinner);
rgbPanel.add(rPanel);
JPanel gPanel = new JPanel();
gPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0));
gPanel.add(G);
gPanel.add(gSpinner);
rgbPanel.add(gPanel);
JPanel bPanel = new JPanel();
bPanel.setLayout(new FlowLayout(FlowLayout.RIGHT, 10, 0));
bPanel.add(B);
bPanel.add(bbSpinner);
rgbPanel.add(bPanel);
return rgbPanel;
return column(
HSB_GAP,
row(BUTTON_SPINNER_GAP, cell(R), cell(rSpinner)),
row(BUTTON_SPINNER_GAP, cell(G), cell(gSpinner)),
row(BUTTON_SPINNER_GAP, cell(B), cell(bbSpinner))
).getComponent();
}
/**

41
designer-base/src/main/java/com/fr/design/style/color/DetailColorSelectPane.java

@ -11,10 +11,12 @@ import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import javax.swing.BorderFactory;
import javax.swing.Box;
import com.fine.theme.utils.FineUIUtils;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -23,6 +25,10 @@ import com.fr.design.border.UITitledBorder;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
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;
/**
* The detail color select pane.
@ -39,26 +45,12 @@ public class DetailColorSelectPane extends BasicPane {
public DetailColorSelectPane(boolean supportTheme) {
this.setBorder(BorderFactory.createEmptyBorder(4, 4, 0, 4));
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel titledefaultPane=FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Color"));
JPanel defaultPane =FRGUIPaneFactory.createX_AXISBoxInnerContainer_S_Pane();
this.add(titledefaultPane, BorderLayout.WEST);
titledefaultPane.add(defaultPane);
defaultPane.add(Box.createHorizontalStrut(4));
JPanel colorSelectContainPane =FRGUIPaneFactory.createBorderLayout_L_Pane();
defaultPane.add(colorSelectContainPane);
colorSelectPane = NewColorSelectPane.createColorSelectPaneWithTheme(supportTheme);
colorSelectContainPane.add(colorSelectPane, BorderLayout.NORTH);
defaultPane.add(Box.createHorizontalStrut(8));
//color preview
JPanel colorPreviewContainPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
defaultPane.add(colorPreviewContainPane);
JPanel colorPreviewPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
colorPreviewPane.setPreferredSize(new Dimension(180, 60));
colorPreviewContainPane.add(colorPreviewPane, BorderLayout.NORTH);
colorPreviewLabel = new UILabel(" ") {
@ -76,13 +68,26 @@ public class DetailColorSelectPane extends BasicPane {
this.getFont().getStyle(), this.getFont().getSize() + 4));
colorPreviewLabel.setBorder(BorderFactory.createEmptyBorder(0, 2, 2, 2));
colorPreviewPane.add(colorPreviewLabel, BorderLayout.CENTER);
UITitledBorder explainBorder = UITitledBorder.createBorderWithTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"));
colorPreviewPane.setBorder(explainBorder);
this.addChangeListener(colorPreviewLabelChangeListener);
//use the white as the default color.
this.populate(Color.WHITE);
JPanel center = column(
5,
row(
20,
cell(colorSelectPane.transparentButton).weight(0.2),
cell(new UILabel("<html><font color=gray>" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview") + "</font></html>")).weight(0.36)
),
row(
20,
cell(colorSelectPane.theme).weight(0.2).with(it -> it.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, UIManager.getColor("defaultBorderColor")))),
cell(colorPreviewPane).weight(0.36).with(it -> it.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, UIManager.getColor("defaultBorderColor"))))
)
).getComponent();
this.add(FineUIUtils.wrapComponentWithTitle(center, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Color")));
}
@Override

75
designer-base/src/main/java/com/fr/design/style/color/NewColorSelectPane.java

@ -1,6 +1,8 @@
package com.fr.design.style.color;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.FineColor;
import com.fr.base.theme.FineColorDeriveState;
@ -26,13 +28,15 @@ import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
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;
/**
* @author zhou
@ -59,6 +63,12 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
private final JPanel menuColorPane;
private ColorCell[][] themeColorCellGrid;
// 透明
public UIButton transparentButton = new UIButton();
// 主题
public JPanel theme = new JPanel();
public static NewColorSelectPane createColorSelectPaneWithTheme(boolean supportTheme) {
return new NewColorSelectPane(true, supportTheme);
}
@ -82,34 +92,37 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
initSelectButton(isSupportTransparent);
// center
JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
centerPane.setBorder(new ScaledEmptyBorder(10, 6, 0, 6));
this.add(centerPane, BorderLayout.CENTER);
centerPane.setOpaque(false);
menuColorPane = getMenuColorPane();
if (isSupportThemeColor) {
JPanel themePane = initThemeColorPane();
themePane.setOpaque(false);
themePane.setBorder(new ScaledEmptyBorder(5, 6, 0, 6));
centerPane.add(themePane);
} else {
menuColorPane.setBorder(new ScaledEmptyBorder(5, 6, 0, 6));
centerPane.add(menuColorPane);
menuColorPane.setOpaque(false);
initMenuColorPane();
}
JPanel standardColorPane = new JPanel(new BorderLayout(0, 5));
standardColorPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
standardColorPane.setBorder(new ScaledEmptyBorder(10, 6, 0, 6));
standardColorPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Standard_Color")), BorderLayout.CENTER);
centerPane.add(standardColorPane);
JPanel colorSelectPane = createStandardColorPane();
standardColorPane.add(colorSelectPane, BorderLayout.SOUTH);
standardColorPane.setOpaque(false);
// 增加最近使用 pane
JPanel row1Pane = new JPanel(new BorderLayout(0, 5));
row1Pane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
row1Pane.setBorder(new ScaledEmptyBorder(10, 6, 0, 6));
row1Pane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Used")), BorderLayout.CENTER);
centerPane.add(row1Pane);
// 最近使用
usedColorPane = new NewUsedColorPane(9, this, selectRealTime());
row1Pane.add(usedColorPane.getPane(), BorderLayout.SOUTH);
row1Pane.setOpaque(false);
// mod by anchore 16/11/16
final UIButton customButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_More_Color"));
@ -127,9 +140,26 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
customButton.setCursor(new Cursor(Cursor.HAND_CURSOR));
JPanel centerPane1 = new JPanel(new BorderLayout(0, 0));
centerPane1.setBorder(new ScaledEmptyBorder(8, 0, 9, 0));
centerPane1.setBorder(new ScaledEmptyBorder(10, 6, 6, 6));
centerPane1.add(customButton, BorderLayout.CENTER);
centerPane.add(centerPane1);
centerPane1.setOpaque(false);
theme = column(
cell(centerPane),
cell(standardColorPane),
cell(row1Pane),
cell(centerPane1)
).with(it -> {
it.setBackground(FlatUIUtils.getUIColor("background.normal", Color.WHITE));
it.setOpaque(true);
if (!isSupportTransparent) {
it.setBorder(new FineRoundBorder());
}
}).getComponent();
this.add(theme, BorderLayout.CENTER);
}
private JPanel createStandardColorPane() {
@ -154,6 +184,9 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
JPanel centerPane = new JPanel(new GridLayout(1, 8, DEFAULT_COLOR_HOR_INTERVAL, 0));
menuColorPane.add(northPane, BorderLayout.NORTH);
menuColorPane.add(centerPane, BorderLayout.CENTER);
menuColorPane.setOpaque(false);
northPane.setOpaque(false);
centerPane.setOpaque(false);
Color[] colorArray = new Color[]{
// 8列主题色
@ -189,10 +222,11 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
northPane.add(themeColorCellGrid[i][0]);
}
for (int i = 0; i < colorArray.length; i++) {
JPanel columnPane = new JPanel(new GridLayout(DEFAULT_DERIVE_COUNT - 1, 1, 0, 0));
JPanel columnPane = new JPanel(new GridLayout(DEFAULT_DERIVE_COUNT - 1, 1, 4, 4));
for (int j = 1; j < DEFAULT_DERIVE_COUNT; j++) {
columnPane.add(themeColorCellGrid[i][j]);
}
columnPane.setOpaque(false);
centerPane.add(columnPane);
}
@ -237,7 +271,9 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
Color[] colorArray = this.getColorArray();
for (int i = 0; i < colorArray.length; i++) {
Color color = colorArray[i] == null ? UsedColorPane.DEFAULT_COLOR : colorArray[i];
menuColorPane.add(new ColorCell(color, this));
ColorCell c = new ColorCell(color, this);
c.setOpaque(false);
menuColorPane.add(c);
}
}
@ -257,11 +293,14 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
protected void initSelectButton(boolean isSupportTransparent) {
this.isSupportTransparent = isSupportTransparent;
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(new UIRoundedBorder(UIConstants.TOOLBAR_BORDER_COLOR, 1, 5));
if (isSupportTransparent) {
UIButton transparentButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_ChartF_Transparency"));
this.add(transparentButton, BorderLayout.NORTH);
JPanel transparentJpanel = new JPanel(new BorderLayout(0, 0));
transparentButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_ChartF_Transparency"));
transparentButton.addActionListener(e -> doTransparent());
transparentButton.setCursor(new Cursor(Cursor.HAND_CURSOR));
transparentJpanel.add(transparentButton, BorderLayout.CENTER);
transparentJpanel.setBorder(new ScaledEmptyBorder(6, 6, 6, 6));
this.add(transparentJpanel, BorderLayout.NORTH);
}
}
@ -397,6 +436,9 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
private void initialComponents() {
int total = columns;
JPanel panel = new JPanel();
// 取色按钮
JButton pickColorButton = PickColorButtonFactory.getPickColorButton(selectable, PickColorButtonFactory.IconType.ICON16, setColorRealTime);
panel.add(pickColorButton);
panel.setLayout(new GridLayout(1, columns + 1, DEFAULT_COLOR_HOR_INTERVAL, 0));
panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
//最近使用颜色
@ -407,9 +449,6 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
UsedColorPane.DEFAULT_COLOR;
panel.add(new ColorCell(color == null ? UsedColorPane.DEFAULT_COLOR : color, selectable));
}
// 取色按钮
JButton pickColorButton = PickColorButtonFactory.getPickColorButton(selectable, PickColorButtonFactory.IconType.ICON16, setColorRealTime);
panel.add(pickColorButton);
this.pane = panel;
}
@ -420,7 +459,7 @@ public class NewColorSelectPane extends BasicPane implements ColorSelectable {
int total = columns;
Color[] colors = DesignerEnvManager.getEnvManager().getColorConfigManager().getColors();
int size = colors.length;
for (int i = 0; i < total; i++) {
for (int i = 1; i <= total; i++) {
ColorCell cell = (ColorCell) this.pane.getComponent(i);
Color color = i < size ? colors[size - i - 1] : UsedColorPane.DEFAULT_COLOR;
cell.setColor(color == null ? UsedColorPane.DEFAULT_COLOR : color);

9
designer-base/src/main/java/com/fr/design/style/color/RecentUseColorPane.java

@ -18,13 +18,10 @@ public class RecentUseColorPane extends BasicPane implements ColorSelectable {
public RecentUseColorPane(JColorChooser chooser) {
this.chooser = chooser;
// center
JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
this.add(centerPane, BorderLayout.CENTER);
// 最近使用
UsedColorPane pane = new UsedColorPane(2, 10, this);
centerPane.add(pane.getPane());
setLayout(new BorderLayout());
UsedColorPane pane = new UsedColorPane(1, 20, this);
add(pane.getPane(), BorderLayout.WEST);
}
/**

1
designer-base/src/main/java/com/fr/design/style/color/UsedColorPane.java

@ -65,7 +65,6 @@ public class UsedColorPane extends BasicPane {
int total = columns * rows;
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(rows, columns, 1, 1));
panel.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8));
//最近使用颜色
Color[] colors = DesignerEnvManager.getEnvManager().getColorConfigManager().getColors();
int size = colors.length;

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

@ -63,7 +63,7 @@ public class DateValuePane extends Column {
});
this.add(
row(
cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(3)
cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(1.6), flex(1.4)
),
cell(customRow)
);

6
designer-base/src/main/java/com/fr/design/widget/component/NumberEditorValidatePane.java

@ -70,10 +70,12 @@ public class NumberEditorValidatePane extends JPanel {
this.allowNegativeCheckBox.addActionListener(allowNegativeListener);
this.setMaxValueCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Need_Max_Value"), false);
this.maxValueSpinner = new UISpinner(-Double.MAX_VALUE, Double.MAX_VALUE, 1D, 0D);
this.maxValueSpinner.setSize(this.decimalLength.getSize());
this.setMaxValueCheckBox.addActionListener(setMaxListener);
this.maxValueSpinner.addChangeListener(maxValueChangeListener);
this.setMinValueCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Need_Min_Value"), false);
this.minValueSpinner = new UISpinner(-Double.MAX_VALUE, Double.MAX_VALUE, 1D, 0D);
this.minValueSpinner.setSize(this.decimalLength.getSize());
this.setMinValueCheckBox.addActionListener(setMinListener);
this.minValueSpinner.addChangeListener(minValueChangeListener);
initErrorMsgPane();
@ -91,10 +93,10 @@ public class NumberEditorValidatePane extends JPanel {
cell(limitNumberPane),
cell(allowNegativeCheckBox),
row(
cell(setMaxValueCheckBox).weight(1), cell(maxValueSpinner).weight(1.5)
cell(setMaxValueCheckBox).weight(1.2), cell(maxValueSpinner).weight(3)
),
row(
cell(setMinValueCheckBox).weight(1), cell(minValueSpinner).weight(1.5)
cell(setMinValueCheckBox).weight(1.2), cell(minValueSpinner).weight(3)
),
cell(errorMsgBorderPane)
).getComponent());

38
designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java

@ -1,5 +1,6 @@
package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.GraphHelper;
import com.fr.data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
@ -22,6 +23,10 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Author : Shockway
* Date: 13-7-29
@ -30,26 +35,24 @@ import java.awt.event.ActionListener;
public abstract class CustomJobPane extends BasicBeanPane {
protected UITextField classNameTextField;
protected ObjectProperiesPane objectProperiesPane;
private static final int DEFAULT_LENGTH = 25;
private static final int DEFAULT_LENGTH = 33;
public CustomJobPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(getLengthOfTextField());
reportletNamePane.add(classNameTextField);
classNameTextField = new UITextField();
UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension(
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20,
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40,
classNameTextField.getPreferredSize().height));
UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editButton.setPreferredSize(new Dimension(
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 20,
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40,
classNameTextField.getPreferredSize().height));
reportletNamePane.add(browserButton);
reportletNamePane.add(editButton);
UITextArea area = new UITextArea(2, 1);
browserButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
@ -60,6 +63,7 @@ public abstract class CustomJobPane extends BasicBeanPane {
new DialogActionAdapter() {
public void doOk() {
classNameTextField.setText(bPane.getClassPath());
area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask"));
checkAddButtonEnable();
}
}).setVisible(true);
@ -73,6 +77,7 @@ public abstract class CustomJobPane extends BasicBeanPane {
new DialogActionAdapter() {
public void doOk() {
classNameTextField.setText(javaEditorPane.getClassText());
area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask"));
checkAddButtonEnable();
}
});
@ -87,23 +92,28 @@ public abstract class CustomJobPane extends BasicBeanPane {
});
reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"), null));
this.add(reportletNamePane, BorderLayout.NORTH);
reportletNamePane.setLayout(new BorderLayout());
reportletNamePane.add(row(10,
cell(classNameTextField).weight(0.8),
cell(browserButton).weight(0.1),
cell(editButton).weight(0.1)
).getComponent());
objectProperiesPane = new ObjectProperiesPane();
objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), null));
this.add(objectProperiesPane, BorderLayout.CENTER);
UITextArea area = new UITextArea(2, 1);
area.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Extend_Class", "com.fr.data.AbstractSubmitTask"));
JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
dsPane.add(area);
dsPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description"), null));
this.add(dsPane, BorderLayout.SOUTH);
this.add(column(
cell(reportletNamePane),
cell(objectProperiesPane).weight(1.0),
cell(dsPane)
).getComponent());
checkAddButtonEnable();
}
public int getLengthOfTextField() {
return DEFAULT_LENGTH;
return FineUIScale.scale(DEFAULT_LENGTH);
}
protected String title4PopupWindow() {

66
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -1,5 +1,7 @@
package com.fr.design.write.submit;
import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter;
@ -25,6 +27,7 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.CheckBoxList;
import com.fr.design.gui.itree.refreshabletree.ExpandMutableTreeNode;
@ -47,6 +50,7 @@ import com.fr.write.config.DeleteConfig;
import com.fr.write.config.InsertConfig;
import com.fr.write.config.IntelliDMLConfig;
import com.fr.write.config.UpdateConfig;
import sun.swing.table.DefaultTableCellHeaderRenderer;
import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory;
@ -60,6 +64,7 @@ import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTree;
import javax.swing.ListSelectionModel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableCellRenderer;
@ -83,9 +88,15 @@ import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.EventObject;
import java.util.List;
import java.util.stream.Collectors;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
//august:这个东西应该分成两类,一类是有单元格的情况,一类是没有单元格的情况
public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@ -140,31 +151,40 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
this.v_Types = v_Types;
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(northPane, BorderLayout.NORTH);
dmlConfigComboBox = new UIComboBox(DML_CONFIG_TYPES);
JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), dmlConfigComboBox},
FlowLayout.LEFT, 10);
JPanel typePane = new JPanel(new BorderLayout());
typePane.add(row(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")),
cell(dmlConfigComboBox)).getComponent());
typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type")));
northPane.add(typePane, BorderLayout.NORTH);
chooseTable = new ChoosePaneSupportFormula();
chooseTable.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")));
chooseTable.setTableNameComboBoxPopSize(160, 320);
northPane.add(chooseTable, BorderLayout.CENTER);
// peter:编辑的TablePane
JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(editTablePane, BorderLayout.CENTER);
editTablePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value")));
editTablePane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value")));
editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180));
keyColumnValuesTable = new KeyColumnNameValueTable();
editTablePane.add(new JScrollPane(this.keyColumnValuesTable), BorderLayout.CENTER);
editTablePane.add(new UIScrollPane(this.keyColumnValuesTable), BorderLayout.CENTER);
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 180));
keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 150));
keyColumnValuesTable.setShowHorizontalLines(true);
DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer();
headerRenderer.setHorizontalAlignment(SwingConstants.LEFT);
keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer);
northPane.add(column(10, true,
cell(typePane),
cell(chooseTable))
.getComponent());
this.add(column(10, true,
cell(northPane),
cell(editTablePane))
.getComponent());
initJTableColumn();
@ -187,15 +207,12 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
// alex:添加操作按钮
UpdateAction[] actions = this.getActions();
if (actions != null && actions.length > 0) {
JPanel controlBtnPane = new JPanel(new GridLayout(actions.length + 1, 1, 4, 4));
JPanel controlBtnPane = new JPanel(new BorderLayout());
editTablePane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), BorderLayout.EAST);
List<Layouts.Cell> buttonGroup = Arrays.stream(actions).map(action -> cell(new UIButton(action))).collect(Collectors.toList());
for (UpdateAction action : actions) {
controlBtnPane.add(new UIButton(action));
}
checkBoxUpdatePane = new JPanel(new BorderLayout(0, 0));
checkBoxUpdatePane.setPreferredSize(new Dimension(120, 20));
controlBtnPane.add(checkBoxUpdatePane);
UpdateCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_RWA_NotChange_Unmodified"));
UIButton helpButton = new UIButton(HEIP_ICON);
@ -211,8 +228,9 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
});
helpButton.set4ToolbarButton();
checkBoxUpdatePane.add(UpdateCheckBox, BorderLayout.WEST);
checkBoxUpdatePane.add(helpButton, BorderLayout.EAST);
buttonGroup.add(row(5, cell(UpdateCheckBox),
cell(helpButton)));
controlBtnPane.add(column(5, buttonGroup.toArray(new Layouts.Cell[0])).getComponent());
}
}
@ -290,7 +308,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer();
cr.setForeground(UIConstants.NORMAL_BACKGROUND);
JScrollPane jp = new JScrollPane(conditionsTree);
addComponent(conditionPane, jp);
UIButton addSubmitConditionButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition"));
addSubmitConditionButton.addActionListener(new ActionListener() {
@ -322,8 +339,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
JPanel controlBtnPane = new JPanel(new GridLayout(1, 1, 4, 4));
controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize());
conditionPane.add(GUICoreUtils.createBorderPane(controlBtnPane, BorderLayout.NORTH), setControlBtnPanePosition());
controlBtnPane.add(addSubmitConditionButton);
conditionPane.add(row(
cell(jp).weight(0.74),
column(cell(controlBtnPane).weight(0.5),cell(new UILabel()).weight(0.5)).weight(0.26)
).getComponent());
return conditionPane;
}
@ -665,6 +685,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
private void initJTableColumn() {
TableColumn column0 = this.keyColumnValuesTable.getColumnModel().getColumn(0);
column0.setMaxWidth(50);
column0.setCellRenderer(new ColumnNameTableCellRenderer());
TableColumn column1 = this.keyColumnValuesTable.getColumnModel().getColumn(1);
column1.setCellRenderer(new ColumnNameTableCellRenderer());
@ -1154,7 +1175,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setHorizontalAlignment(SwingConstants.LEFT);
if (value instanceof ColumnName) {
this.setText(((ColumnName) value).name);
}
@ -1170,6 +1191,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
this.setHorizontalAlignment(SwingConstants.LEFT);
if (value instanceof ColumnValue) {
if (((ColumnValue) value).obj != null) {

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

@ -0,0 +1,7 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="4" y="10" width="24" height="18" fill="#B3CFF9"/>
<rect x="4" y="3.99988" width="24" height="8" fill="#5493F2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.99961 2.59998H26.9996C28.3251 2.59998 29.3996 3.67449 29.3996 4.99998V27C29.3996 28.3255 28.3251 29.4 26.9996 29.4H4.99961C3.67413 29.4 2.59961 28.3255 2.59961 27V4.99998C2.59961 3.67449 3.67413 2.59998 4.99961 2.59998ZM4.99961 3.99998C4.44732 3.99998 3.99961 4.44769 3.99961 4.99998V27C3.99961 27.5523 4.44733 28 4.99961 28H26.9996C27.5519 28 27.9996 27.5523 27.9996 27V4.99998C27.9996 4.44769 27.5519 3.99998 26.9996 3.99998H4.99961Z" fill="#105DD1"/>
<rect x="3" y="11" width="26" height="1.4" fill="#105DD1"/>
<path d="M18.3818 21.0044L23.6075 15.7112C23.9953 15.3184 24.628 15.3143 25.0208 15.7021C25.4136 16.0899 25.4176 16.7226 25.0299 17.1154L19.7943 22.4186C19.0256 23.1973 17.7711 23.2053 16.9924 22.4365L16.989 22.4399L14.1907 19.6599L9.12132 24.7293C8.7308 25.1198 8.09763 25.1198 7.70711 24.7293C7.31658 24.3388 7.31658 23.7056 7.70711 23.3151L12.8008 18.2214C13.5679 17.4543 14.8115 17.4543 15.5786 18.2214L15.5796 18.2204L18.3818 21.0044Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

4
designer-base/src/main/resources/com/fine/theme/icon/logo.svg

@ -0,0 +1,4 @@
<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="M10 12.6333H19.8C19.9105 12.6333 20 12.7199 20 12.8267V22.1067C20 22.2134 19.9105 22.3 19.8 22.3H10V30.8067C10 30.9134 9.91046 31 9.8 31H1.2C1.08954 31 1 30.9134 1 30.8067L1 8.76667C1 5.02954 4.13401 2 8 2H9.8C9.91046 2 10 2.08656 10 2.19333V12.6333Z" fill="#2576EF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M31 2.19333V24.2333C31 27.9705 27.866 31 24 31H22V10.7H12.2C12.0895 10.7 12 10.6134 12 10.5067V2.19333C12 2.08656 12.0895 2 12.2 2H30.8C30.9105 2 31 2.08656 31 2.19333Z" fill="#34B3FA"/>
</svg>

After

Width:  |  Height:  |  Size: 657 B

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

@ -0,0 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M27 28V13H20C18.8954 13 18 12.1045 18 11V4H5L5 28H27ZM20 4.82843L26.1716 11H20V4.82843ZM5 2C3.89543 2 3 2.89543 3 4V28C3 29.1046 3.89543 30 5 30H27C28.1046 30 29 29.1046 29 28V11.8284C29 11.298 28.7893 10.7893 28.4142 10.4142L20.5858 2.58579C20.2107 2.21071 19.702 2 19.1716 2H5ZM15.1257 23.4731H17.9056C18.0038 23.4731 18.0834 23.5635 18.0834 23.6751L18.0834 25.096C18.0834 25.2075 18.0038 25.298 17.9056 25.298H12.8535C12.7553 25.298 12.6756 25.2075 12.6756 25.096V24.0115L15.0422 20.8298C15.4491 20.2669 15.7311 19.8272 15.8882 19.5106C16.0524 19.1851 16.1345 18.8509 16.1345 18.5079C16.1345 18.1297 16.0488 17.8263 15.8775 17.5976C15.7061 17.369 15.4741 17.2546 15.1814 17.2546C14.8816 17.2546 14.6174 17.3909 14.389 17.6636C14.2022 17.8793 14.0512 18.1716 13.936 18.5402C13.8962 18.6675 13.7633 18.7261 13.6626 18.6543L12.7548 18.0069C12.6887 17.9597 12.657 17.8688 12.6798 17.7839C12.8713 17.0712 13.1948 16.521 13.6501 16.1332C14.1356 15.7111 14.696 15.5 15.3313 15.5C15.8311 15.5 16.263 15.6275 16.6271 15.8826C16.9983 16.1288 17.2803 16.4719 17.473 16.9116C17.6729 17.3514 17.7729 17.8527 17.7729 18.4156C17.7729 18.9697 17.6622 19.4886 17.4409 19.9723C17.2267 20.4472 16.8412 21.0673 16.2844 21.8325L15.1257 23.4731ZM7.26472 18.9072C7.14616 18.9826 7 18.8852 7 18.7309V17.3546C7 17.2845 7.03206 17.2193 7.08469 17.1825L9.35585 15.5962C9.38387 15.5766 9.41613 15.5662 9.44903 15.5662H10.6107C10.709 15.5662 10.7886 15.6567 10.7886 15.7683L10.7886 25.096C10.7886 25.2075 10.709 25.298 10.6107 25.298H9.21249C9.11425 25.298 9.03462 25.2075 9.03462 25.096V17.7823L7.26472 18.9072ZM24.6573 21.1992C24.4289 20.8034 24.0969 20.5044 23.6614 20.3021C24.0184 20.0998 24.2861 19.8184 24.4646 19.4578C24.6502 19.0972 24.743 18.6706 24.743 18.1781C24.743 17.6504 24.6395 17.1843 24.4324 16.7797C24.2254 16.3751 23.9327 16.0629 23.5543 15.843C23.1831 15.6143 22.7512 15.5 22.2586 15.5C21.6232 15.5 21.0735 15.6979 20.6095 16.0937C20.1765 16.4548 19.8647 16.969 19.6741 17.6365C19.6496 17.7223 19.6816 17.8152 19.749 17.8628L20.6169 18.4751C20.716 18.545 20.8462 18.4892 20.8887 18.3658C21.0022 18.0366 21.1483 17.7761 21.327 17.5844C21.5554 17.3382 21.8231 17.215 22.1301 17.215C22.4157 17.215 22.6477 17.3162 22.8262 17.5185C23.0046 17.7208 23.0939 17.989 23.0939 18.3232C23.0939 18.6838 22.9832 18.9872 22.7619 19.2335C22.5477 19.471 22.2372 19.5897 21.8303 19.5897H21.5905C21.4923 19.5897 21.4126 19.6802 21.4126 19.7917V20.9708C21.4126 21.0824 21.4923 21.1728 21.5905 21.1728H21.7018C22.8012 21.1728 23.3509 21.617 23.3509 22.5053C23.3509 22.9099 23.2402 23.2265 23.0189 23.4551C22.8047 23.6838 22.537 23.7982 22.2158 23.7982C21.8874 23.7982 21.5911 23.6838 21.327 23.4551C21.1142 23.2639 20.9501 23.0013 20.8346 22.6673C20.7913 22.5422 20.6593 22.4838 20.5588 22.5548L19.645 23.2009C19.5761 23.2496 19.5445 23.3454 19.5718 23.4322C19.7759 24.0807 20.1003 24.5809 20.5453 24.9327C21.0307 25.3109 21.5983 25.5 22.2479 25.5C22.7548 25.5 23.2152 25.3901 23.6293 25.1702C24.0505 24.9415 24.3825 24.6161 24.6252 24.1939C24.8751 23.763 25 23.2485 25 22.6504C25 22.0699 24.8858 21.5862 24.6573 21.1992Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

14
designer-base/src/main/resources/com/fine/theme/icon/previewSql.svg

@ -0,0 +1,14 @@
<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="M3 4C3 2.89543 3.89543 2 5 2H27C28.1046 2 29 2.89543 29 4V19L27 17.4782V4H5V28.5H16.5V30.5H5C3.89543 30.5 3 29.6046 3 28.5V4Z" fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M27.633 23.8064L28.8657 22.2315C29.5356 22.7558 30 23.5626 30 24.5C30 25.4374 29.5356 26.2442 28.8657 26.7685L27.633 25.1936C28.1223 24.8105 28.1223 24.1895 27.633 23.8064ZM27.633 23.8064L28.8657 22.2315L24.372 18.7143C23.3609 17.9229 22.1047 17.8668 21.1568 18.1741C20.2461 18.4694 19 19.3602 19 20.9828L19 28.0172C19 29.6398 20.2462 30.5306 21.1568 30.8259C22.1047 31.1332 23.3609 31.0771 24.372 30.2857L28.8657 26.7685L27.633 25.1936L23.1393 28.7107C22.3499 29.3287 21 28.891 21 28.0172L21 20.9828C21 20.109 22.3499 19.6713 23.1393 20.2893L27.633 23.8064Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M12.0019 9.14596C11.7009 9.14596 11.4666 8.90516 11.3069 8.65109C11.2241 8.51943 11.1122 8.40634 10.9711 8.31184C10.6767 8.11216 10.3063 8.01231 9.85971 8.01231C9.54 8.01231 9.26343 8.06287 9.02999 8.16397C8.79655 8.26255 8.61513 8.39904 8.48572 8.57345C8.35886 8.74533 8.29542 8.94122 8.29542 9.16112C8.29542 9.34564 8.33856 9.50488 8.42483 9.63884C8.51363 9.77281 8.62908 9.88529 8.77118 9.97628C8.91581 10.0647 9.07059 10.1393 9.23551 10.2C9.40044 10.2581 9.55903 10.3061 9.71127 10.344L10.4725 10.5412C10.7211 10.6019 10.9761 10.684 11.2375 10.7876C11.4988 10.8913 11.7412 11.0278 11.9645 11.1971C12.1877 11.3665 12.3679 11.5763 12.5049 11.8265C12.6445 12.0767 12.7142 12.3763 12.7142 12.7251C12.7142 13.1649 12.6001 13.5554 12.3717 13.8966C12.1459 14.2379 11.8173 14.5071 11.3859 14.7042C10.9571 14.9014 10.4382 14.9999 9.82926 14.9999C9.24566 14.9999 8.74073 14.9077 8.31445 14.7232C7.88817 14.5386 7.55451 14.277 7.31346 13.9383C7.18553 13.7572 7.08798 13.5583 7.02079 13.3416C6.91983 13.016 7.20139 12.7251 7.54353 12.7251C7.85432 12.7251 8.09329 12.9772 8.24376 13.248C8.27908 13.3116 8.32041 13.3711 8.36774 13.4265C8.53013 13.611 8.73692 13.7488 8.98812 13.8398C9.24186 13.9282 9.5197 13.9725 9.82165 13.9725C10.154 13.9725 10.4496 13.9206 10.7085 13.817C10.9698 13.7108 11.1753 13.5642 11.325 13.3772C11.4747 13.1876 11.5496 12.9665 11.5496 12.7137C11.5496 12.4837 11.4836 12.2954 11.3517 12.1488C11.2223 12.0022 11.0459 11.8808 10.8226 11.7848C10.6019 11.6887 10.352 11.6041 10.0728 11.5308L9.15178 11.2805C8.52759 11.1112 8.0328 10.8622 7.66742 10.5336C7.30458 10.205 7.12316 9.77028 7.12316 9.22937C7.12316 8.78198 7.24495 8.39146 7.48854 8.05781C7.73213 7.72416 8.06198 7.46508 8.47811 7.28057C8.89424 7.09352 9.36365 7 9.88635 7C10.4141 7 10.8797 7.09226 11.2832 7.27678C11.6891 7.46129 12.0089 7.71532 12.2423 8.03885C12.3583 8.19838 12.4467 8.36976 12.5076 8.553C12.6119 8.86715 12.334 9.14596 12.0019 9.14596Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M11.3859 14.7042L11.4171 14.7724C11.859 14.5704 12.1993 14.2929 12.434 13.9383C12.6712 13.5839 12.7892 13.1786 12.7892 12.7251C12.7892 12.3664 12.7175 12.0538 12.5706 11.7902C12.4286 11.531 12.2416 11.3132 12.0098 11.1374C11.7811 10.9639 11.5328 10.8241 11.2651 10.7179C11.0011 10.6132 10.7429 10.53 10.4908 10.4685L9.73008 10.2714L9.73008 10.2714L9.7294 10.2713C9.57985 10.234 9.4237 10.1868 9.26093 10.1294C9.10088 10.0705 8.95093 9.99825 8.81097 9.91271C8.67767 9.82722 8.57021 9.72227 8.48762 9.59782C8.41049 9.47787 8.37042 9.33337 8.37042 9.16112C8.37042 8.95679 8.42899 8.77665 8.54599 8.61809C8.66616 8.45615 8.83601 8.3273 9.05917 8.23306L9.05917 8.23307L9.0598 8.23279C9.28174 8.13667 9.54771 8.08731 9.85971 8.08731C10.2951 8.08731 10.6499 8.18458 10.929 8.3739L10.9293 8.37415C11.0625 8.46334 11.1667 8.56904 11.2434 8.69102C11.4054 8.94867 11.6592 9.22096 12.0019 9.22096C12.1884 9.22096 12.3615 9.14284 12.4742 9.01742C12.5881 8.89067 12.6404 8.71476 12.5788 8.52936C12.5155 8.33872 12.4235 8.16053 12.3031 7.99497C12.0612 7.65965 11.7306 7.39776 11.3142 7.2085L11.2832 7.27678L11.3144 7.20857C10.8995 7.01881 10.4229 6.925 9.88635 6.925C9.35466 6.925 8.8746 7.02015 8.44754 7.21208C8.02073 7.40136 7.68004 7.66831 7.42797 8.01359C7.17421 8.36116 7.04816 8.76747 7.04816 9.22937C7.04816 9.78898 7.23679 10.2448 7.61708 10.5892L7.61727 10.5894C7.9937 10.9279 8.50006 11.1814 9.13214 11.3529L10.0532 11.6031L10.0538 11.6033C10.3299 11.6758 10.5761 11.7593 10.7927 11.8536L10.793 11.8537C11.0085 11.9464 11.1749 12.0619 11.2954 12.1984L11.2954 12.1984L11.2959 12.1989C11.4135 12.3295 11.4746 12.4989 11.4746 12.7137C11.4746 12.9504 11.405 13.1549 11.2663 13.3305C11.126 13.5058 10.9318 13.6453 10.6804 13.7474C10.4321 13.8469 10.1462 13.8975 9.82165 13.8975C9.52726 13.8975 9.25802 13.8544 9.01326 13.7691C8.77323 13.6821 8.57761 13.5513 8.4244 13.3774C8.38046 13.3259 8.34212 13.2707 8.30933 13.2116C8.15568 12.935 7.89736 12.6501 7.54353 12.6501C7.35157 12.6501 7.17502 12.7316 7.05987 12.8615C6.94376 12.9925 6.89014 13.1735 6.94916 13.3639C7.01862 13.5879 7.11963 13.7939 7.2522 13.9816L7.25236 13.9818C7.50224 14.3329 7.84734 14.6027 8.28466 14.792C8.72242 14.9815 9.23796 15.0749 9.82926 15.0749C10.446 15.0749 10.9762 14.9751 11.4173 14.7723L11.3859 14.7042ZM11.3859 14.7042C11.8173 14.5071 12.1459 14.2379 12.3717 13.8966L8.36774 13.4265C8.32041 13.3711 8.27908 13.3116 8.24376 13.248C8.09329 12.9772 7.85432 12.7251 7.54353 12.7251C7.20139 12.7251 6.91983 13.016 7.02079 13.3416C7.08798 13.5583 7.18553 13.7572 7.31346 13.9383C7.55451 14.277 7.88817 14.5386 8.31445 14.7232C8.74073 14.9077 9.24566 14.9999 9.82926 14.9999C10.4382 14.9999 10.9571 14.9014 11.3859 14.7042Z" stroke="#0A1C38" stroke-opacity="0.9" stroke-width="0.15"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.2857 12.4002C17.8176 12.7768 17.146 13 16.5155 13C14.9685 13 13.7144 11.6569 13.7144 10C13.7144 8.34316 14.9685 7.00001 16.5155 7.00001C17.146 7.00001 17.8176 7.24461 18.2857 7.62122V7.57143C18.2857 7.25582 18.5416 6.99997 18.8572 7C19.1728 7.00003 19.4286 7.25586 19.4286 7.57143V14.4286C19.4286 14.7442 19.1728 15 18.8572 15C18.5416 15 18.2857 14.7442 18.2857 14.4286V12.4002ZM18.1961 10C18.1961 11.1046 17.4437 12 16.5155 12C15.5873 12 14.8348 11.1046 14.8348 10C14.8348 8.89544 15.5873 8.00001 16.5155 8.00001C17.4437 8.00001 18.1961 8.89544 18.1961 10Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M16.5155 13.085C17.1043 13.085 17.7282 12.8963 18.2007 12.5696V14.4286C18.2007 14.7911 18.4946 15.085 18.8572 15.085C19.2197 15.085 19.5136 14.7911 19.5136 14.4286V7.57143C19.5136 7.20892 19.2197 6.91503 18.8572 6.915C18.5333 6.91497 18.2641 7.14961 18.2105 7.45821C17.738 7.12516 17.11 6.91501 16.5155 6.91501C14.9161 6.91501 13.6294 8.3018 13.6294 10C13.6294 11.6982 14.9161 13.085 16.5155 13.085ZM18.1111 10C18.1111 11.0721 17.3835 11.915 16.5155 11.915C15.6474 11.915 14.9198 11.0721 14.9198 10C14.9198 8.92793 15.6474 8.08501 16.5155 8.08501C17.3835 8.08501 18.1111 8.92793 18.1111 10Z" stroke="#0A1C38" stroke-opacity="0.9" stroke-width="0.17"/>
<mask id="path-7-outside-1_8063_191727" maskUnits="userSpaceOnUse" x="20.2095" y="6" width="6" height="10" fill="black">
<rect fill="white" x="20.2095" y="6" width="6" height="10"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.2485 7.51948C22.2485 7.23258 22.0159 7 21.7291 7C21.4422 7 21.2096 7.23258 21.2096 7.51948V14.3143C21.2095 14.3177 21.2095 14.3212 21.2095 14.3247C21.2095 14.6116 21.4421 14.8441 21.7289 14.8441H25.2614C25.5483 14.8441 25.7809 14.6116 25.7809 14.3247C25.7809 14.0378 25.5483 13.8052 25.2614 13.8052H22.2485V7.51948Z"/>
</mask>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.2485 7.51948C22.2485 7.23258 22.0159 7 21.7291 7C21.4422 7 21.2096 7.23258 21.2096 7.51948V14.3143C21.2095 14.3177 21.2095 14.3212 21.2095 14.3247C21.2095 14.6116 21.4421 14.8441 21.7289 14.8441H25.2614C25.5483 14.8441 25.7809 14.6116 25.7809 14.3247C25.7809 14.0378 25.5483 13.8052 25.2614 13.8052H22.2485V7.51948Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M21.2096 14.3143L21.3796 14.3176V14.3143H21.2096ZM22.2485 13.8052H22.0785V13.9752H22.2485V13.8052ZM21.7291 7.17C21.9221 7.17 22.0785 7.32647 22.0785 7.51948H22.4185C22.4185 7.13869 22.1098 6.83 21.7291 6.83V7.17ZM21.3796 7.51948C21.3796 7.32647 21.536 7.17 21.7291 7.17V6.83C21.3483 6.83 21.0396 7.13869 21.0396 7.51948H21.3796ZM21.3796 14.3143V7.51948H21.0396V14.3143H21.3796ZM21.3795 14.3247C21.3795 14.3223 21.3795 14.32 21.3795 14.3176L21.0396 14.311C21.0395 14.3155 21.0395 14.3201 21.0395 14.3247H21.3795ZM21.7289 14.6741C21.5359 14.6741 21.3795 14.5177 21.3795 14.3247H21.0395C21.0395 14.7055 21.3482 15.0141 21.7289 15.0141V14.6741ZM25.2614 14.6741H21.7289V15.0141H25.2614V14.6741ZM25.6109 14.3247C25.6109 14.5177 25.4544 14.6741 25.2614 14.6741V15.0141C25.6422 15.0141 25.9509 14.7055 25.9509 14.3247H25.6109ZM25.2614 13.9752C25.4544 13.9752 25.6109 14.1317 25.6109 14.3247H25.9509C25.9509 13.9439 25.6422 13.6352 25.2614 13.6352V13.9752ZM22.2485 13.9752H25.2614V13.6352H22.2485V13.9752ZM22.0785 7.51948V13.8052H22.4185V7.51948H22.0785Z" fill="#0A1C38" fill-opacity="0.9" mask="url(#path-7-outside-1_8063_191727)"/>
</svg>

After

Width:  |  Height:  |  Size: 8.9 KiB

8
designer-base/src/main/resources/com/fine/theme/icon/tables.svg

@ -0,0 +1,8 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M2 28V4.5C2 3.94772 2.44772 3.5 3 3.5H22.5858C22.851 3.5 23.1054 3.60536 23.2929 3.79289L28.2071 8.70711C28.3946 8.89464 28.5 9.149 28.5 9.41421V28C28.5 28.5523 28.0523 29 27.5 29H3C2.44772 29 2 28.5523 2 28Z" fill="#5493F2"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.2998 4.00005C1.2998 3.06116 2.06092 2.30005 2.9998 2.30005H23.0599C23.5364 2.30005 23.9911 2.50005 24.3131 2.85132L29.253 8.2403C29.5404 8.55383 29.6998 8.96371 29.6998 9.38903V28.5C29.6998 29.4389 28.9387 30.2001 27.9998 30.2001H2.9998C2.06092 30.2001 1.2998 29.4389 1.2998 28.5V4.00005ZM2.9998 3.70005C2.83412 3.70005 2.6998 3.83436 2.6998 4.00005V28.5C2.6998 28.6657 2.83412 28.8 2.9998 28.8H27.9998C28.1655 28.8 28.2998 28.6657 28.2998 28.5V9.38903C28.2998 9.31397 28.2717 9.24164 28.221 9.18632L23.281 3.79733C23.2242 3.73534 23.144 3.70005 23.0599 3.70005H2.9998Z" fill="#105DD1"/>
<rect x="7" y="14" width="17" height="5" fill="#B3CFF9"/>
<rect x="7" y="20" width="6" height="5" fill="#B3CFF9"/>
<rect x="13" y="20" width="11" height="5" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.4 14.4V19H12V14.4H7.4ZM13.4 14.4V19H23.6V14.4H13.4ZM12 20.4H7.4V24.6H12V20.4ZM13.4 24.6V20.4H23.6V24.6H13.4ZM13.4 26H12H7C6.44771 26 6 25.5523 6 25V20.4V19V14C6 13.4477 6.44772 13 7 13H24C24.5523 13 25 13.4477 25 14V25C25 25.5523 24.5523 26 24 26H13.4Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

3
designer-base/src/main/resources/com/fine/theme/icon/time.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.31253 13.2667C5.5496 7.95624 10.3127 4 15.9999 4C22.6273 4 27.9999 9.37258 27.9999 16C27.9999 22.6274 22.6273 28 15.9999 28C12.7692 28 9.83665 26.7233 7.67932 24.6469L11.0842 21.6605L2.25293 18.6636C3.49688 25.1217 9.17867 30 15.9999 30C23.7318 30 29.9999 23.732 29.9999 16C29.9999 8.26801 23.7318 2 15.9999 2C9.30602 2 3.70943 6.69783 2.32722 12.9763C2.19558 13.5743 2.67012 14.1156 3.28241 14.1156C3.78026 14.1156 4.19958 13.7516 4.31253 13.2667ZM14.9999 17L14.9999 8C14.9999 7.44771 14.5521 7 13.9999 7C13.4476 7 12.9999 7.44771 12.9999 8L12.9999 17.9976V18C12.9999 18.5501 13.4441 18.9965 13.9934 19L13.9999 19L22.9999 19C23.5521 19 23.9999 18.5523 23.9999 18C23.9999 17.4477 23.5521 17 22.9999 17L14.9999 17Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 906 B

11
designer-base/src/main/resources/com/fine/theme/icon/views.svg

@ -0,0 +1,11 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 11H10V29H3V11Z" fill="#5493F2"/>
<path d="M3 10H10V15H3V10Z" fill="#B3CFF9"/>
<path d="M2 14H11V15.4H2V14Z" fill="#105DD1"/>
<path d="M22 4H29V22H22V4Z" fill="#5493F2"/>
<path d="M22 3H29V8H22V3Z" fill="#B3CFF9"/>
<path d="M21 7H30V8.4H21V7Z" fill="#105DD1"/>
<rect x="10" y="21.994" width="17" height="1.4" transform="rotate(-49.8493 10 21.994)" fill="#105DD1"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.49961 8.59998H9.49961C10.549 8.59998 11.3996 9.45063 11.3996 10.5V28.5C11.3996 29.5493 10.549 30.4 9.49961 30.4H3.49961C2.45027 30.4 1.59961 29.5493 1.59961 28.5V10.5C1.59961 9.45064 2.45027 8.59998 3.49961 8.59998ZM3.49961 9.99998C3.22347 9.99998 2.99961 10.2238 2.99961 10.5V28.5C2.99961 28.7761 3.22347 29 3.49961 29H9.49961C9.77575 29 9.99961 28.7761 9.99961 28.5V10.5C9.99961 10.2238 9.77575 9.99998 9.49961 9.99998H3.49961Z" fill="#105DD1"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.4996 1.59998H28.4996C29.549 1.59998 30.3996 2.45063 30.3996 3.49998V21.5C30.3996 22.5493 29.549 23.4 28.4996 23.4H22.4996C21.4503 23.4 20.5996 22.5493 20.5996 21.5V3.49998C20.5996 2.45064 21.4503 1.59998 22.4996 1.59998ZM22.4996 2.99998C22.2235 2.99998 21.9996 3.22383 21.9996 3.49998V21.5C21.9996 21.7761 22.2235 22 22.4996 22H28.4996C28.7758 22 28.9996 21.7761 28.9996 21.5V3.49998C28.9996 3.22383 28.7758 2.99998 28.4996 2.99998H22.4996Z" fill="#105DD1"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

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

@ -23,6 +23,13 @@
"up_arrow": "up_arrow.svg",
"select": "select.svg",
"recycle": "recycle.svg",
"time": "time.svg",
"logo": "logo.svg",
"pages": "pages.svg",
"digitalPlatform": "digitalPlatform.svg",
"tables": "tables.svg",
"views": "views.svg",
"preview_sql": "previewSql.svg",
"database": "dataset/database.svg",
"preview": "dataset/preview.svg",
"connection": "dataset/connection.svg",
@ -46,6 +53,7 @@
"minus": "filetree/minus.svg",
"plus": "filetree/plus.svg",
"locate": "filetree/locate.svg",
"locate_disable": "filetree/locate_disable.svg",
"rename": "filetree/rename.svg",
"collapse_all": "filetree/collapse_all.svg",
"vcs_list": "filetree/vcs_list.svg",

BIN
designer-base/src/main/resources/com/fr/design/images/data/hyperlink.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 B

11
designer-base/src/main/resources/com/fr/design/images/data/hyperlink.svg

@ -0,0 +1,11 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_5338_73074)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5064 9.60648C19.8969 9.21596 19.8969 8.58279 19.5064 8.19227L15.9708 4.65673C12.8466 1.53254 7.7813 1.53254 4.65711 4.65673C1.53292 7.78093 1.53292 12.8462 4.65711 15.9704L8.19264 19.506C8.58317 19.8965 9.21633 19.8965 9.60686 19.506C9.99738 19.1154 9.99738 18.4823 9.60686 18.0918L6.07132 14.5562C3.72818 12.2131 3.72818 8.41409 6.07132 6.07095C8.41447 3.7278 12.2135 3.7278 14.5566 6.07095L18.0921 9.60648C18.4827 9.997 19.1158 9.997 19.5064 9.60648ZM12.4353 22.3344C12.8258 21.9439 13.459 21.9439 13.8495 22.3344L17.385 25.8699C19.7282 28.2131 23.5272 28.2131 25.8703 25.8699C28.2135 23.5268 28.2135 19.7278 25.8703 17.3847L22.3348 13.8491C21.9443 13.4586 21.9443 12.8254 22.3348 12.4349C22.7253 12.0444 23.3585 12.0444 23.749 12.4349L27.2845 15.9704C30.4087 19.0946 30.4087 24.16 27.2845 27.2841C24.1603 30.4083 19.095 30.4083 15.9708 27.2841L12.4353 23.7486C12.0448 23.3581 12.0448 22.7249 12.4353 22.3344Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M10.3432 10.3432C10.7337 9.95263 11.3669 9.95263 11.7574 10.3432L21.6569 20.2426C22.0474 20.6332 22.0474 21.2663 21.6569 21.6569C21.2664 22.0474 20.6332 22.0474 20.2427 21.6569L10.3432 11.7574C9.95266 11.3668 9.95266 10.7337 10.3432 10.3432Z" fill="#0A1C38" fill-opacity="0.9"/>
</g>
<defs>
<clipPath id="clip0_5338_73074">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/data/user_widget.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 774 B

10
designer-base/src/main/resources/com/fr/design/images/data/user_widget.svg

@ -0,0 +1,10 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_5516_63505)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M30 16C30 23.732 23.732 30 16 30C8.26801 30 2 23.732 2 16C2 8.26801 8.26801 2 16 2C23.732 2 30 8.26801 30 16ZM32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16ZM8 24.3492C8 24.6254 8.22386 24.8492 8.5 24.8492H10.8284L22.412 13.2657L19.5836 10.4372L8 22.0208V24.3492ZM24.2635 11.4142L23.8262 11.8514L20.9978 9.02302L21.435 8.58579C22.2161 7.80474 23.4824 7.80474 24.2635 8.58579C25.0445 9.36684 25.0445 10.6332 24.2635 11.4142Z" fill="#0A1C38" fill-opacity="0.9"/>
</g>
<defs>
<clipPath id="clip0_5516_63505">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 826 B

14
designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg

@ -1,10 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="15px" height="15px" viewBox="0 0 15 15" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>高级编辑</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="高级编辑" fill-rule="nonzero">
<path d="M13.8797,5.91875 C13.5781,5.91875 13.3328,6.16406 13.3328,6.46562 L13.3328,10.6375 L3.87502,10.6375 L3.87502,2.17188 L7.23596,2.17188 C7.53752,2.17188 7.78284,1.92656 7.78284,1.625 C7.78284,1.32344 7.53752,1.07812 7.23596,1.07812 L3.32815,1.07812 C3.02659,1.07812 2.78127,1.32344 2.78127,1.625 L2.78127,3.73594 L1.50159,3.73594 C1.20002,3.73594 0.954712,3.98125 0.954712,4.28281 L0.954712,13.5031 C0.954712,13.8047 1.20002,14.05 1.50159,14.05 L12.0547,14.05 C12.3563,14.05 12.6016,13.8047 12.6016,13.5031 L12.6016,11.7312 L13.8813,11.7312 C14.1828,11.7312 14.4282,11.4859 14.4282,11.1844 L14.4282,6.46562 C14.4266,6.16406 14.1813,5.91875 13.8797,5.91875 Z M11.5063,12.9578 L2.04846,12.9578 L2.04846,4.83125 L2.78127,4.83125 L2.78127,11.1844 C2.78127,11.4859 3.02659,11.7312 3.32815,11.7312 L11.5063,11.7312 L11.5063,12.9578 Z" id="形状" fill="#333334"></path>
<path d="M6.35444,5.79122 C6.34516,5.80296 6.33589,5.81533 6.33172,5.83022 L5.61566,8.44127 C5.57391,8.59329 5.61668,8.7571 5.72983,8.87257 C5.81446,8.9548 5.92597,9 6.04474,9 C6.08396,9 6.12326,8.99533 6.16194,8.98511 L8.76858,8.27801 C8.77277,8.27801 8.77479,8.28165 8.77794,8.28165 C8.80789,8.28165 8.83731,8.27081 8.85952,8.24823 L14.2794,2.80158 C14.4864,2.59539 14.6,2.31452 14.6,2.00894 C14.6,1.66268 14.4523,1.31656 14.1937,1.06006 L13.5355,0.40431 C13.2773,0.14713 12.9288,0 12.5808,0 C12.2736,0 11.9912,0.11295 11.7837,0.31861 L6.36482,5.76711 C6.35758,5.77373 6.35961,5.78352 6.35444,5.79122 Z M13.5974,2.12274 L12.905,2.81081 L11.7827,1.67681 L12.4652,0.99796 C12.573,0.89011 12.7822,0.90584 12.9061,1.02954 L13.5648,1.68529 C13.6335,1.75355 13.6727,1.84442 13.6727,1.93427 C13.6723,2.00792 13.6459,2.07475 13.5974,2.12274 Z M7.59405,5.90013 L11.0733,2.38229 L12.1962,3.51705 L8.72632,7.02506 L7.59405,5.90013 Z M6.67769,7.92832 L7.04115,6.60144 L8.01068,7.56581 L6.67769,7.92832 Z" id="形状" fill="#2F8EF1"></path>
</g>
</g>
</svg>
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M29.0353 2.70388C28.429 2.09756 27.446 2.09757 26.8397 2.70389L14.4417 15.1019L13.2902 18.449L16.6374 17.2975L29.0353 4.89956C29.6417 4.29324 29.6417 3.3102 29.0353 2.70388Z" fill="#0A1C38" fill-opacity="0.9"/>
<path d="M6 2.99997H22.1733L20.1733 4.99997H6L6 28H26V11.8899L28 9.88986V28C28 29.1045 27.1046 30 26 30H6C4.89543 30 4 29.1045 4 28V4.99997C4 3.8954 4.89543 2.99997 6 2.99997Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 536 B

3
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/bold.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="M8.7 14.8828V6.2H15.9561C18.3552 6.2 20.3 8.14483 20.3 10.5439C20.3 12.872 18.4685 14.7724 16.1677 14.8828H8.7ZM6.5 14.8828V5.03226C6.5 4.46216 6.96216 4 7.53226 4H15.9561C19.5702 4 22.5 6.92981 22.5 10.5439C22.5 12.3184 21.7937 13.9279 20.6469 15.1067C23.4422 15.8574 25.5 18.4091 25.5 21.4414C25.5 25.0636 22.5636 28 18.9414 28H7.61765C7.00039 28 6.5 27.4996 6.5 26.8823V17.0878V14.8828ZM8.7 17.0878V25.8H18.9414C21.3486 25.8 23.3 23.8486 23.3 21.4414C23.3 19.0342 21.3486 17.0828 18.9414 17.0828H16.2159C16.1297 17.0861 16.0431 17.0878 15.9561 17.0878H8.7Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 749 B

3
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/italic.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="M13 6.1C13 5.49249 13.4925 5 14.1 5H24.9C25.5075 5 26 5.49249 26 6.1C26 6.70751 25.5075 7.2 24.9 7.2H20.7248L14.1248 24.8001H17.9C18.5075 24.8001 19 25.2925 19 25.9001C19 26.5076 18.5075 27.0001 17.9 27.0001H7.1C6.49249 27.0001 6 26.5076 6 25.9001C6 25.2925 6.49249 24.8001 7.1 24.8001H11.7752L18.3752 7.2H14.1C13.4925 7.2 13 6.70751 13 6.1Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 531 B

BIN
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_bold.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

BIN
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_italic.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

BIN
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/new_underline.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

3
designer-base/src/main/resources/com/fr/design/images/m_format/cellstyle/underline.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="M9.5 4C9.5 3.44772 9.05228 3 8.5 3C7.94772 3 7.5 3.44772 7.5 4V15.5C7.5 20.1944 11.3056 24 16 24C20.6944 24 24.5 20.1944 24.5 15.5V4C24.5 3.44772 24.0523 3 23.5 3C22.9477 3 22.5 3.44772 22.5 4V15.5C22.5 19.0899 19.5899 22 16 22C12.4101 22 9.5 19.0899 9.5 15.5V4ZM6.1 26C5.49249 26 5 26.4925 5 27.1C5 27.7075 5.49249 28.2 6.1 28.2H25.9C26.5075 28.2 27 27.7075 27 27.1C27 26.4925 26.5075 26 25.9 26H6.1Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 591 B

BIN
designer-base/src/main/resources/com/fr/design/images/server/global_param.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

10
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java

@ -17,6 +17,9 @@ import java.awt.Dimension;
import java.util.HashMap;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2011-12-28 下午02:51:10
@ -46,7 +49,6 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
}
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
this.add(centerPane, BorderLayout.CENTER);
centerPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Cell")));
@ -57,8 +59,10 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(500, 200));
this.add(parameterViewPane, BorderLayout.SOUTH);
this.add(column(
cell(centerPane).weight(0.2),
cell(parameterViewPane).weight(0.8)
).getComponent());
}
protected void addPaneInCenter(JPanel centerPane) {

41
designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java

@ -1,5 +1,6 @@
package com.fr.design.module;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fr.base.BaseUtils;
import com.fr.base.ChartEmptyDataStyleConf;
import com.fr.base.Style;
@ -26,21 +27,23 @@ import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.SwingWorker;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by mengao on 2017/11/23.
*/
public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
private static final int WIDTH = 150;
private static final int HEIGHT = 20;
private static final int HEIGHT = 26;
private static final int FIVE = 5;
private static final int TEN = 10;
private static final int THIRTY = 30;
@ -75,6 +78,17 @@ public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
}
private JPanel creatNorthPane() {
initEmptyData();
initImageData();
UILabel promptContent = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Tip_Content"));
imageContent = new UILabel(Toolkit.i18nText("Fine-Design_Report_Image"));
return row(20,
row(10, cell(promptContent), cell(emptyData), fix(10), cell(imageContent), cell(imageData))
).getComponent();
}
private void initEmptyData() {
emptyData = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Open"), Toolkit.i18nText("Fine-Design_Chart_Close")});
emptyData.setSelectedIndex(0);
emptyData.setPreferredSize(new Dimension(WIDTH, HEIGHT));
@ -85,7 +99,9 @@ public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
repaintPreviewPane();
}
});
}
private void initImageData() {
imageData = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Mode_Auto"), Toolkit.i18nText("Fine-Design_Chart_Mode_Custom")});
imageData.setSelectedIndex(0);
imageData.setPreferredSize(new Dimension(WIDTH, HEIGHT));
@ -97,26 +113,19 @@ public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
repaintPreviewPane();
}
});
UILabel promptContent = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Tip_Content"));
imageContent = new UILabel(Toolkit.i18nText("Fine-Design_Report_Image"));
JPanel emptyPane = GUICoreUtils.createFlowPane(new Component[]{promptContent, emptyData}, FlowLayout.LEFT, TEN, 0);
JPanel imagePane = GUICoreUtils.createFlowPane(new Component[]{imageContent, imageData}, FlowLayout.LEFT, TEN, 0);
imagePane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
JPanel northPane = GUICoreUtils.createFlowPane(new Component[]{emptyPane, imagePane}, FlowLayout.LEFT, 0, 0);
northPane.setBorder(BorderFactory.createEmptyBorder(0, FIVE, 0, 0));
return northPane;
}
private JPanel creatCenterPane() {
JPanel centerPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
// preview pane
JPanel previewContainerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel previewContainerPane = new JPanel(new BorderLayout());
centerPane.add(previewContainerPane, BorderLayout.CENTER);
centerPane.add(new UILabel((Toolkit.i18nText("Fine-Design_Basic_Preview"))), BorderLayout.NORTH);
JPanel previewOwnerPane = new JPanel(new BorderLayout());
previewOwnerPane.setBorder(new FineRoundBorder());
JPanel previewOwnerPane = FRGUIPaneFactory.createTitledBorderPane(Toolkit.i18nText("Fine-Design_Basic_Preview"));
previewOwnerPane.setLayout(new BorderLayout());
previewContainerPane.add(previewOwnerPane, BorderLayout.CENTER);
previewContainerPane.add(initSelectFilePane(), BorderLayout.EAST);
previewPane = new ImagePreviewPane();
@ -133,7 +142,7 @@ public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
JPanel selectFilePane = FRGUIPaneFactory.createBorderLayout_L_Pane();
selectFilePane.setBorder(BorderFactory.createEmptyBorder(TEN, FIVE, 0, THIRTY));
selectFilePane.setBorder(BorderFactory.createEmptyBorder(0, FIVE, 0, THIRTY));
defaultRadioButton = new UIRadioButton(Toolkit.i18nText("Fine-Design_Report_Default"));
adjustRadioButton = new UIRadioButton(Toolkit.i18nText("Fine-Design_Report_Image_Adjust"));

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

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

33
designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java

@ -25,6 +25,11 @@ import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* 预定义的图表配色界面.
@ -50,35 +55,29 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
}
private void initComponents() {
JPanel customPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
groupButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Custom_Color"), Toolkit.i18nText("Fine-Design_Chart_Gradient_Color")});
groupButton.setSelectedIndex(0);
customPane.add(groupButton, BorderLayout.NORTH);
changeColorSetPane = new JPanel(cardLayout = new CardLayout());
changeColorSetPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
changeColorSetPane.add(colorGradient = new FixedGradientBarNoTheme(4, 150), "gradient");
changeColorSetPane.add(colorAdjustPane = new ColorAdjustPane(), "acc");
cardLayout.show(changeColorSetPane, "acc");
customPane.add(changeColorSetPane, BorderLayout.CENTER);
customPane.setPreferredSize(new Dimension(155, 300));
colorGradient.setPreferredSize(new Dimension(155, 30));
colorGradient.getSelectColorPointBtnP1().setColorInner(Color.WHITE);
colorGradient.getSelectColorPointBtnP2().setColorInner(FixedGradientBar.NEW_CHARACTER);
double p = TableLayout.PREFERRED;
double[] columnSize = {p, p};
double[] rowSize = {p, p, p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color_Match")), null},
new Component[]{null, customPane},
};
this.setLayout(new BorderLayout());
this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.WEST);
this.add(column(
10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color_Match"))),
row(
cell(groupButton).weight(0.1),
flex(0.2)
),
cell(changeColorSetPane)
).getComponent());
}
private void initListener() {

21
designer-chart/src/main/java/com/fr/design/module/ChartPreStylePane.java

@ -10,6 +10,7 @@ import com.fr.design.chart.gui.ChartComponent;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import javax.swing.JPanel;
@ -19,6 +20,9 @@ import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
/**
* 图表预定义风格界面, 服务器--图表风格.
* @author kunsnat E-mail:kunsnat@gmail.com
@ -45,19 +49,24 @@ public class ChartPreStylePane extends BasicBeanPane<ChartColorMatching> {
boxPane.add(pane, BorderLayout.SOUTH);
boxPane.add(fillStylePane, BorderLayout.CENTER);
this.add(boxPane, BorderLayout.CENTER);
ChartCollection cc = new ChartCollection();
demoPlot = new Bar2DPlot();
cc.addChart(new Chart(demoPlot));
chartComponent = new ChartComponent();
chartComponent.populate(cc);
chartComponent.setPreferredSize(new Dimension(400, 300));
chartComponent.setPreferredSize(new Dimension(441, 356));
chartComponent.setSupportEdit(false);
this.add(chartComponent, BorderLayout.SOUTH);
this.add(column(
20,
cell(fillStylePane),
column(
10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Preview"))),
cell(chartComponent)
)
).getComponent());
initListener(ChartPreStylePane.this);
}

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

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

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

@ -286,7 +286,6 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
*/
private JPanel createCategoryStylePane() {
categoryStylePane = new JPanel(new BorderLayout());
// categoryStylePane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
return categoryStylePane;
}

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

@ -14,8 +14,9 @@ import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import static com.fine.swing.ui.layout.Layouts.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* Created by hufan on 2017/1/12.

179
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java

@ -1,5 +1,6 @@
package com.fr.design.actions.replace.ui;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.svg.IconUtils;
import com.fr.design.actions.replace.action.setting.SettingContent;
import com.fr.design.actions.replace.action.setting.SettingController;
@ -7,7 +8,6 @@ import com.fr.design.data.datapane.TableDataComboBox;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
@ -15,15 +15,12 @@ import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.ComboBoxEditor;
import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.ScrollPaneConstants;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
@ -32,6 +29,11 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
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;
/**
* 上面板
*
@ -55,8 +57,8 @@ public class ITReplaceNorthPanel {
private UILabel iconLabel;
private UIComboBox findInputCombobox;
private UIComboBox replaceInputCombobox;
private UIScrollPane contentScrollPane;
private UIScrollPane settingScrollPane;
private JPanel contentScrollPane;
private JPanel settingScrollPane;
private UIButton replaceButton;
private UIButton searchButton;
@ -157,6 +159,7 @@ public class ITReplaceNorthPanel {
public ITReplaceNorthPanel() {
cardLayout = new CardLayout();
cardPanel = new JPanel(cardLayout);
cardPanel.setBorder(new ScaledEmptyBorder(20, 20, 20, 20));
upContentPanel = new JPanel(null);
upSettingPanel = new JPanel(null);
@ -191,6 +194,12 @@ public class ITReplaceNorthPanel {
super.setEditor(new ITComboBoxEditor());
}
};
initButton();
initUpContentPanel();
contentScrollPane = cell(upContentPanel).getComponent();
}
private void initButton() {
matchRadioButton = new UICheckBox(Toolkit.i18nText("Fine-Design_Replace_WildCard"));
matchRadioButton.addActionListener(new ActionListener() {
@Override
@ -198,23 +207,22 @@ public class ITReplaceNorthPanel {
ITReplaceMainDialog.setMatched(matchRadioButton.isSelected());
}
});
replaceButton = new UIButton(Toolkit.i18nText("Fine-Design_Replace_Button"));
searchButton = new UIButton(Toolkit.i18nText("Fine-Design_Search_Button"));
upContentPanel.setPreferredSize(new Dimension(LIMIT_WIDTH, HEIGHT));
contentScrollPane = new UIScrollPane(upContentPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
upContentPanel.add(findLabel);
upContentPanel.add(rangeLabel);
upContentPanel.add(resultLabel);
upContentPanel.add(findCombobox);
upContentPanel.add(rangeCombobox);
upContentPanel.add(findInputCombobox);
upContentPanel.add(replaceInputCombobox);
upContentPanel.add(matchRadioButton);
upContentPanel.add(replaceButton);
upContentPanel.add(searchButton);
upContentPanel.add(iconLabel);
contentScrollPane.setBorder(BorderFactory.createEmptyBorder());
}
private void initUpContentPanel() {
upContentPanel = column(10,
row(row(cell(findLabel).weight(0.1), cell(findCombobox).weight(0.5)).weight(0.45), flex(0.1),
row(cell(rangeLabel).weight(0.1), cell(rangeCombobox).weight(0.5)).weight(0.45)
),
row(cell(findInputCombobox).weight(0.45),
row(flex(0.2), cell(iconLabel).weight(0.6), flex(0.2)).weight(0.1),
cell(replaceInputCombobox).weight(0.45)
),
cell(matchRadioButton),
row(5, row(cell(resultLabel)), flex(), row(5, cell(searchButton), cell(replaceButton)))
).getComponent();
}
/**
@ -224,6 +232,19 @@ public class ITReplaceNorthPanel {
findSettingLabel = new UILabel(Toolkit.i18nText("Fine-Design_Replace_Search_Element"));
rangeSettingLabel = new UILabel(Toolkit.i18nText("Fine-Design_Replace_Search_Range"));
settingResultLabel = new UILabel();
initComboBox();
updateSettingPlaceholder(SettingContent.CELL_FORMAT_NAME);
iconSettingLabel = new UILabel(CHANGE_ICON);
searchSettingButton = new UIButton(Toolkit.i18nText("Fine-Design_Search_Button"));
replaceSettingButton = new UIButton(Toolkit.i18nText("Fine-Design_Replace_Button"));
replaceSettingButton.setEnabled(false);
initUpSettingPanel();
settingScrollPane = cell(upSettingPanel).getComponent();
initListener();
}
private void initComboBox() {
findSettingComboBox = new UIComboBox(findSettingItems.toArray());
rangeSettingComboBox = new UIComboBox(RANGE_ITEMS);
findSettingInputComboBox = new UIComboBox(formatItems.toArray()) {
@ -241,40 +262,100 @@ public class ITReplaceNorthPanel {
};
replaceSettingInputComboBox.setSelectedIndex(-1);
updateSettingPlaceholder(SettingContent.CELL_FORMAT_NAME);
findSettingInputComboBox.setEditable(true);
((UITextField) (findSettingInputComboBox.getEditor().getEditorComponent())).setEditable(false);
replaceSettingInputComboBox.setEditable(true);
((UITextField) (replaceSettingInputComboBox.getEditor().getEditorComponent())).setEditable(false);
iconSettingLabel = new UILabel(CHANGE_ICON);
findExtraSettingComboBox = new UIComboBox(groupItems.toArray());
findExtraSettingComboBox.setVisible(false);
replaceExtraSettingComboBox = new UIComboBox(groupItems.toArray());
replaceExtraSettingComboBox.setVisible(false);
searchSettingButton = new UIButton(Toolkit.i18nText("Fine-Design_Search_Button"));
replaceSettingButton = new UIButton(Toolkit.i18nText("Fine-Design_Replace_Button"));
replaceSettingButton.setEnabled(false);
upSettingPanel.setPreferredSize(new Dimension(LIMIT_WIDTH, HEIGHT));
upSettingPanel.add(findSettingLabel);
upSettingPanel.add(rangeSettingLabel);
upSettingPanel.add(findSettingComboBox);
upSettingPanel.add(rangeSettingComboBox);
upSettingPanel.add(findSettingInputComboBox);
upSettingPanel.add(replaceSettingInputComboBox);
upSettingPanel.add(iconSettingLabel);
upSettingPanel.add(findExtraSettingComboBox);
upSettingPanel.add(replaceExtraSettingComboBox);
upSettingPanel.add(searchSettingButton);
upSettingPanel.add(replaceSettingButton);
upSettingPanel.add(settingResultLabel);
settingScrollPane = new UIScrollPane(upSettingPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
settingScrollPane.setBorder(BorderFactory.createEmptyBorder());
}
initListener();
private void initUpSettingPanel() {
upSettingPanel = column(10,
cell(buildFirstLine()),
cell(buildSecondLine()),
row(
cell(findExtraSettingComboBox).weight(0.45),
flex(0.1),
cell(replaceExtraSettingComboBox).weight(0.45)
),
row(
5,
row(cell(settingResultLabel)),
flex(),
row(
5,
cell(searchSettingButton),
cell(replaceSettingButton)
)
)
).getComponent();
}
private JPanel buildFirstLine() {
return row(
row(
5,
cell(findSettingLabel).weight(0.1),
cell(findSettingComboBox).weight(0.5)
).weight(0.45),
flex(0.1),
row(
5,
cell(rangeSettingLabel).weight(0.1),
cell(rangeSettingComboBox).weight(0.5)
).weight(0.45)).getComponent();
}
private JPanel buildSecondLine() {
return row(
cell(findSettingInputComboBox).weight(0.45),
row(
flex(0.2),
cell(iconSettingLabel).weight(0.6),
flex(0.2)
).weight(0.1),
cell(replaceSettingInputComboBox).weight(0.45)
).getComponent();
}
/**
* 根据是否支持查找和替换重绘面板
* @param find 查找
* @param replace 替换
*/
public void repaintThirdPanel(boolean find, boolean replace) {
if (find && replace) {
settingScrollPane.remove(settingScrollPane.getComponent(2));
settingScrollPane.add(row(
cell(findExtraSettingComboBox).weight(0.45),
flex(0.1),
cell(replaceExtraSettingComboBox).weight(0.45)
).getComponent(), 2);
settingScrollPane.revalidate();
settingScrollPane.repaint();
}
if (!find && replace) {
settingScrollPane.remove(settingScrollPane.getComponent(2));
settingScrollPane.add(row(
flex(0.55),
cell(replaceExtraSettingComboBox).weight(0.45)
).getComponent(), 2);
settingScrollPane.revalidate();
settingScrollPane.repaint();
}
if (find && !replace) {
settingScrollPane.remove(settingScrollPane.getComponent(2));
settingScrollPane.add(row(
cell(findExtraSettingComboBox).weight(0.45),
flex(0.55)
).getComponent(), 2);
settingScrollPane.revalidate();
settingScrollPane.repaint();
}
}
/**
@ -413,6 +494,7 @@ public class ITReplaceNorthPanel {
} else {
extraComboBox.setVisible(false);
}
ITReplaceMainDialog.getInstance().getNorthPane().repaintThirdPanel(findExtraSettingComboBox.isVisible(), replaceExtraSettingComboBox.isVisible());
refreshSettingReplaceButtonStatus();
}
@ -544,15 +626,6 @@ public class ITReplaceNorthPanel {
}
}
public UIScrollPane getContentScrollPane() {
return contentScrollPane;
}
public void setContentScrollPane(UIScrollPane contentScrollPane) {
this.contentScrollPane = contentScrollPane;
}
private void setIconLabelBounds() {
iconX = inputLength + GAP;
iconY = SECOND_Y;

2
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceSouthPanel.java

@ -33,8 +33,6 @@ public class ITReplaceSouthPanel {
}
};
tableEditorPane.getEditTable().setRowSorter(sorter);
tableEditorPane.getEditTable().setBorder(BorderFactory.createEmptyBorder());
tableEditorPane.getEditTable().setSelectionBackground(new Color(217, 235, 254));
tableEditorPane.getEditTable().setRowHeight(tableEditorPane.getEditTable().getRowHeight() / 2 + tableEditorPane.getEditTable().getRowHeight());
tableEditorPane.makeFace(tableEditorPane.getEditTable());
}

29
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java

@ -22,6 +22,10 @@ import java.awt.GridLayout;
import java.awt.event.MouseEvent;
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;
/**
* 左侧面板
*
@ -46,7 +50,7 @@ public class ITReplaceWestPanel {
*/
private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Template_Level_Search_Replace_Default";
private static final String HELP_URL = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT);
private static final int FILL_COUNT = 11;
private static final int FILL_COUNT = 12;
public static final int LEFT_WIDTH = 100;
public static final String CONTENT_TEXT = "<html><font color = 'rgb(255,255,255)'>" + Toolkit.i18nText("Fine-Design_Basic_Templates_Content") + "</font></html>";
public static final String SETTING_TEXT = "<html><font color = 'rgb(255,255,255)'>" + Toolkit.i18nText("Fine-Design_Replace_Setting") + "</font></html>";
@ -58,6 +62,8 @@ public class ITReplaceWestPanel {
contentButton = new UIToggleButton(Toolkit.i18nText("Fine-Design_Basic_Templates_Content"));
settingButton = new UIToggleButton(Toolkit.i18nText("Fine-Design_Replace_Setting"));
contentButton.setHorizontalAlignment(SwingConstants.LEFT);
settingButton.setHorizontalAlignment(SwingConstants.LEFT);
contentButton.setText(CONTENT_TEXT);
contentButton.addChangeListener(new ChangeListener() {
@Override
@ -90,8 +96,16 @@ public class ITReplaceWestPanel {
//去除按钮的边框
contentButton.setBorderPainted(false);
settingButton.setBorderPainted(false);
leftPanel.add(contentButton);
leftPanel.add(settingButton);
leftPanel.add(row(
flex(0.07),
cell(contentButton).weight(1.0),
flex(0.07)
).getComponent());
leftPanel.add(row(
flex(0.07),
cell(settingButton).weight(1.0),
flex(0.07)
).getComponent());
leftPanel.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, new Color(218, 218, 221)));
//填充一下面板
for (int i = 0; i < FILL_COUNT; i++) {
@ -100,7 +114,7 @@ public class ITReplaceWestPanel {
//添加帮助文档按钮及超链
iconLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Replace_Tooltip"));
iconLabel.setHorizontalAlignment(SwingConstants.CENTER);
iconLabel.setHorizontalAlignment(SwingConstants.LEFT);
//设置游标
iconLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
iconLabel.addMouseListener(new MouseClickListener() {
@ -109,8 +123,11 @@ public class ITReplaceWestPanel {
BrowseUtils.browser(HELP_URL);
}
});
leftPanel.add(iconLabel);
leftPanel.add(new UILabel(StringUtils.EMPTY));
leftPanel.add(row(
flex(0.23),
cell(iconLabel).weight(1.0),
flex(0.07)
).getComponent());
}
public JPanel getLeftPanel() {

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

Loading…
Cancel
Save