Browse Source

REPORT-127437 merge: merge newui

newui
lemon 4 months ago
parent
commit
d14d477736
  1. 2
      build.gradle
  2. 2
      designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java
  3. 13
      designer-base/src/main/java/com/fr/design/actions/UpdateAction.java
  4. 7
      designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java
  5. 6
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  6. 3
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java
  7. 4
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  8. 1
      designer-base/src/main/java/com/fr/design/editor/editor/CursorEditor.java
  9. 2
      designer-base/src/main/java/com/fr/design/formula/FunctionManagerPane.java
  10. 2
      designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowPane.java
  11. 6
      designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowVerticalPane.java
  12. 24
      designer-base/src/main/java/com/fr/design/gui/frpane/ObjectProperiesPane.java
  13. 6
      designer-base/src/main/java/com/fr/design/gui/style/FollowingThemePane.java
  14. 1
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperNorthPane.java
  15. 5
      designer-base/src/main/java/com/fr/design/hyperlink/ReportletHyperlinkPane.java
  16. 4
      designer-base/src/main/java/com/fr/design/hyperlink/WebHyperlinkPane.java
  17. 6
      designer-base/src/main/java/com/fr/design/hyperlink/popup/ContentSettingPane.java
  18. 25
      designer-base/src/main/java/com/fr/design/hyperlink/popup/CustomFontPane.java
  19. 3
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupRegularPane.java
  20. 2
      designer-base/src/main/java/com/fr/design/hyperlink/popup/MobilePopupUIUtils.java
  21. 3
      designer-base/src/main/java/com/fr/design/javascript/EmailPane.java
  22. 9
      designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java
  23. 12
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptImplPane.java
  24. 5
      designer-base/src/main/java/com/fr/design/menu/NameSeparator.java
  25. 9
      designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java
  26. 3
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java
  27. 35
      designer-base/src/main/java/com/fr/design/web/CustomIconPane.java
  28. 17
      designer-base/src/main/java/com/fr/design/widget/component/DateValuePane.java
  29. 30
      designer-base/src/main/java/com/fr/design/write/submit/CustomJobPane.java
  30. 74
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  31. 14
      designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java
  32. 4
      designer-base/src/main/resources/com/fine/theme/icon/font/bold.svg
  33. 4
      designer-base/src/main/resources/com/fine/theme/icon/font/italic.svg
  34. 4
      designer-base/src/main/resources/com/fine/theme/icon/font/underline.svg
  35. 7
      designer-base/src/main/resources/com/fine/theme/icon/insert/float_normal.svg
  36. 1
      designer-base/src/main/resources/com/fine/theme/light/ui/fine_light.icon.json
  37. 2
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  38. 4
      designer-base/src/main/resources/com/fr/design/images/edit/advancedEditor.svg
  39. BIN
      designer-base/src/main/resources/com/fr/design/images/server/global_param.png
  40. 12
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateCellLinkPane.java
  41. 47
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java
  42. 6
      designer-chart/src/main/java/com/fr/design/module/FormHyperlinkGroup.java
  43. 6
      designer-realize/src/main/java/com/fr/design/report/NewReportBackgroundPane.java
  44. 2
      designer-realize/src/main/java/com/fr/design/report/PDFExportPane.java
  45. 4
      designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java
  46. 11
      designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java
  47. 66
      designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java
  48. 74
      designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java
  49. 2
      designer-realize/src/main/java/com/fr/design/webattr/CommonPane.java
  50. 43
      designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java
  51. 33
      designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java
  52. 8
      designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java
  53. 14
      designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java
  54. 176
      designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java
  55. 14
      designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java

2
build.gradle

@ -90,8 +90,8 @@ allprojects {
implementation 'com.github.weisj:jsvg:1.2.0' implementation 'com.github.weisj:jsvg:1.2.0'
implementation 'com.formdev:flatlaf:3.4' implementation 'com.formdev:flatlaf:3.4'
implementation 'com.formdev:flatlaf-extras:3.4' implementation 'com.formdev:flatlaf-extras:3.4'
implementation 'com.fanruan.vito:gui-inspector:1.0.2'
implementation 'com.fine.swing.ui:layout:1.0-SNAPSHOT' implementation 'com.fine.swing.ui:layout:1.0-SNAPSHOT'
implementation 'com.fanruan.vito:gui-inspector:1.0.2'
testImplementation 'org.easymock:easymock:3.5.1' testImplementation 'org.easymock:easymock:3.5.1'
testImplementation 'org.powermock:powermock-module-junit4:1.7.1' testImplementation 'org.powermock:powermock-module-junit4:1.7.1'
testImplementation 'org.powermock:powermock-api-easymock:1.7.1' testImplementation 'org.powermock:powermock-api-easymock:1.7.1'

2
designer-base/src/main/java/com/fine/theme/utils/FineUIUtils.java

@ -395,7 +395,7 @@ public class FineUIUtils {
UILabel label = new UILabel(title); UILabel label = new UILabel(title);
wrapBoldLabelWithUnderline(label); wrapBoldLabelWithUnderline(label);
return column(LayoutConstants.VERTICAL_GAP, return column(LayoutConstants.VERTICAL_GAP,
cell(label), cell(component) cell(label), cell(component).weight(1.0)
).getComponent(); ).getComponent();
} }

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

@ -10,6 +10,7 @@ import com.fr.base.Style;
import com.fr.base.svg.SVGIcon; import com.fr.base.svg.SVGIcon;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.design.actions.core.ActionFactory; 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.ibutton.UIButton;
import com.fr.design.gui.imenu.UICheckBoxMenuItem; import com.fr.design.gui.imenu.UICheckBoxMenuItem;
import com.fr.design.gui.imenu.UIMenuEastAttrItem; import com.fr.design.gui.imenu.UIMenuEastAttrItem;
@ -116,11 +117,13 @@ public abstract class UpdateAction extends ShortCut implements Action {
this.enabled = newValue; this.enabled = newValue;
//循环遍历所有的Enable属性. //循环遍历所有的Enable属性.
Iterator<Object> valueIt = this.componentMap.values().iterator(); if (this.componentMap != null) {
while (valueIt.hasNext()) { Iterator<Object> valueIt = this.componentMap.values().iterator();
Object valueObject = valueIt.next(); while (valueIt.hasNext()) {
if (valueObject instanceof JComponent) { Object valueObject = valueIt.next();
((JComponent) valueObject).setEnabled(this.enabled); if (valueObject instanceof JComponent) {
((JComponent) valueObject).setEnabled(this.enabled);
}
} }
} }
} }

7
designer-base/src/main/java/com/fr/design/carton/FeedbackToolboxDialog.java

@ -1,5 +1,6 @@
package com.fr.design.carton; package com.fr.design.carton;
import com.fine.theme.utils.FineUIScale;
import com.fr.decision.webservice.v10.log.download.utils.LogZipUtils; import com.fr.decision.webservice.v10.log.download.utils.LogZipUtils;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
@ -87,7 +88,7 @@ public class FeedbackToolboxDialog extends JDialog {
body.add(midPane, BorderLayout.CENTER); body.add(midPane, BorderLayout.CENTER);
midPane.add(infoPane, BorderLayout.NORTH); midPane.add(infoPane, BorderLayout.NORTH);
Dimension dimension = new Dimension(662, 556); Dimension dimension = new Dimension(662, 556);
body.setPreferredSize(dimension); body.setPreferredSize(FineUIScale.scale(dimension));
this.body = body; this.body = body;
} }
@ -102,8 +103,8 @@ public class FeedbackToolboxDialog extends JDialog {
} else { } else {
this.uiDatePicker = new UIDatePicker(UIDatePicker.STYLE_CN_DATE1, null, this); this.uiDatePicker = new UIDatePicker(UIDatePicker.STYLE_CN_DATE1, null, this);
} }
Dimension dimension = new Dimension(160, 100); Dimension dimension = new Dimension(100, 100);
uiDatePicker.setPreferredSize(dimension); uiDatePicker.setPreferredSize(FineUIScale.scale(dimension));
northPane.add(GUICoreUtils.createFlowPane(new Component[]{title, uiDatePicker}, FlowLayout.LEFT)); northPane.add(GUICoreUtils.createFlowPane(new Component[]{title, uiDatePicker}, FlowLayout.LEFT));
exportLogLabel = new UILabel(); exportLogLabel = new UILabel();
exportLogLabel.setText(Toolkit.i18nText("Fine-Design_Basic_Carton_Export_Carton_Log")); exportLogLabel.setText(Toolkit.i18nText("Fine-Design_Basic_Carton_Export_Carton_Log"));

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

@ -222,9 +222,9 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
} }
protected void initComponentsLayout(PreviewLabel previewLabel, int labelSize) { protected void initComponentsLayout(PreviewLabel previewLabel, int labelSize) {
UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database") + ":"); UILabel l1 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database"));
UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model") + ":"); UILabel l2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Model"));
UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table") + ":"); UILabel l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table"));
if (labelSize > 0) { if (labelSize > 0) {
Dimension pSize = new Dimension(labelSize, 25); Dimension pSize = new Dimension(labelSize, 25);

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

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

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

@ -247,10 +247,10 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> implemen
RTextScrollPane sqlTextScrollPane = new RTextScrollPane(this.sqlTextPane); RTextScrollPane sqlTextScrollPane = new RTextScrollPane(this.sqlTextPane);
sqlTextScrollPane.setLineNumbersEnabled(true); sqlTextScrollPane.setLineNumbersEnabled(true);
sqlTextScrollPane.setBorder(new UIRoundedBorder(UIManager.getColor("defaultBorderColor"), 1, UIConstants.ARC)); sqlTextScrollPane.setBorder(new UIRoundedBorder(UIManager.getColor("defaultBorderColor"), 1, UIConstants.ARC));
sqlTextScrollPane.setPreferredSize(new Dimension(680, 600)); sqlTextScrollPane.setPreferredSize(FineUIScale.scale(new Dimension(680, 600)));
JPanel paraMeanPane = new JPanel(new BorderLayout()); JPanel paraMeanPane = new JPanel(new BorderLayout());
paraMeanPane.setPreferredSize(new Dimension(680, 90)); paraMeanPane.setPreferredSize(FineUIScale.scale(new Dimension(680, 90)));
UILabel paraMean = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Datasource_Param_DES")); UILabel paraMean = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Datasource_Param_DES"));
paraMeanPane.add(paraMean, BorderLayout.CENTER); paraMeanPane.add(paraMean, BorderLayout.CENTER);

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

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

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

@ -104,7 +104,7 @@ public class FunctionManagerPane extends BasicPane {
@Override @Override
public NameableCreator[] createNameableCreators() { public NameableCreator[] createNameableCreators() {
NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"), NameableCreator funcDef = new NameObjectCreator(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Function"),
new LazyIcon("param"), FunctionDef.class, FunctionContentPane.class); new LazyIcon("page_query"), FunctionDef.class, FunctionContentPane.class);
return new NameableCreator[]{funcDef}; return new NameableCreator[]{funcDef};
} }

2
designer-base/src/main/java/com/fr/design/gui/columnrow/ColumnRowPane.java

@ -133,7 +133,6 @@ public class ColumnRowPane extends JPanel implements UIObserver {
} }
}; };
rowSpinner.setPreferredSize(new Dimension(60, 24));
JFormattedTextField rftf = GUICoreUtils.getSpinnerTextField(rowSpinner); JFormattedTextField rftf = GUICoreUtils.getSpinnerTextField(rowSpinner);
if (rftf != null) { if (rftf != null) {
rftf.setColumns(4); // specify more width than we need rftf.setColumns(4); // specify more width than we need
@ -148,7 +147,6 @@ public class ColumnRowPane extends JPanel implements UIObserver {
return false; return false;
} }
}; };
columnSpinner.setPreferredSize(new Dimension(60, 24));
JFormattedTextField cftf = GUICoreUtils.getSpinnerTextField(columnSpinner); JFormattedTextField cftf = GUICoreUtils.getSpinnerTextField(columnSpinner);
if (cftf != null) { if (cftf != null) {
cftf.setColumns(3); // specify more width than we need cftf.setColumns(3); // specify more width than we need

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

@ -24,7 +24,7 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
public ColumnRowVerticalPane( ) { public ColumnRowVerticalPane( ) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = FRGUIPaneFactory.createYBoxEmptyBorderPane(); JPanel pane = new JPanel(FRGUIPaneFactory.createBorderLayout());
this.add(pane, BorderLayout.NORTH); this.add(pane, BorderLayout.NORTH);
UILabel colLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column")); UILabel colLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column"));
@ -35,8 +35,8 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
initRowSpinner(); initRowSpinner();
pane.add(column(10, pane.add(column(10,
row(flex(0.005), cell(rowLabel).weight(0.195), cell(rowSpinner).weight(0.8)), row(cell(rowLabel).weight(0.15), cell(rowSpinner).weight(0.85)),
row(flex(0.005), cell(colLabel).weight(0.195), cell(columnSpinner).weight(0.8)) row(cell(colLabel).weight(0.15), cell(columnSpinner).weight(0.85))
).getComponent()); ).getComponent());
this.addDocumentListener(d); this.addDocumentListener(d);

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

@ -1,5 +1,9 @@
package com.fr.design.gui.frpane; package com.fr.design.gui.frpane;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPane;
@ -19,6 +23,8 @@ import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
public class ObjectProperiesPane extends BasicBeanPane<ListMap> { public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
private UIButton addButton; private UIButton addButton;
@ -27,12 +33,13 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
public ObjectProperiesPane() { public ObjectProperiesPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
JPanel buttonPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel buttonPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + " " +com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property")); this.addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add") + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"),
new LazyIcon("add"));
buttonPane.add(this.addButton, BorderLayout.WEST); buttonPane.add(this.addButton, BorderLayout.WEST);
this.add(buttonPane, BorderLayout.NORTH); buttonPane.setPreferredSize(FineUIScale.scale(new Dimension(0, 24)));
this.addButton.addActionListener(new ActionListener() { this.addButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -43,8 +50,7 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
}); });
selectedItemPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); selectedItemPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
// selectedItemPane.setLayout(new BoxLayout(selectedItemPane,BoxLayout.Y_AXIS));
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
northPane.add(selectedItemPane, BorderLayout.NORTH); northPane.add(selectedItemPane, BorderLayout.NORTH);
@ -52,8 +58,12 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
selectedItemScrollPane.setViewportView(northPane); selectedItemScrollPane.setViewportView(northPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
JPanel centerPane = new JPanel(new BorderLayout()); JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(new FineRoundBorder());
centerPane.add(selectedItemScrollPane); centerPane.add(selectedItemScrollPane);
this.add(centerPane, BorderLayout.CENTER); this.add(column(4,
cell(buttonPane),
cell(centerPane).weight(1.0)
).getComponent());
} }
@Override @Override

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

@ -1,5 +1,7 @@
package com.fr.design.gui.style; package com.fr.design.gui.style;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.TemplateTheme; import com.fr.base.theme.TemplateTheme;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
@ -45,7 +47,7 @@ public class FollowingThemePane extends BasicPane implements UIObserver {
public FollowingThemePane(String name) { public FollowingThemePane(String name) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.setBorder(new ScaledEmptyBorder(0, 0, 0, 10));
followingThemeButtonGroup = new UIButtonGroup<>(FOLLOWING_THEME_STRING_ARRAYS); followingThemeButtonGroup = new UIButtonGroup<>(FOLLOWING_THEME_STRING_ARRAYS);
followingThemeButtonGroup.setAutoFireStateChanged(false); followingThemeButtonGroup.setAutoFireStateChanged(false);
@ -74,7 +76,7 @@ public class FollowingThemePane extends BasicPane implements UIObserver {
double f = TableLayout.FILL; double f = TableLayout.FILL;
JPanel followingThemePane = JPanel followingThemePane =
TableLayoutHelper.createGapTableLayoutPane( new Component[][]{new Component[] { followingThemeLabel, FRGUIPaneFactory.createBorderLayoutNorthPaneWithComponent(followingThemeButtonGroup)}}, TableLayoutHelper.createGapTableLayoutPane( new Component[][]{new Component[] { followingThemeLabel, FRGUIPaneFactory.createBorderLayoutNorthPaneWithComponent(followingThemeButtonGroup)}},
new double[] { p }, new double[] { SETTING_LABEL_WIDTH, f }, 10, 0); new double[] { p }, new double[] {FineUIScale.scale(SETTING_LABEL_WIDTH), f }, 10, 0);
followingThemePane.setVisible(false); followingThemePane.setVisible(false);
add(followingThemePane, BorderLayout.NORTH); add(followingThemePane, BorderLayout.NORTH);

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

@ -291,7 +291,6 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display")); showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display"));
showParameterInterface.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
content.add(row(10, content.add(row(10,
cell(postComboBox).weight(0.75), cell(postComboBox).weight(0.75),
cell(showParameterInterface).weight(0.25) cell(showParameterInterface).weight(0.25)

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

@ -64,12 +64,9 @@ public class ReportletHyperlinkPane extends AbstractHyperLinkPane<ReportletHyper
extendPane extendPane
); );
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameter"), null));
this.add(column( this.add(column(
cell(northPane), cell(northPane),
cell(parameterViewPane).weight(1.0) cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, Toolkit.i18nText("Fine-Design_Basic_Parameter"))).weight(1.0)
).getComponent()); ).getComponent());
} }

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

@ -1,5 +1,6 @@
package com.fr.design.hyperlink; package com.fr.design.hyperlink;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
@ -45,11 +46,10 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
extendPane.add(extendParametersCheckBox); extendPane.add(extendParametersCheckBox);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(),
getValueEditorPane(), extendPane); getValueEditorPane(), extendPane);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null));
this.add(column( this.add(column(
cell(northPane), cell(northPane),
cell(parameterViewPane).weight(1.0) cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, Toolkit.i18nText("Fine-Design_Basic_Parameters"))).weight(1.0)
).getComponent()); ).getComponent());
} }

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

@ -166,7 +166,7 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
cell(templateLabel), cell(templateLabel),
row( row(
cell(templatePathTextField), cell(templatePathTextField),
cell(templateSelectButton)) cell(templateSelectButton)).weight(1.0)
).getComponent()); ).getComponent());
return templatePanel; return templatePanel;
} }
@ -195,9 +195,9 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
fontPane = new CustomFontPane(); fontPane = new CustomFontPane();
textSettingPanel.add(column(10, textSettingPanel.add(column(10,
row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"))), row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Text"))),
cell(textContentPane)), cell(textContentPane).weight(0.8)),
row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"))), row(40, cell(new UILabel(Toolkit.i18nText("FR-Plugin-Designer_Mobile_Popup_Style"))),
cell(fontPane)) cell(fontPane).weight(0.9))
).getComponent()); ).getComponent());
return textSettingPanel; return textSettingPanel;

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

@ -1,12 +1,10 @@
package com.fr.design.hyperlink.popup; package com.fr.design.hyperlink.popup;
import com.fr.base.BaseUtils; import com.fine.theme.icon.LazyIcon;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -46,9 +44,14 @@ public class CustomFontPane extends JPanel {
fontSizeComboBox.setEditable(true); fontSizeComboBox.setEditable(true);
colorSelectPane = new UIColorButton(); colorSelectPane = new UIColorButton();
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.svg")); bold = new UIToggleButton(new LazyIcon("bold"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.svg")); italic = new UIToggleButton(new LazyIcon("italic"));
underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.svg")); underline = new UIToggleButton(new LazyIcon("underline"));
colorSelectPane.setOpaque(true);
bold.setOpaque(true);
italic.setOpaque(true);
underline.setOpaque(true);
this.setButtonsTips(); this.setButtonsTips();
this.setButtonsSize(BUTTON_SIZE); this.setButtonsSize(BUTTON_SIZE);
@ -56,11 +59,11 @@ public class CustomFontPane extends JPanel {
JPanel buttonPane = new JPanel(new BorderLayout()); JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(row(10, buttonPane.add(row(10,
cell(fontSizeComboBox).weight(0.6), cell(fontSizeComboBox).weight(0.76),
cell(colorSelectPane).weight(0.1), cell(colorSelectPane).weight(0.06),
cell(bold).weight(0.1), cell(bold).weight(0.06),
cell(italic).weight(0.1), cell(italic).weight(0.06),
cell(underline).weight(0.1) cell(underline).weight(0.06)
).getComponent()); ).getComponent());
this.setLayout(new BorderLayout(0,0)); this.setLayout(new BorderLayout(0,0));

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

@ -83,14 +83,11 @@ public class MobilePopupRegularPane extends BasicPane {
JPanel spinnerLabelPane = new JPanel(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 5)); JPanel spinnerLabelPane = new JPanel(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 5));
JPanel spinnerPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 2,0)); JPanel spinnerPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 2,0));
Dimension dimension = new Dimension(60, 20);
spinner.setPreferredSize(dimension);
UILabel percent = new UILabel("%"); UILabel percent = new UILabel("%");
spinnerPane.add(spinner); spinnerPane.add(spinner);
spinnerPane.add(percent); spinnerPane.add(percent);
UILabel label = new UILabel(labelText); UILabel label = new UILabel(labelText);
label.setPreferredSize(dimension);
label.setHorizontalAlignment(SwingConstants.CENTER); label.setHorizontalAlignment(SwingConstants.CENTER);
spinnerLabelPane.add(spinnerPane); spinnerLabelPane.add(spinnerPane);

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

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

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

@ -1,5 +1,6 @@
package com.fr.design.javascript; package com.fr.design.javascript;
import com.fine.theme.utils.FineUIStyle;
import com.fr.config.EmailServerConfig; import com.fr.config.EmailServerConfig;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
@ -49,7 +50,7 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10)); this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10));
tipsPane1 = new UILabel(); tipsPane1 = new UILabel();
tipsPane1.setHorizontalAlignment(SwingConstants.LEFT); tipsPane1.setHorizontalAlignment(SwingConstants.LEFT);
tipsPane1.setForeground(Color.gray); FineUIStyle.setStyle(tipsPane1, FineUIStyle.LABEL_WARNING_TIP);
tipsPane2 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Tips")); 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")); UILabel mainTextLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_EmailPane_Mail_Content"));

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

@ -1,6 +1,8 @@
package com.fr.design.javascript; package com.fr.design.javascript;
import com.fine.theme.icon.LazyIcon; import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.svg.IconUtils;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.KeyWords; import com.fr.design.constants.KeyWords;
@ -188,12 +190,13 @@ public class JSContentPane extends BasicPane {
labelPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); labelPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
labelPane.add(label,BorderLayout.CENTER); labelPane.add(label,BorderLayout.CENTER);
JPanel jsParaPane = new JPanel(new BorderLayout()); JPanel jsParaPane = new JPanel(new BorderLayout());
funNameLabel.setBackground(FineUIUtils.getUIColor("background.normal", "background.normal"));
UIScrollPane scrollPane = new UIScrollPane(funNameLabel); UIScrollPane scrollPane = new UIScrollPane(funNameLabel);
scrollPane.setOpaque(true);
scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC)); scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC));
jsParaPane.add(row(10, jsParaPane.add(row(10,
cell(scrollPane).weight(0.6), cell(scrollPane).weight(0.55),
cell(labelPane).weight(0.4) cell(labelPane).weight(0.45)
).getComponent()); ).getComponent());
return jsParaPane; return jsParaPane;
} }

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

@ -1,5 +1,6 @@
package com.fr.design.javascript; package com.fr.design.javascript;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.design.data.tabledata.tabledatapane.OneListTableModel; import com.fr.design.data.tabledata.tabledatapane.OneListTableModel;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
@ -69,20 +70,17 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
importedJsPane = createImportedJsPane(); importedJsPane = createImportedJsPane();
jsPane = createJSContentPane(defaultArgs); jsPane = createJSContentPane(defaultArgs);
jsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript")));
JPanel topPane = new JPanel(new BorderLayout()); JPanel topPane = new JPanel(new BorderLayout());
topPane.add(row(10, topPane.add(row(10,
cell(importedJsPane).weight(0.5), cell(FineUIUtils.wrapComponentWithTitle(importedJsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Import_JavaScript"))).weight(0.5),
cell(parameterPane).weight(0.5) cell(FineUIUtils.wrapComponentWithTitle(parameterPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"))).weight(0.5)
).getComponent()); ).getComponent());
topPane.setBorder(BorderFactory.createEmptyBorder(0, 0, BOTTOM_BORDER, 0));
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(column(10, this.add(column(10,
cell(topPane).weight(0.5), cell(topPane).weight(0.5),
cell(jsPane).weight(0.5) cell(FineUIUtils.wrapComponentWithTitle(jsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_JavaScript"))).weight(0.5)
).getComponent()); ).getComponent());
this.reLayoutForChart(); this.reLayoutForChart();
@ -111,7 +109,6 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
protected ReportletParameterViewPane createParameterViewPane(){ protected ReportletParameterViewPane createParameterViewPane(){
ReportletParameterViewPane parameterPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); ReportletParameterViewPane parameterPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
parameterPane.addTableEditorListener(new TableModelListener() { parameterPane.addTableEditorListener(new TableModelListener() {
public void tableChanged(TableModelEvent e) { public void tableChanged(TableModelEvent e) {
List<ParameterProvider> list = parameterPane.update(); List<ParameterProvider> list = parameterPane.update();
@ -147,7 +144,6 @@ public class JavaScriptImplPane extends AbstractHyperLinkPane<JavaScriptImpl> {
} }
}; };
UITableEditorPane<String> importedJsPane = new UITableEditorPane<String>(model); UITableEditorPane<String> importedJsPane = new UITableEditorPane<String>(model);
importedJsPane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Import_JavaScript")));
return importedJsPane; return importedJsPane;
} }

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

@ -1,5 +1,6 @@
package com.fr.design.menu; package com.fr.design.menu;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -52,11 +53,11 @@ public class NameSeparator extends UpdateAction {
} }
public Dimension getSize() { public Dimension getSize() {
return new Dimension(super.getSize().width, 20); return new Dimension(super.getSize().width, FineUIScale.scale(30));
} }
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
return new Dimension(super.getPreferredSize().width, 20); return new Dimension(super.getPreferredSize().width, FineUIScale.scale(30));
} }
} }

9
designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java

@ -39,21 +39,22 @@ public class ParameterPane extends BasicBeanPane<Parameter> {
protected void initComponents() { protected void initComponents() {
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
//名字 //名字
nameTextField = new UITextField(); nameTextField = new UITextField(10);
nameTextField.setEditable(false); nameTextField.setEditable(false);
//默认值 //默认值
valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane(); valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane();
// richer:要排列显示的控件 // richer:要排列显示的控件
JPanel centerPane = column(LayoutConstants.VERTICAL_GAP, JPanel centerPane = column(LayoutConstants.VERTICAL_GAP,
row(LayoutConstants.HORIZONTAL_GAP, row(20,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name"))).weight(0.1), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name"))).weight(0.1),
cell(nameTextField).weight(0.8), cell(nameTextField).weight(0.8),
flex(0.1)), flex(0.1)),
row(LayoutConstants.HORIZONTAL_GAP, row(20,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.1), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.1),
cell(valueEditor).weight(0.8), cell(valueEditor).weight(0.8),
flex(0.1)) flex(0.1))
).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 0))).getComponent(); ).getComponent();
centerPane.setBorder(new ScaledEmptyBorder(0, 20, 0, 0));
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
} }

3
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -1,5 +1,6 @@
package com.fr.design.update.ui.dialog; package com.fr.design.update.ui.dialog;
import com.fine.theme.utils.FineUIScale;
import com.fr.decision.update.data.UpdateConstants; import com.fr.decision.update.data.UpdateConstants;
import com.fr.decision.update.info.UpdateCallBack; import com.fr.decision.update.info.UpdateCallBack;
import com.fr.decision.update.info.UpdateProgressCallBack; import com.fr.decision.update.info.UpdateProgressCallBack;
@ -295,7 +296,7 @@ public class UpdateMainDialog extends UIDialog {
loadingLabel = new LoadingLabel(); loadingLabel = new LoadingLabel();
loadingLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Checking_Jar_Update")); loadingLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Checking_Jar_Update"));
updateButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Update")); updateButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_Update"));
updateButton.setPreferredSize(UPDATE_BUTTON); updateButton.setPreferredSize(FineUIScale.scale(UPDATE_BUTTON));
updateButton.setEnabled(false); updateButton.setEnabled(false);
double[] rowSize = {TableLayout.PREFERRED}; double[] rowSize = {TableLayout.PREFERRED};

35
designer-base/src/main/java/com/fr/design/web/CustomIconPane.java

@ -1,9 +1,11 @@
package com.fr.design.web; package com.fr.design.web;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.Icon; import com.fr.base.Icon;
import com.fr.base.IconManager; import com.fr.base.IconManager;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
@ -41,6 +43,7 @@ import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Image; import java.awt.Image;
import java.awt.Window; import java.awt.Window;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup; import javax.swing.ButtonGroup;
import javax.swing.ImageIcon; import javax.swing.ImageIcon;
import javax.swing.JComponent; import javax.swing.JComponent;
@ -60,6 +63,10 @@ import java.awt.event.FocusListener;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
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;
/** /**
* carl自定义Icon编辑 * carl自定义Icon编辑
*/ */
@ -86,11 +93,11 @@ public class CustomIconPane extends BasicPane {
private void initComponents() { private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel iconLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon"));
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon"))); JPanel noNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel noNamePane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane(); noNamePane.setBorder(new FineRoundBorder());
centerPane.add(noNamePane, BorderLayout.CENTER); noNamePane.setBackground(Color.WHITE);
iconPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); iconPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
// 开始加图标选择按钮 // 开始加图标选择按钮
@ -100,14 +107,14 @@ public class CustomIconPane extends BasicPane {
refreshIconPane(false); refreshIconPane(false);
jsPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); jsPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
jsPane.setPreferredSize(new Dimension(200, 180));
noNamePane.add(jsPane); noNamePane.add(jsPane);
DescriptionTextArea des = new DescriptionTextArea(2); UILabel desLabel = new UILabel(createDescriptionText());
des.setText(createDescriptionText()); desLabel.setForeground(Color.GRAY);
centerPane.add(des, BorderLayout.SOUTH); centerPane.add(column(
cell(noNamePane).weight(0.9),
this.add(centerPane, BorderLayout.CENTER); cell(desLabel).weight(0.1)
).getComponent());
JPanel eastPane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane(); JPanel eastPane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane();
JPanel buttonPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); JPanel buttonPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
@ -118,8 +125,10 @@ public class CustomIconPane extends BasicPane {
initEditButton(buttonPane); initEditButton(buttonPane);
eastPane.add(buttonPane); eastPane.add(buttonPane);
this.add(eastPane, BorderLayout.EAST); this.add(column(10,
cell(iconLabel),
row(10, cell(centerPane).weight(0.9), cell(eastPane).weight(0.1)).weight(1.0)
).getComponent());
} }
@ -369,7 +378,7 @@ public class CustomIconPane extends BasicPane {
g2d.drawImage(iconImage, ICON_X, ICON_Y, IconManager.DEFAULT_ICONWIDTH, IconManager.DEFAULT_ICONHEIGHT, null); g2d.drawImage(iconImage, ICON_X, ICON_Y, IconManager.DEFAULT_ICONWIDTH, IconManager.DEFAULT_ICONHEIGHT, null);
} }
if (this.iconName != null && ComparatorUtils.equals(this.iconName, selectedIconName)) { if (this.iconName != null && ComparatorUtils.equals(this.iconName, selectedIconName)) {
g2d.setPaint(Color.RED); g2d.setPaint(Color.BLUE);
} else { } else {
g2d.setPaint(Color.LIGHT_GRAY); g2d.setPaint(Color.LIGHT_GRAY);
} }

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

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

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

@ -1,6 +1,7 @@
package com.fr.design.write.submit; package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.data.AbstractClassJob; import com.fr.data.AbstractClassJob;
import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane; import com.fr.design.data.tabledata.tabledatapane.ClassNameSelectPane;
@ -26,6 +27,7 @@ import java.awt.event.ActionListener;
import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
/** /**
* Author : Shockway * Author : Shockway
@ -41,16 +43,17 @@ public abstract class CustomJobPane extends BasicBeanPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
classNameTextField = new UITextField(); classNameTextField = new UITextField();
classNameTextField.setPreferredSize(FineUIScale.scale(new Dimension(0, 24)));
UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select"));
browserButton.setPreferredSize(new Dimension( browserButton.setPreferredSize(new Dimension(
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40, GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40,
classNameTextField.getPreferredSize().height)); FineUIScale.scale(24)));
UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); UIButton editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit"));
editButton.setPreferredSize(new Dimension( editButton.setPreferredSize(new Dimension(
GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40, GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")) + 40,
classNameTextField.getPreferredSize().height)); FineUIScale.scale(24)));
UITextArea area = new UITextArea(2, 1); UITextArea area = new UITextArea(2, 1);
@ -91,23 +94,22 @@ public abstract class CustomJobPane extends BasicBeanPane {
} }
}); });
reportletNamePane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"), null));
reportletNamePane.setLayout(new BorderLayout()); reportletNamePane.setLayout(new BorderLayout());
reportletNamePane.add(row(10, reportletNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
cell(classNameTextField).weight(0.8), reportletNamePane.add(row(4,
cell(browserButton).weight(0.1), cell(classNameTextField).weight(1.0),
cell(editButton).weight(0.1) cell(browserButton),
).getComponent()); cell(editButton)
).getComponent(), BorderLayout.CENTER);
objectProperiesPane = new ObjectProperiesPane(); objectProperiesPane = new ObjectProperiesPane();
objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), null));
JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
dsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
dsPane.add(area); dsPane.add(area);
dsPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description"), null)); this.add(column(20,
this.add(column( cell(FineUIUtils.wrapComponentWithTitle(reportletNamePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"))),
cell(reportletNamePane), cell(FineUIUtils.wrapComponentWithTitle(objectProperiesPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"))).weight(1.0),
cell(objectProperiesPane).weight(1.0), cell(FineUIUtils.wrapComponentWithTitle(dsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description")))
cell(dsPane)
).getComponent()); ).getComponent());
checkAddButtonEnable(); checkAddButtonEnable();
} }

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

@ -2,7 +2,9 @@ package com.fr.design.write.submit;
import com.fine.swing.ui.layout.Layouts; import com.fine.swing.ui.layout.Layouts;
import com.fine.theme.icon.LazyIcon; import com.fine.theme.icon.LazyIcon;
import com.fine.swing.ui.layout.Spacer;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.data.DataConstants; import com.fr.data.DataConstants;
@ -16,8 +18,10 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.data.datapane.ChoosePaneSupportFormula; import com.fr.design.data.datapane.ChoosePaneSupportFormula;
import com.fr.design.data.datapane.DataBaseItems; import com.fr.design.data.datapane.DataBaseItems;
import com.fr.design.data.tabledata.tabledatapane.FormatExplanationPane; import com.fr.design.data.tabledata.tabledatapane.FormatExplanationPane;
import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPane;
@ -94,6 +98,7 @@ import java.util.EventObject;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.swing.ui.layout.Layouts.row; 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.cell;
import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.column;
@ -155,42 +160,45 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
JPanel typePane = new JPanel(new BorderLayout()); JPanel typePane = new JPanel(new BorderLayout());
typePane.add(row(10, typePane.add(row(10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type"))),
cell(dmlConfigComboBox)).getComponent()); cell(dmlConfigComboBox)).getComponent());
typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type")));
chooseTable = new ChoosePaneSupportFormula(); chooseTable = new ChoosePaneSupportFormula();
chooseTable.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table"))); chooseTable.setTableNameComboBoxPopSize(FineUIScale.scale(160), FineUIScale.scale(320));
chooseTable.setTableNameComboBoxPopSize(160, 320);
// peter:编辑的TablePane // peter:编辑的TablePane
JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel editTablePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
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)); editTablePane.setBounds(0, 0, FineUIScale.scale(280), FineUIScale.scale(180));
keyColumnValuesTable = new KeyColumnNameValueTable(); keyColumnValuesTable = new KeyColumnNameValueTable();
editTablePane.add(new UIScrollPane(this.keyColumnValuesTable), BorderLayout.CENTER); editTablePane.add(new UIScrollPane(keyColumnValuesTable), BorderLayout.CENTER);
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
keyColumnValuesTable.setPreferredScrollableViewportSize(new Dimension(280, 150)); keyColumnValuesTable.setPreferredScrollableViewportSize(FineUIScale.scale(new Dimension(280, 150)));
keyColumnValuesTable.setShowHorizontalLines(true); keyColumnValuesTable.setShowHorizontalLines(true);
DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer(); DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer();
headerRenderer.setHorizontalAlignment(SwingConstants.LEFT); headerRenderer.setHorizontalAlignment(SwingConstants.LEFT);
keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer); keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer);
northPane.add(column(10, true, northPane.add(column(10,
cell(typePane), cell(FineUIUtils.wrapComponentWithTitle(typePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))),
cell(chooseTable)) cell(FineUIUtils.wrapComponentWithTitle(chooseTable, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table"))))
.getComponent());
this.add(column(10, true,
cell(northPane),
cell(editTablePane))
.getComponent()); .getComponent());
JPanel bottomPane = initBottomPane();
this.add(new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.add(column(10,
cell(northPane),
cell(FineUIUtils.wrapComponentWithTitle(editTablePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Value"))),
cell(bottomPane))
.getComponent(), BorderLayout.CENTER);
return contentPane;
}
});
initJTableColumn(); initJTableColumn();
addButtons(editTablePane); addButtons(editTablePane);
addBottomPane();
addListeners(); addListeners();
} }
@ -258,16 +266,19 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
UpdateCheckBox.setEnabled(b); UpdateCheckBox.setEnabled(b);
} }
private void addBottomPane() { private JPanel initBottomPane() {
JPanel eventPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel eventPane = new JPanel(new BorderLayout());
eventPane.add(addEventButton()); eventPane.setPreferredSize(createControlBtnPanePreferredSize());
eventPane.add(addEventButton(), BorderLayout.WEST);
JPanel conditionPane = this.createConditionPane(); JPanel conditionPane = this.createConditionPane();
JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
btPane.add(eventPane, BorderLayout.CENTER); btPane.add(column(5,
btPane.add(conditionPane, BorderLayout.NORTH); cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))),
this.add(btPane, BorderLayout.SOUTH); cell(eventPane)
).getComponent());
return btPane;
} }
private UIButton addEventButton() { private UIButton addEventButton() {
@ -295,7 +306,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
private JPanel createConditionPane() { private JPanel createConditionPane() {
JPanel conditionPane = new JPanel(); JPanel conditionPane = new JPanel();
conditionPane.setPreferredSize(createConditionPanePreferredSize());
setBorderAndLayout(conditionPane); setBorderAndLayout(conditionPane);
@ -307,7 +317,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer(); DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer();
cr.setForeground(UIConstants.NORMAL_BACKGROUND); cr.setForeground(UIConstants.NORMAL_BACKGROUND);
JScrollPane jp = new JScrollPane(conditionsTree); JScrollPane jp = new JScrollPane(conditionsTree);
jp.setPreferredSize(FineUIScale.scale(new Dimension(0, 40)));
UIButton addSubmitConditionButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition")); UIButton addSubmitConditionButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Condition"));
addSubmitConditionButton.addActionListener(new ActionListener() { addSubmitConditionButton.addActionListener(new ActionListener() {
@Override @Override
@ -336,12 +346,12 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
} }
}); });
JPanel controlBtnPane = new JPanel(new GridLayout(1, 1, 4, 4)); JPanel controlBtnPane = new JPanel(new BorderLayout());
controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize()); controlBtnPane.setPreferredSize(FineUIScale.scale(new Dimension(122, 20)));
controlBtnPane.add(addSubmitConditionButton); controlBtnPane.add(addSubmitConditionButton, BorderLayout.NORTH);
conditionPane.add(row( conditionPane.add(row(
cell(jp).weight(0.74), cell(jp).weight(1.0),
column(cell(controlBtnPane).weight(0.5),cell(new UILabel()).weight(0.5)).weight(0.26) cell(new Spacer(122).add(controlBtnPane))
).getComponent()); ).getComponent());
return conditionPane; return conditionPane;
@ -349,8 +359,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
protected void setBorderAndLayout(JPanel jPanel) { protected void setBorderAndLayout(JPanel jPanel) {
jPanel.setLayout(FRGUIPaneFactory.createBorderLayout()); jPanel.setLayout(FRGUIPaneFactory.createBorderLayout());
jPanel.setBorder(BorderFactory.createTitledBorder(
new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition")));
} }
protected void addComponent(JPanel mainPane, JScrollPane addPane) { protected void addComponent(JPanel mainPane, JScrollPane addPane) {
@ -359,7 +367,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
protected Dimension createConditionPanePreferredSize() { protected Dimension createConditionPanePreferredSize() {
return new Dimension(454, 80); return FineUIScale.scale(new Dimension(454, 80));
} }
protected Dimension createControlBtnPanePreferredSize() { protected Dimension createControlBtnPanePreferredSize() {

14
designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java vendored

@ -1,5 +1,9 @@
package com.fr.env.detect.ui; package com.fr.env.detect.ui;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fine.theme.utils.FineUIStyle;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.design.components.notification.NotificationDialog; import com.fr.design.components.notification.NotificationDialog;
import com.fr.design.components.notification.NotificationDialogProperties; import com.fr.design.components.notification.NotificationDialogProperties;
@ -9,6 +13,7 @@ import com.fr.design.constants.DesignerColor;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonUI; import com.fr.design.gui.ibutton.UIButtonUI;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -141,7 +146,7 @@ public class EnvDetectorDialog extends JDialog {
JPanel headerPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel headerPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
headerPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 12, 0)); headerPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 12, 0));
this.detectButton = new UIButton(buttonStatus.getDesc()) { this.detectButton = new UIToggleButton(buttonStatus.getDesc()) {
@Override @Override
public ButtonUI getUI() { public ButtonUI getUI() {
@ -162,7 +167,6 @@ public class EnvDetectorDialog extends JDialog {
}; };
} }
}; };
detectButton.setForeground(Color.WHITE);
detectButton.setToolTipText(buttonStatus.getDesc()); detectButton.setToolTipText(buttonStatus.getDesc());
detectButton.addActionListener(event -> { detectButton.addActionListener(event -> {
if (buttonStatus.isNotExecuting()) { if (buttonStatus.isNotExecuting()) {
@ -171,9 +175,9 @@ public class EnvDetectorDialog extends JDialog {
stopDetecting(detectButton); stopDetecting(detectButton);
} }
}); });
detectButton.setPreferredSize(new Dimension(68, 20)); detectButton.setForeground(FineUIUtils.getUIColor("background.normal", "background.normal"));
detectButton.setBorderPainted(false); detectButton.setBackground(FineUIUtils.getUIColor("EnvDetectorButton.background", "EnvDetectorButton.background"));
detectButton.setContentAreaFilled(false);
headerPanel.add(detectButton, BorderLayout.WEST); headerPanel.add(detectButton, BorderLayout.WEST);
UILabel openUtilBoxLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Carton_Feedback_ToolBox")); UILabel openUtilBoxLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Carton_Feedback_ToolBox"));

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

@ -1,5 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <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" <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"/>
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> </svg>

Before

Width:  |  Height:  |  Size: 773 B

After

Width:  |  Height:  |  Size: 749 B

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

@ -1,5 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <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" <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"/>
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> </svg>

Before

Width:  |  Height:  |  Size: 555 B

After

Width:  |  Height:  |  Size: 531 B

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

@ -1,5 +1,3 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <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" <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"/>
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> </svg>

Before

Width:  |  Height:  |  Size: 615 B

After

Width:  |  Height:  |  Size: 591 B

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

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

After

Width:  |  Height:  |  Size: 1.6 KiB

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

@ -147,6 +147,7 @@
"image": "insert/image.svg", "image": "insert/image.svg",
"bias": "insert/bias.svg", "bias": "insert/bias.svg",
"sub_report": "insert/sub_report.svg", "sub_report": "insert/sub_report.svg",
"float_normal": "insert/float_normal.svg",
"popup": { "popup": {
"normal": "popup/popup.svg" "normal": "popup/popup.svg"
}, },

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

@ -223,6 +223,8 @@ CombinationButton.background = $Button.background
CombinationButton.borderColor = $Component.borderColor CombinationButton.borderColor = $Component.borderColor
CombinationButton.arc = $Button.arc CombinationButton.arc = $Button.arc
EnvDetecorButton.background = #FF419BF9
#---- CheckBox ---- #---- CheckBox ----
CheckBox.arc = 4 CheckBox.arc = 4
CheckBox.margin = 2,0,2,0 CheckBox.margin = 2,0,2,0

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

@ -1,4 +0,0 @@
<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: 536 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

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

@ -1,5 +1,7 @@
package com.fr.design.chart.series.SeriesCondition.impl; package com.fr.design.chart.series.SeriesCondition.impl;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.design.gui.columnrow.ColumnRowVerticalPane; import com.fr.design.gui.columnrow.ColumnRowVerticalPane;
@ -42,7 +44,7 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
} }
private void initComponent() { private void initComponent() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout()); this.setLayout(new BorderLayout());
if (needRenamePane()) { if (needRenamePane()) {
itemNameTextField = new UITextField(); itemNameTextField = new UITextField();
this.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), BorderLayout.NORTH); this.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Name") + ":"), BorderLayout.NORTH);
@ -50,18 +52,16 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
centerPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Cell")));
colRowPane = new ColumnRowVerticalPane(); colRowPane = new ColumnRowVerticalPane();
centerPane.add(colRowPane, BorderLayout.NORTH); centerPane.add(colRowPane, BorderLayout.NORTH);
addPaneInCenter(centerPane); addPaneInCenter(centerPane);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"))); parameterViewPane.setPreferredSize(new Dimension(centerPane.getWidth(), FineUIScale.scale(380)));
this.add(column( this.add(column(
cell(centerPane).weight(0.2), cell(FineUIUtils.wrapComponentWithTitle(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Cell"))).weight(0.3),
cell(parameterViewPane).weight(0.8) cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"))).weight(0.7)
).getComponent()); ).getComponent());
} }

47
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java

@ -1,9 +1,10 @@
package com.fr.design.chart.series.SeriesCondition.impl; package com.fr.design.chart.series.SeriesCondition.impl;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.web.ChartHyperRelateFloatLink; import com.fr.chart.web.ChartHyperRelateFloatLink;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.frpane.ReportletParameterViewPane; import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -13,17 +14,17 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.border.Border; import java.awt.Dimension;
import javax.swing.border.LineBorder;
import javax.swing.border.TitledBorder;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension; import static com.fine.swing.ui.layout.Layouts.column;
import java.awt.Font; import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/** /**
* @author kunsnat E-mail:kunsnat@gmail.com * @author kunsnat E-mail:kunsnat@gmail.com
@ -53,30 +54,28 @@ public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane<ChartHy
if (needRenamePane()) { if (needRenamePane()) {
itemNameTextField = new UITextField(); itemNameTextField = new UITextField();
this.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Name") + ":"), BorderLayout.NORTH); this.add(GUICoreUtils.createNamedPane(itemNameTextField, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Name")), BorderLayout.NORTH);
} }
this.add(centerPane, BorderLayout.CENTER);
floatNameBox = new UIComboBox(getFloatNames()); floatNameBox = new UIComboBox(getFloatNames());
floatNameBox.setPreferredSize(new Dimension(90, 20)); floatNameBox.setPreferredSize(new Dimension(FineUIScale.scale(160), FineUIScale.scale(24)));
JPanel pane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane(); JPanel pane = new JPanel(new BorderLayout());
pane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert-Float") + ":")); pane.setBorder(BorderFactory.createEmptyBorder(4, 0, 4, 0));
pane.add(floatNameBox); UILabel floatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert-Float"));
pane.add(row(20,
Border boder = new LineBorder(UIConstants.TITLED_BORDER_COLOR); cell(floatLabel),
Font font = null; cell(floatNameBox)
TitledBorder border = new TitledBorder(boder, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Float"), 4, 2, font, new Color(1, 159, 222)); ).getComponent());
// 圆角不行
centerPane.setBorder(border);
centerPane.add(pane, BorderLayout.NORTH); centerPane.add(pane, BorderLayout.NORTH);
addPaneInCenter(centerPane); addPaneInCenter(centerPane);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane()); 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(column(10,
this.add(parameterViewPane, BorderLayout.SOUTH); cell(FineUIUtils.wrapComponentWithTitle(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Float"))).weight(0.5),
cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Float"))).weight(0.5)
).getComponent());
} }
protected void addPaneInCenter(JPanel centerPane) { protected void addPaneInCenter(JPanel centerPane) {

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

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

6
designer-realize/src/main/java/com/fr/design/report/NewReportBackgroundPane.java

@ -122,10 +122,10 @@ public class NewReportBackgroundPane extends BasicPane {
uiLabelPane.add(uiLabel, BorderLayout.NORTH); uiLabelPane.add(uiLabel, BorderLayout.NORTH);
uiLabelPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0)); uiLabelPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
backgroundPane = new ReportBackgroundSpecialPane(); backgroundPane = new ReportBackgroundSpecialPane();
backgroundPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0)); backgroundPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 10));
backgroundLabeledPane = TableLayoutHelper.createCommonTableLayoutPane( backgroundLabeledPane = TableLayoutHelper.createCommonTableLayoutPane(
new Component[][]{ new Component[] { uiLabelPane, backgroundPane } }, new Component[][]{ new Component[] { uiLabelPane, backgroundPane } },
new double[] { p }, new double[] { SETTING_LABEL_WIDTH, f}, IntervalConstants.INTERVAL_L1 new double[] { p }, new double[] { FineUIScale.scale(SETTING_LABEL_WIDTH), f}, IntervalConstants.INTERVAL_L1
); );
themePane.addFollowThemePane(backgroundLabeledPane, new FollowingThemePane.FollowingThemeActionChangeListener() { themePane.addFollowThemePane(backgroundLabeledPane, new FollowingThemePane.FollowingThemeActionChangeListener() {
@Override @Override
@ -148,7 +148,7 @@ public class NewReportBackgroundPane extends BasicPane {
10, 10,
Layouts.row(10, Layouts.cell(createLeftPane()), Layouts.cell(createRightPane())) Layouts.row(10, Layouts.cell(createLeftPane()), Layouts.cell(createRightPane()))
).getComponent(); ).getComponent();
contentContainer.setPreferredSize(new Dimension(600, 540)); contentContainer.setPreferredSize(FineUIScale.scale(new Dimension(600, 540)));
addAttributeChangeListener(new AttributeChangeListener() { addAttributeChangeListener(new AttributeChangeListener() {
@Override @Override

2
designer-realize/src/main/java/com/fr/design/report/PDFExportPane.java

@ -42,7 +42,7 @@ public class PDFExportPane extends BasicPane {
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Export_Content_Protect"))), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Export_Content_Protect"))),
row(cell(isNeedPassword), fix(5), cell(passwordWritePane)) row(cell(isNeedPassword), fix(5), cell(passwordWritePane))
).getComponent(); ).getComponent();
this.add(wrapComponentWithTitle(contextProtectPane, "PDF" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportD_Excel_Export"))); this.add(wrapComponentWithTitle(contextProtectPane, "PDF" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportD_Excel_Export")), BorderLayout.NORTH);
} }
@Override @Override

4
designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java

@ -26,6 +26,8 @@ import javax.swing.ButtonGroup;
import javax.swing.JSpinner; import javax.swing.JSpinner;
import javax.swing.SpinnerNumberModel; import javax.swing.SpinnerNumberModel;
import javax.swing.JFormattedTextField; import javax.swing.JFormattedTextField;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder; import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.frpane.FineTabbedPane; import com.fr.design.gui.frpane.FineTabbedPane;
@ -683,7 +685,7 @@ public class PageSetupPane extends BasicPane {
public ShowPagePane() { public ShowPagePane() {
this.setSize(pane_width, pane_height); this.setSize(pane_width, pane_height);
this.setPreferredSize(new Dimension(pane_width, pane_height)); this.setPreferredSize(FineUIScale.scale(new Dimension(pane_width, pane_height)));
this.setBackground(new Color(128, 128, 128));// background this.setBackground(new Color(128, 128, 128));// background
// color. // color.
this.setOpaque(false); this.setOpaque(false);

11
designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java

@ -99,7 +99,7 @@ public class ReportColumnsPane extends BasicPane{
super.paintBorder(g); super.paintBorder(g);
} }
}; };
north.setPreferredSize(new Dimension(549, 59)); north.setPreferredSize(FineUIScale.scale(new Dimension(549, 59)));
north.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(11, 23, 6, 23), new UIRoundedBorder(new Color(204, 204, 204), 1, 10))); north.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(11, 23, 6, 23), new UIRoundedBorder(new Color(204, 204, 204), 1, 10)));
String[] textArray = new String[] { String[] textArray = new String[] {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_TurnOn"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_TurnOff") com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_TurnOn"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_TurnOff")
@ -213,7 +213,6 @@ public class ReportColumnsPane extends BasicPane{
JPanel divideRowPane = column( JPanel divideRowPane = column(
20, 20,
cell(wrapComponentWithTitle(north, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Style"))), cell(wrapComponentWithTitle(north, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Style"))),
cell(north),
cell(center) cell(center)
).getComponent(); ).getComponent();
@ -344,15 +343,15 @@ public class ReportColumnsPane extends BasicPane{
10, 10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Data") + ":")).weight(0.12), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Data") + ":")).weight(0.12),
cell(repeatColDataTextField).weight(0.33), cell(repeatColDataTextField).weight(0.33),
cell(new UILabel("<html><font color=gray>" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Format") + ": A2:D5 " + "</font></html>")).weight(0.15), cell(new UILabel("<html><font color=gray>" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Format") + ": A2:D5 " + "</font></html>")).weight(0.2),
flex(0.4) flex(0.35)
), ),
row( row(
10, 10,
cell(copyLabel).weight(0.12), cell(copyLabel).weight(0.12),
cell(copyTitleTextField).weight(0.33), cell(copyTitleTextField).weight(0.33),
cell(new UILabel("<html><font color=gray>" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Format") + ": 1,2-3,5,18" + "</font></html>")).weight(0.15), cell(new UILabel("<html><font color=gray>" + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Format") + ": 1,2-3,5,18" + "</font></html>")).weight(0.2),
flex(0.4) flex(0.35)
) )
).getComponent(); ).getComponent();

66
designer-realize/src/main/java/com/fr/design/report/ReportEnginePane.java

@ -1,6 +1,7 @@
package com.fr.design.report; package com.fr.design.report;
import com.fine.theme.utils.FineUIScale; import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editor.editor.IntegerEditor; import com.fr.design.editor.editor.IntegerEditor;
@ -48,6 +49,7 @@ import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.box; import static com.fine.swing.ui.layout.Layouts.box;
import static com.fine.swing.ui.layout.Layouts.fix;
import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle; import static com.fine.theme.utils.FineUIUtils.wrapComponentWithTitle;
import static com.fine.theme.utils.FineUIScale.scale; import static com.fine.theme.utils.FineUIScale.scale;
@ -92,7 +94,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160))); outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160)));
outAdvicePane.add(createAdvicePane()); outAdvicePane.add(createAdvicePane());
this.add(column(10, this.add(column(20,
cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))), cell(wrapComponentWithTitle(outReportEnginePane, Toolkit.i18nText("Fine-Design_Report_Report_Engine_Attribute"))),
cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))).weight(1.0), cell(wrapComponentWithTitle(outPagingEngineSelectPane, Toolkit.i18nText("Fine-Design_Report_Paging_Engine_Select"))).weight(1.0),
cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice")))) cell(wrapComponentWithTitle(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice"))))
@ -135,7 +137,8 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
* 目前先屏蔽后面新引擎显示页码再加上相关代码 * 目前先屏蔽后面新引擎显示页码再加上相关代码
*/ */
private void createEngineXSettingPane() { private void createEngineXSettingPane() {
outEngineXSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine")); outEngineXSettingPane = new JPanel(new BorderLayout());
UILabel title = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_New_Engine"));
JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel engineXSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
@ -151,17 +154,26 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
rowCountBox.setSelected(false); rowCountBox.setSelected(false);
rowCountPanel.add(rowCountBox); rowCountPanel.add(rowCountBox);
JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip")); JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip"));
engineXSettingPane.add(column(10, engineXSettingPane.add(row(20,
cell(pageQueryBoxPanel), column(10,
cell(engineXPageQueryPane), column(fix(6), cell(title)),
cell(rowCountPanel), cell(new UILabel()),
cell(tip)) cell(new UILabel()),
cell(new UILabel())
),
column(10,
cell(pageQueryBoxPanel),
cell(engineXPageQueryPane),
cell(rowCountPanel),
cell(tip)))
.getComponent()); .getComponent());
outEngineXSettingPane.add(engineXSettingPane); outEngineXSettingPane.add(engineXSettingPane);
} }
private void createLineEngineSettingPane() { private void createLineEngineSettingPane() {
outLineEngineSettingPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine")); outLineEngineSettingPane = new JPanel(new BorderLayout());
UILabel title = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Line_Engine"));
JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane(); JPanel lineEngineSettingPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_M_Pane();
JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging")); lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
@ -174,10 +186,15 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
lineEngineSettingPane.add(lineEnginePageQueryPane); lineEngineSettingPane.add(lineEnginePageQueryPane);
lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane)); lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane));
JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip")); JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip"));
lineEngineSettingPane.add(column(10, lineEngineSettingPane.add(row(20,
cell(pageQueryBoxPanel), column(10,
cell(lineEnginePageQueryPane), column(fix(6), cell(title)),
cell(tipPane)) cell(new UILabel()),
cell(new UILabel())),
column(10,
cell(pageQueryBoxPanel),
cell(lineEnginePageQueryPane),
cell(tipPane)))
.getComponent()); .getComponent());
outLineEngineSettingPane.add(lineEngineSettingPane); outLineEngineSettingPane.add(lineEngineSettingPane);
} }
@ -191,12 +208,12 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
} }
private JPanel createPageQueryPane(IntegerEditor countPerPageEditor) { private JPanel createPageQueryPane(IntegerEditor countPerPageEditor) {
double p = TableLayout.PREFERRED; JPanel pageQueryPane = new JPanel(new BorderLayout());
double rowSize[] = {p, p}; pageQueryPane.setBorder(new ScaledEmptyBorder(0, 8, 0, 0));
double columnSize[] = {p, p}; pageQueryPane.add(row(4,
Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage") + ":"), countPerPageEditor}}; cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage"))),
JPanel pageQueryPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); cell(countPerPageEditor)
pageQueryPane.setBorder(BorderFactory.createEmptyBorder(5, 15, 0, 0)); ).getComponent());
return pageQueryPane; return pageQueryPane;
} }
@ -242,16 +259,9 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
buttonGroup.add(lineEngine); buttonGroup.add(lineEngine);
radioButtons.add(newEngine); radioButtons.add(newEngine);
radioButtons.add(lineEngine); radioButtons.add(lineEngine);
double p = TableLayout.FILL;
double[] rowSize = {p}; JPanel pagingEngineRadioPanel = new JPanel(new BorderLayout());
double[] columnSize = {p, p, p, p, p}; pagingEngineRadioPanel.add(row(20, cell(newEngine), cell(lineEngine)).getComponent());
Component[][] components = new Component[][]{
new Component[]{
newEngine,
lineEngine
}
};
JPanel pagingEngineRadioPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
newEngine.addActionListener(new EngineSelectActionListener(newEngine, engineSettingPane, outEngineXSettingPane, outLineEngineSettingPane)); newEngine.addActionListener(new EngineSelectActionListener(newEngine, engineSettingPane, outEngineXSettingPane, outLineEngineSettingPane));
lineEngine.addActionListener(new EngineSelectActionListener(lineEngine, engineSettingPane, outLineEngineSettingPane, outEngineXSettingPane)); lineEngine.addActionListener(new EngineSelectActionListener(lineEngine, engineSettingPane, outLineEngineSettingPane, outEngineXSettingPane));
return pagingEngineRadioPanel; return pagingEngineRadioPanel;

74
designer-realize/src/main/java/com/fr/design/report/WriteShortCutsPane.java

@ -19,13 +19,14 @@ import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; 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;
import static com.fine.swing.ui.layout.Layouts.flex;
public class WriteShortCutsPane extends JPanel{ public class WriteShortCutsPane extends JPanel{
private static final int V_GAP = 20; private static final int V_GAP = 20;
private static final int MAX_LABEL_WIDTH = 100; private static final int MAX_LABEL_WIDTH = 100;
@ -49,45 +50,35 @@ public class WriteShortCutsPane extends JPanel{
} }
private JPanel createContentPane() { private JPanel createContentPane() {
JPanel contentPane = new JPanel(); JPanel contentPane = new JPanel(new BorderLayout());
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
// 纵向布局,横向自适应 contentPane.add(column(20,
contentPane.setLayout(new GridBagLayout()); cell(FineUIUtils.wrapComponentWithTitle(getFeatureNamePane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Shortcut_Set"))),
GridBagConstraints cons = new GridBagConstraints(); cell(FineUIUtils.wrapComponentWithTitle(getHintsPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")))
cons.fill = GridBagConstraints.HORIZONTAL; ).getComponent());
cons.weightx = 1;
cons.gridx = 0;
cons.insets = new Insets(20, 0, 0, 0);
contentPane.add(getFeatureNamePane(), cons);
contentPane.add(getHintsPane(), cons);
return contentPane; return contentPane;
} }
private JPanel getFeatureNamePane(){ private JPanel getFeatureNamePane(){
JPanel featureNamePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Shortcut_Set")); JPanel featureNamePane = new JPanel(new BorderLayout());
featureNamePane.setLayout(new BorderLayout()); featureNamePane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0));
UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.RIGHT);
UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.CENTER);
UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER); UILabel nextCol = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Column"), SwingConstants.CENTER);
UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER); UILabel nextRow = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Next_Row"), SwingConstants.CENTER);
UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"), SwingConstants.CENTER); UILabel shortName = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Current_Keys"), SwingConstants.RIGHT);
UIComponentUtils.setLineWrap(shortName, MAX_LABEL_WIDTH); UIComponentUtils.setLineWrap(shortName, MAX_LABEL_WIDTH);
nextColHK = new UILabel(nextColString, SwingConstants.CENTER); nextColHK = new UILabel(nextColString, SwingConstants.CENTER);
JPanel switchBtnPane = getSwitchBtnPane(); JPanel switchBtnPane = getSwitchBtnPane();
nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER); nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new GridLayout(2, 4, 0, 0)); JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(name); centerPane.add(column(24,
centerPane.add(nextCol); row(10, cell(name).weight(0.13), cell(nextCol).weight(0.15), cell(new JPanel()).weight(0.12), cell(nextRow).weight(0.15), flex(0.45)),
centerPane.add(new JPanel()); row(10, cell(shortName).weight(0.13), cell(nextColHK).weight(0.15), cell(switchBtnPane).weight(0.12), cell(nextRowHK).weight(0.15), flex(0.45))
centerPane.add(nextRow); ).getComponent());
centerPane.add(shortName);
centerPane.add(nextColHK);
centerPane.add(switchBtnPane);
centerPane.add(nextRowHK);
featureNamePane.add(centerPane, BorderLayout.CENTER); featureNamePane.add(centerPane, BorderLayout.CENTER);
@ -104,25 +95,22 @@ public class WriteShortCutsPane extends JPanel{
} }
private JPanel getHintsPane(){ private JPanel getHintsPane(){
JPanel hintsPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")); JPanel hintsPane = new JPanel(new BorderLayout());
hintsPane.setLayout(new BorderLayout()); hintsPane.setBorder(BorderFactory.createEmptyBorder(16, 0, 0, 0));
UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.CENTER); UILabel systemDefault = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_System_Default"), SwingConstants.RIGHT);
UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER); UILabel preColText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Column"), SwingConstants.CENTER);
UILabel preRowText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Row"), SwingConstants.CENTER); UILabel preRowText = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cursor_To_Previous_Row"), SwingConstants.CENTER);
preCol = new UILabel("Shift+" + nextColString, SwingConstants.CENTER); preCol = new UILabel("Shift+" + nextColString, SwingConstants.LEFT);
preRow = new UILabel("Shift+" + nextRowString, SwingConstants.CENTER); preRow = new UILabel("Shift+" + nextRowString, SwingConstants.LEFT);
JPanel centerPane = new JPanel(new GridLayout(2, 3, 0, V_GAP));
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 100));
centerPane.add(systemDefault); JPanel centerPane = new JPanel(new BorderLayout());
centerPane.add(preColText); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(preCol);
centerPane.add(new JPanel()); centerPane.add(column(24,
centerPane.add(preRowText); row(10, cell(systemDefault).weight(0.13), cell(preColText).weight(0.24), cell(preCol).weight(0.14), flex(0.64)),
centerPane.add(preRow); row(10, cell(new JPanel()).weight(0.13), cell(preRowText).weight(0.24), cell(preRow).weight(0.14), flex(0.64))
).getComponent());
hintsPane.add(centerPane, BorderLayout.CENTER); hintsPane.add(centerPane, BorderLayout.CENTER);

2
designer-realize/src/main/java/com/fr/design/webattr/CommonPane.java

@ -41,7 +41,7 @@ public class CommonPane extends JPanel {
), ),
//报表缓存有效时间 //报表缓存有效时间
row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cache_Validate_Time"))).weight(0.2), row(cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Cache_Validate_Time"))).weight(0.2),
row(cell(this.cacheValidateTimeEditor).weight(0.7), fix(5), cell(new UILabel("milliseconds")).weight(0.3)).weight(0.4), row(cell(this.cacheValidateTimeEditor).weight(0.6), fix(5), cell(new UILabel("milliseconds")).weight(0.4)).weight(0.4),
flex(0.4) flex(0.4)
) )
).with(it -> it.setBorder(new ScaledEmptyBorder(10,10,10,10))).getComponent()); ).with(it -> it.setBorder(new ScaledEmptyBorder(10,10,10,10))).getComponent());

43
designer-realize/src/main/java/com/fr/design/widget/CellWidgetCardPane.java

@ -7,9 +7,7 @@ import com.fr.design.dialog.AttrScrollPane;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.design.gui.ibutton.UIHeadGroup; import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.widget.mobile.WidgetMobilePane; import com.fr.design.widget.mobile.WidgetMobilePane;
@ -36,7 +34,9 @@ public class CellWidgetCardPane extends BasicPane {
private WidgetMobilePane currentWidgetMobilePane; private WidgetMobilePane currentWidgetMobilePane;
//属性配置切换面板 //属性配置切换面板
private ArrayList<JPanel> paneList; private ArrayList<JPanel> paneList;
private FineTabbedPane tabsPane; private JPanel center;
private UIHeadGroup tabsHeaderIconPane;
private CardLayout tabbedPane;
private BasicWidgetPropertySettingPane widgetPropertyPane; private BasicWidgetPropertySettingPane widgetPropertyPane;
//通用属性容器 //通用属性容器
@ -64,11 +64,31 @@ public class CellWidgetCardPane extends BasicPane {
this.removeAll(); this.removeAll();
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
tabbedPane = new CardLayout();
center = new JPanel(tabbedPane);
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")}; final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal")};
tabsHeaderIconPane = new UIHeadGroup(tabTitles) {
@Override
public void tabChanged(int index) {
tabbedPane.show(center, tabTitles[index]);
}
};
JPanel wrapperPane = new JPanel(new BorderLayout());
wrapperPane.add(tabsHeaderIconPane, BorderLayout.NORTH);
wrapperPane.add(center, BorderLayout.CENTER);
wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10));
this.add(wrapperPane, BorderLayout.CENTER);
// 属性 // 属性
attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
BasicScrollPane basicScrollPane = new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return attriTabPane;
}
};
widgetPropertyPane = new BasicWidgetPropertySettingPane(); widgetPropertyPane = new BasicWidgetPropertySettingPane();
UIExpandablePane basicPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane); UIExpandablePane basicPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane);
attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
@ -91,17 +111,10 @@ public class CellWidgetCardPane extends BasicPane {
mobileCardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); mobileCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
mobileTabPane.add(mobileCardPane, BorderLayout.CENTER); mobileTabPane.add(mobileCardPane, BorderLayout.CENTER);
mobileCardLayout = (CardLayout) mobileCardPane.getLayout(); mobileCardLayout = (CardLayout) mobileCardPane.getLayout();
tabsPane = FineTabbedPane.builder()
.addTab(tabTitles[0], new UIScrollPane(attriTabPane))
.addTab(tabTitles[1], eventTabPane)
.addTab(tabTitles[2], mobileTabPane)
.build();
JPanel wrapperPane = new JPanel(new BorderLayout());
wrapperPane.add(tabsPane, BorderLayout.CENTER);
wrapperPane.setBorder(new ScaledEmptyBorder(0, 10, 0, 10));
wrapperPane.setOpaque(false);
this.add(wrapperPane, BorderLayout.CENTER);
center.add(basicScrollPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Attribute"));
center.add(eventTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Event"));
center.add(mobileTabPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Mobile_Terminal"));
initPaneList(); initPaneList();
} }
@ -109,7 +122,7 @@ public class CellWidgetCardPane extends BasicPane {
private void initPaneList() { private void initPaneList() {
paneList = new ArrayList<JPanel>(); paneList = new ArrayList<JPanel>();
paneList.add(attriTabPane); paneList.add(attriTabPane);
paneList.add(eventTabPane); paneList.add(eventPane);
paneList.add(mobileTabPane); paneList.add(mobileTabPane);
} }
@ -148,7 +161,7 @@ public class CellWidgetCardPane extends BasicPane {
currentWidgetMobilePane = mobilePane; currentWidgetMobilePane = mobilePane;
//tabsHeaderIconPane.setSelectedIndex(0); tabsHeaderIconPane.setSelectedIndex(0);
} }
public Widget update() { public Widget update() {

33
designer-realize/src/main/java/com/fr/design/widget/ValueWidgetPane.java

@ -15,11 +15,6 @@ import com.fr.form.ui.WidgetValue;
import java.awt.*; 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 ValueWidgetPane extends WidgetPane { public class ValueWidgetPane extends WidgetPane {
private JPanel widgetValuePane; private JPanel widgetValuePane;
private WidgetValueEditor widgetValueEditor; private WidgetValueEditor widgetValueEditor;
@ -32,24 +27,18 @@ public class ValueWidgetPane extends WidgetPane {
public JPanel initNorthPane(){ public JPanel initNorthPane(){
JPanel northPane = super.initNorthPane(); JPanel northPane = super.initNorthPane();
label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Value")); label = new UILabel(" " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Widget_Value")+ ":");
label.setVisible(false); label.setVisible(false);
widgetValuePane = new JPanel(new BorderLayout()); widgetValuePane = new JPanel();
widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel centerPane = new JPanel(new BorderLayout()); double p = TableLayout.PREFERRED;
centerPane.setOpaque(false); double f = TableLayout.FILL;
widgetValuePane.setOpaque(false); double[] columnSize = {p, p, f};
centerPane.add(row( double[] rowSize = {p};
cell(label).weight(68), Component[][] components = new Component[][]{
cell(widgetValuePane).weight(372)).getComponent() new Component[]{northPane, label,widgetValuePane},
); };
JPanel jPanel = new JPanel(); JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
jPanel.setBackground(Color.WHITE);
jPanel.setLayout(new BorderLayout());
jPanel.add(column(10, true,
cell(northPane),
cell(centerPane)
).getComponent());
return jPanel; return jPanel;
} }

8
designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java

@ -80,8 +80,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
this.add(column( this.add(column(
10, 10,
cell(northPane).weight(0.17), cell(northPane),
cell(cellEditorCardPane).weight(0.83) cell(cellEditorCardPane).weight(1)
).getComponent() ).getComponent()
); );
} }
@ -90,8 +90,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
return column( return column(
row( row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(68), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(LEFT_WEIGHT),
cell(editorTypeComboBox).weight(372) cell(editorTypeComboBox).weight(RIGHT_WEIGHT)
) )
).getComponent(); ).getComponent();
} }

14
designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

@ -15,6 +15,8 @@ import java.awt.BorderLayout;
import static com.fine.swing.ui.layout.Layouts.cell; import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row; import static com.fine.swing.ui.layout.Layouts.row;
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT;
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT;
public class BasicWidgetPropertySettingPane extends BasicPane { public class BasicWidgetPropertySettingPane extends BasicPane {
@ -31,11 +33,13 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
widgetNameComboBox = new ParameterTreeComboBox(); widgetNameComboBox = new ParameterTreeComboBox();
widgetNameComboBox.refreshTree(); widgetNameComboBox.refreshTree();
this.add(row(LayoutConstants.HORIZONTAL_GAP, this.add(column(LayoutConstants.VERTICAL_GAP,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(0.2), row(
cell(widgetNameComboBox).weight(0.6), cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(LEFT_WEIGHT),
cell(enableCheckBox).weight(0.1), cell(widgetNameComboBox).weight(RIGHT_WEIGHT)
cell(visibleCheckBox).weight(0.1) ),
cell(enableCheckBox),
cell(visibleCheckBox)
).getComponent()); ).getComponent());
} }

176
designer-realize/src/main/java/com/fr/design/widget/ui/DateEditorDefinePane.java

@ -1,14 +1,16 @@
package com.fr.design.widget.ui; package com.fr.design.widget.ui;
import com.fine.theme.light.ui.FineRoundBorder; import com.fr.base.FRContext;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.data.core.FormatField; import com.fr.data.core.FormatField;
import com.fr.design.constants.LayoutConstants; import com.fr.design.border.UIRoundedBorder;
import com.fr.design.constants.UIConstants;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.component.DateValuePane; import com.fr.design.widget.component.DateValuePane;
import com.fr.design.widget.component.UIComboBoxNoArrow; import com.fr.design.widget.component.UIComboBoxNoArrow;
import com.fr.design.widget.ui.designer.date.DateFormatCheckManager; import com.fr.design.widget.ui.designer.date.DateFormatCheckManager;
@ -17,30 +19,29 @@ import com.fr.form.ui.DateEditor;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder;
import javax.swing.plaf.BorderUIResource; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; 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;
import static com.fine.swing.ui.layout.Layouts.flex;
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT;
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT;
public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor> { public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor> {
private UIButtonGroup returnTypeButtonGroup; private UIButtonGroup returnTypeComboBox;
private DateValuePane startDv; private DateValuePane startDv;
private DateValuePane endDv; private DateValuePane endDv;
private UIComboBox currentFormatComboBox; private UIComboBox currentFormatComboBox;
private UILabel currentSampleLabel; private UILabel currentSamplelabel;
private UIButtonGroup formatButtonGroup; private UIButtonGroup fomatHeadGroup;
private static final int SAMPLE_LABEL_PADDING = 4;
public DateEditorDefinePane() { public DateEditorDefinePane() {
} }
@ -52,22 +53,33 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
@Override @Override
protected JPanel setSecondContentPane() { protected JPanel setSecondContentPane() {
returnTypeButtonGroup = new UIButtonGroup<>(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date") , returnTypeComboBox = new UIButtonGroup<>(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date") , com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_String")});
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_String")});
JPanel formatHead = createFormatHead(); JPanel formatHead = createFormatHead();
startDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date")); startDv = new DateValuePane();
endDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date")); endDv = new DateValuePane();
UILabel returnTypeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type")); double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
return column(LayoutConstants.VERTICAL_GAP, UILabel formatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format"));
cell(formatHead), formatLabel.setVerticalAlignment(SwingConstants.TOP);
cell(startDv), UILabel startDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date"));
cell(endDv), startDateLabel.setVerticalAlignment(SwingConstants.TOP);
cell(waterMarkDictPane), UILabel endDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date"));
row( endDateLabel.setVerticalAlignment(SwingConstants.TOP);
cell(returnTypeLabel).weight(LEFT_WEIGHT), cell(returnTypeButtonGroup).weight(1.4), flex(1.6) Component[][] components = new Component[][]{
) new Component[]{formatLabel, formatHead},
).getComponent(); new Component[]{startDateLabel, startDv},
new Component[]{endDateLabel, endDv},
new Component[]{waterMarkDictPane, null},
new Component[]{extraPane, null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type")), returnTypeComboBox }
};
double[] rowSize = {p, p, p, p, p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 3},{1, 1},{1, 1},{1, 1},{1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1);
return panel;
} }
@Override @Override
@ -76,20 +88,20 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
} }
private JPanel createFormatPane(UIComboBox formatComboBox, UILabel sampleLabel){ private JPanel createFormatPane(UIComboBox formatComboBox, UILabel sampleLabel){
JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
previewPane.setPreferredSize(formatComboBox.getPreferredSize());
previewPane.setBorder(new BorderUIResource.CompoundBorderUIResource(
new FineRoundBorder(),
new EmptyBorder(0, 8, 0, 0)
));
previewPane.add(sampleLabel, BorderLayout.WEST);
return column(LayoutConstants.VERTICAL_GAP, true,
cell(formatComboBox),
cell(previewPane).weight(1.0)
).getComponent(); JPanel previewPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
TitledBorder titledBorder = new TitledBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, 5), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample"), 4, 2, this.getFont(), UIConstants.LINE_COLOR);
previewPane.setBorder(titledBorder);
JPanel sampleLabelWrapper = new JPanel(new BorderLayout());
sampleLabelWrapper.setBorder(BorderFactory.createEmptyBorder(0, SAMPLE_LABEL_PADDING, SAMPLE_LABEL_PADDING, SAMPLE_LABEL_PADDING));
sampleLabelWrapper.add(sampleLabel, BorderLayout.CENTER);
previewPane.add(sampleLabelWrapper, BorderLayout.CENTER);
JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
jPanel.add(previewPane, BorderLayout.NORTH);
jPanel.add(formatComboBox, BorderLayout.CENTER);
return jPanel;
} }
private UILabel createSamplePane(){ private UILabel createSamplePane(){
@ -101,51 +113,58 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
} }
}; };
sampleLabel.setHorizontalAlignment(SwingConstants.CENTER); sampleLabel.setHorizontalAlignment(SwingConstants.CENTER);
sampleLabel.setFont(this.getFont()); sampleLabel.setFont(FRContext.getDefaultValues().getFRFont());
sampleLabel.setForeground(FlatUIUtils.getUIColor("Label.tipColor", Color.GRAY));
return sampleLabel; return sampleLabel;
} }
private JPanel createFormatHead(){ private JPanel createFormatHead(){
UILabel formatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format"));
String[] dateArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.DATE); String[] dateArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.DATE);
String[] timeArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.TIME); String[] timeArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.TIME);
final UIComboBox dateFormatComboBox = new UIComboBoxNoArrow(dateArray); final UIComboBox dateFormatComboBox = new UIComboBoxNoArrow(dateArray);
final UIComboBox timeFormatComboBox = new UIComboBoxNoArrow(timeArray); final UIComboBox timeFormatComboBox = new UIComboBoxNoArrow(timeArray);
dateFormatComboBox.addActionListener(e -> refreshPreviewLabel()); dateFormatComboBox.addActionListener(new ActionListener(){
timeFormatComboBox.addActionListener(e -> refreshPreviewLabel()); public void actionPerformed(ActionEvent e){
refreshPreviewLabel();
}
});
timeFormatComboBox.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
refreshPreviewLabel();
}
});
final UILabel dateSampleLabel = createSamplePane(); final UILabel dateSampleLabel = createSamplePane();
final UILabel timeSampleLabel = createSamplePane(); final UILabel timeSampleLabel = createSamplePane();
JPanel fomatHeadPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
final CardLayout cardLayout = new CardLayout(); final CardLayout cardLayout = new CardLayout();
final JPanel customPane = new JPanel(cardLayout); final JPanel customPane = new JPanel(cardLayout);
JPanel dateFormatPane = createFormatPane(dateFormatComboBox, dateSampleLabel); JPanel dateFormatPane = createFormatPane(dateFormatComboBox, dateSampleLabel);
JPanel timeFormatPane = createFormatPane(timeFormatComboBox, timeSampleLabel); JPanel timeFormatPane = createFormatPane(timeFormatComboBox, timeSampleLabel);
customPane.add(dateFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date")); customPane.add(dateFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"));
customPane.add(timeFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")); customPane.add(timeFormatPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time"));
final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), final String[] tabTitles = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")};
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}; fomatHeadGroup = new UIButtonGroup(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")});
formatButtonGroup = new UIButtonGroup<>(new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Date"), fomatHeadGroup.addChangeListener(new ChangeListener() {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_StyleFormat_Time")}); @Override
formatButtonGroup.addChangeListener(e -> { public void stateChanged(ChangeEvent e) {
int newSelectedIndex = formatButtonGroup.getSelectedIndex(); int newSelectedIndex = fomatHeadGroup.getSelectedIndex();
cardLayout.show(customPane, tabTitles[newSelectedIndex]); cardLayout.show(customPane, tabTitles[newSelectedIndex]);
if(newSelectedIndex == 0){ if(newSelectedIndex == 0){
currentFormatComboBox = dateFormatComboBox; currentFormatComboBox = dateFormatComboBox;
currentSampleLabel = dateSampleLabel; currentSamplelabel = dateSampleLabel;
}else{ }else{
currentFormatComboBox = timeFormatComboBox; currentFormatComboBox = timeFormatComboBox;
currentSampleLabel = timeSampleLabel; currentSamplelabel = timeSampleLabel;
}
refreshPreviewLabel();
} }
refreshPreviewLabel();
}); });
return column(LayoutConstants.VERTICAL_GAP, fomatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH);
row( fomatHeadPane.add(customPane, BorderLayout.CENTER);
cell(formatLabel).weight(LEFT_WEIGHT), cell(formatButtonGroup).weight(1.4), flex(1.6) return fomatHeadPane;
),
row(flex(LEFT_WEIGHT), cell(customPane).weight(RIGHT_WEIGHT))
).getComponent();
} }
private void refreshPreviewLabel() { private void refreshPreviewLabel() {
String text = (String) currentFormatComboBox.getSelectedItem(); String text = (String) currentFormatComboBox.getSelectedItem();
if (text != null && text.length() > 0) { if (text != null && text.length() > 0) {
@ -153,15 +172,14 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(text); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(text);
String sample = simpleDateFormat.format(new Date()); String sample = simpleDateFormat.format(new Date());
DateFormatCheckResult result = DateFormatCheckManager.check(sample, text); DateFormatCheckResult result = DateFormatCheckManager.check(sample, text);
currentSampleLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample") + ":" + result.getSample()); currentSamplelabel.setText(result.getSample());
currentSampleLabel.setForeground(result.getColor()); currentSamplelabel.setForeground(result.getColor());
} catch (Exception exp) { } catch (Exception exp) {
currentSampleLabel.removeAll(); currentSamplelabel.setForeground(Color.red);
currentSampleLabel.setForeground(Color.red); currentSamplelabel.setText(exp.getMessage());
currentSampleLabel.setText(exp.getMessage());
} }
} else { } else {
currentSampleLabel.setText(new Date().toString()); currentSamplelabel.setText(new Date().toString());
} }
} }
@ -181,11 +199,11 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
@Override @Override
protected void populateSubDirectWriteEditorBean(DateEditor e) { protected void populateSubDirectWriteEditorBean(DateEditor e) {
String formatText = e.getFormatText(); String formatText = e.getFormatText();
formatButtonGroup.setSelectedIndex(getDateType(e)); fomatHeadGroup.setSelectedIndex(getDateType(e));
formatButtonGroup.populateBean(); fomatHeadGroup.populateBean();
currentFormatComboBox.setSelectedItem(formatText); currentFormatComboBox.setSelectedItem(formatText);
returnTypeButtonGroup.setSelectedIndex(e.isReturnDate() ? 0 : 1); returnTypeComboBox.setSelectedIndex(e.isReturnDate() ? 0 : 1);
startDv.populate(e.getStartDate()); startDv.populate(e.getStartDate());
endDv.populate(e.getEndDate()); endDv.populate(e.getEndDate());
} }
@ -194,7 +212,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
protected DateEditor updateSubDirectWriteEditorBean() { protected DateEditor updateSubDirectWriteEditorBean() {
DateEditor ob = new DateEditor(); DateEditor ob = new DateEditor();
ob.setFormatText(this.getSimpleDateFormat().toPattern()); ob.setFormatText(this.getSimpleDateFormat().toPattern());
ob.setReturnDate(returnTypeButtonGroup.getSelectedIndex() == 0); ob.setReturnDate(returnTypeComboBox.getSelectedIndex() == 0);
ob.setStartDate(startDv.update()); ob.setStartDate(startDv.update());
ob.setEndDate(endDv.update()); ob.setEndDate(endDv.update());

14
designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java

@ -1,6 +1,7 @@
package com.fr.design.write.submit; package com.fr.design.write.submit;
import com.fine.theme.icon.LazyIcon; import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIUtils;
import com.fr.data.SubmitJob; import com.fr.data.SubmitJob;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
@ -13,6 +14,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.scrollruler.ModLineBorder; import com.fr.design.scrollruler.ModLineBorder;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -191,19 +193,13 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
} }
csjConfigComboBox = new UIComboBox(configTypes.toArray()); csjConfigComboBox = new UIComboBox(configTypes.toArray());
//JPanel typePane = GUICoreUtils.createFlowPane(new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":"), csjConfigComboBox},
// FlowLayout.LEFT, 10);
JPanel typePane = new JPanel(new BorderLayout()); JPanel typePane = new JPanel(new BorderLayout());
typePane.add(row(10, typePane.add(row(10,
flex(0.002), cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type"))),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")).weight(0.158), cell(csjConfigComboBox)).getComponent());
cell(csjConfigComboBox).weight(0.84)).getComponent());
typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type")));
/*this.add(typePane, BorderLayout.NORTH);
this.add(customCardPane, BorderLayout.CENTER);*/
this.add(column( this.add(column(
cell(typePane), cell(FineUIUtils.wrapComponentWithTitle(typePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))),
cell(customCardPane).weight(1.0)).getComponent()); cell(customCardPane).weight(1.0)).getComponent());
csjConfigComboBox.addItemListener(new ItemListener() { csjConfigComboBox.addItemListener(new ItemListener() {

Loading…
Cancel
Save