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.formdev:flatlaf: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.fanruan.vito:gui-inspector:1.0.2'
testImplementation 'org.easymock:easymock:3.5.1'
testImplementation 'org.powermock:powermock-module-junit4: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);
wrapBoldLabelWithUnderline(label);
return column(LayoutConstants.VERTICAL_GAP,
cell(label), cell(component)
cell(label), cell(component).weight(1.0)
).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.IconUtils;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.imenu.UICheckBoxMenuItem;
import com.fr.design.gui.imenu.UIMenuEastAttrItem;
@ -116,11 +117,13 @@ public abstract class UpdateAction extends ShortCut implements Action {
this.enabled = newValue;
//循环遍历所有的Enable属性.
Iterator<Object> valueIt = this.componentMap.values().iterator();
while (valueIt.hasNext()) {
Object valueObject = valueIt.next();
if (valueObject instanceof JComponent) {
((JComponent) valueObject).setEnabled(this.enabled);
if (this.componentMap != null) {
Iterator<Object> valueIt = this.componentMap.values().iterator();
while (valueIt.hasNext()) {
Object valueObject = valueIt.next();
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;
import com.fine.theme.utils.FineUIScale;
import com.fr.decision.webservice.v10.log.download.utils.LogZipUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants;
@ -87,7 +88,7 @@ public class FeedbackToolboxDialog extends JDialog {
body.add(midPane, BorderLayout.CENTER);
midPane.add(infoPane, BorderLayout.NORTH);
Dimension dimension = new Dimension(662, 556);
body.setPreferredSize(dimension);
body.setPreferredSize(FineUIScale.scale(dimension));
this.body = body;
}
@ -102,8 +103,8 @@ public class FeedbackToolboxDialog extends JDialog {
} else {
this.uiDatePicker = new UIDatePicker(UIDatePicker.STYLE_CN_DATE1, null, this);
}
Dimension dimension = new Dimension(160, 100);
uiDatePicker.setPreferredSize(dimension);
Dimension dimension = new Dimension(100, 100);
uiDatePicker.setPreferredSize(FineUIScale.scale(dimension));
northPane.add(GUICoreUtils.createFlowPane(new Component[]{title, uiDatePicker}, FlowLayout.LEFT));
exportLogLabel = new UILabel();
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) {
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 l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table") + ":");
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 l3 = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Table"));
if (labelSize > 0) {
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;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.svg.IconUtils;
import com.fr.data.impl.AbstractDatabaseConnection;
import com.fr.data.impl.Connection;
@ -61,7 +62,7 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel {
protected UIButton initEditButton(UIButton editButton, Dimension buttonSize) {
editButton = new UILockButton(
EditLockUtils.CONNECTION_LOCKED_ICON,
IconUtils.readIcon("/com/fr/design/images/m_web/connection"),
new LazyIcon("connection"),
EditLockUtils.CONNECTION_LOCKED_TOOLTIPS,
null
);

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);
sqlTextScrollPane.setLineNumbersEnabled(true);
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());
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"));
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());
label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cursor"));
this.add(label);
this.setPreferredSize(new Dimension(10,20));
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cursor"));
this.setEnabled(false);
}

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

@ -104,7 +104,7 @@ public class FunctionManagerPane extends BasicPane {
@Override
public NameableCreator[] createNameableCreators() {
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};
}

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);
if (rftf != null) {
rftf.setColumns(4); // specify more width than we need
@ -148,7 +147,6 @@ public class ColumnRowPane extends JPanel implements UIObserver {
return false;
}
};
columnSpinner.setPreferredSize(new Dimension(60, 24));
JFormattedTextField cftf = GUICoreUtils.getSpinnerTextField(columnSpinner);
if (cftf != null) {
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( ) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel pane = FRGUIPaneFactory.createYBoxEmptyBorderPane();
JPanel pane = new JPanel(FRGUIPaneFactory.createBorderLayout());
this.add(pane, BorderLayout.NORTH);
UILabel colLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column"));
@ -35,8 +35,8 @@ public class ColumnRowVerticalPane extends ColumnRowPane {
initRowSpinner();
pane.add(column(10,
row(flex(0.005), cell(rowLabel).weight(0.195), cell(rowSpinner).weight(0.8)),
row(flex(0.005), cell(colLabel).weight(0.195), cell(columnSpinner).weight(0.8))
row(cell(rowLabel).weight(0.15), cell(rowSpinner).weight(0.85)),
row(cell(colLabel).weight(0.15), cell(columnSpinner).weight(0.85))
).getComponent());
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;
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.design.beans.BasicBeanPane;
import com.fr.design.editor.ValueEditorPane;
@ -19,6 +23,8 @@ import java.awt.event.ActionListener;
import java.util.ArrayList;
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> {
private UIButton addButton;
@ -27,12 +33,13 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
public ObjectProperiesPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
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);
this.add(buttonPane, BorderLayout.NORTH);
buttonPane.setPreferredSize(FineUIScale.scale(new Dimension(0, 24)));
this.addButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -43,8 +50,7 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
});
selectedItemPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
// selectedItemPane.setLayout(new BoxLayout(selectedItemPane,BoxLayout.Y_AXIS));
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
northPane.add(selectedItemPane, BorderLayout.NORTH);
@ -52,8 +58,12 @@ public class ObjectProperiesPane extends BasicBeanPane<ListMap> {
selectedItemScrollPane.setViewportView(northPane);
selectedItemScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(new FineRoundBorder());
centerPane.add(selectedItemScrollPane);
this.add(centerPane, BorderLayout.CENTER);
this.add(column(4,
cell(buttonPane),
cell(centerPane).weight(1.0)
).getComponent());
}
@Override

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

@ -1,5 +1,7 @@
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.design.dialog.BasicPane;
import com.fr.design.event.UIObserver;
@ -45,7 +47,7 @@ public class FollowingThemePane extends BasicPane implements UIObserver {
public FollowingThemePane(String name) {
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.setAutoFireStateChanged(false);
@ -74,7 +76,7 @@ public class FollowingThemePane extends BasicPane implements UIObserver {
double f = TableLayout.FILL;
JPanel followingThemePane =
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);
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.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
content.add(row(10,
cell(postComboBox).weight(0.75),
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
);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameter"), null));
this.add(column(
cell(northPane),
cell(parameterViewPane).weight(1.0)
cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, Toolkit.i18nText("Fine-Design_Basic_Parameter"))).weight(1.0)
).getComponent());
}

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

@ -1,5 +1,6 @@
package com.fr.design.hyperlink;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.Parameter;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -45,11 +46,10 @@ public class WebHyperlinkPane extends AbstractHyperLinkPane<WebHyperlink> {
extendPane.add(extendParametersCheckBox);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(),
getValueEditorPane(), extendPane);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Basic_Parameters"), null));
this.add(column(
cell(northPane),
cell(parameterViewPane).weight(1.0)
cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, Toolkit.i18nText("Fine-Design_Basic_Parameters"))).weight(1.0)
).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),
row(
cell(templatePathTextField),
cell(templateSelectButton))
cell(templateSelectButton)).weight(1.0)
).getComponent());
return templatePanel;
}
@ -195,9 +195,9 @@ public class ContentSettingPane extends AbstractHyperLinkPane<MobilePopupHyperli
fontPane = new CustomFontPane();
textSettingPanel.add(column(10,
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"))),
cell(fontPane))
cell(fontPane).weight(0.9))
).getComponent());
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;
import com.fr.base.BaseUtils;
import com.fr.design.constants.LayoutConstants;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.stable.Constants;
@ -46,9 +44,14 @@ public class CustomFontPane extends JPanel {
fontSizeComboBox.setEditable(true);
colorSelectPane = new UIColorButton();
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.svg"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.svg"));
underline = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.svg"));
bold = new UIToggleButton(new LazyIcon("bold"));
italic = new UIToggleButton(new LazyIcon("italic"));
underline = new UIToggleButton(new LazyIcon("underline"));
colorSelectPane.setOpaque(true);
bold.setOpaque(true);
italic.setOpaque(true);
underline.setOpaque(true);
this.setButtonsTips();
this.setButtonsSize(BUTTON_SIZE);
@ -56,11 +59,11 @@ public class CustomFontPane extends JPanel {
JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(row(10,
cell(fontSizeComboBox).weight(0.6),
cell(colorSelectPane).weight(0.1),
cell(bold).weight(0.1),
cell(italic).weight(0.1),
cell(underline).weight(0.1)
cell(fontSizeComboBox).weight(0.76),
cell(colorSelectPane).weight(0.06),
cell(bold).weight(0.06),
cell(italic).weight(0.06),
cell(underline).weight(0.06)
).getComponent());
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 spinnerPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 2,0));
Dimension dimension = new Dimension(60, 20);
spinner.setPreferredSize(dimension);
UILabel percent = new UILabel("%");
spinnerPane.add(spinner);
spinnerPane.add(percent);
UILabel label = new UILabel(labelText);
label.setPreferredSize(dimension);
label.setHorizontalAlignment(SwingConstants.CENTER);
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);
jp.add(row(10,
cell(titleLabel),
cell(contentPanel)
cell(contentPanel).weight(1.0)
).getComponent());
return jp;
}

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

@ -1,5 +1,6 @@
package com.fr.design.javascript;
import com.fine.theme.utils.FineUIStyle;
import com.fr.config.EmailServerConfig;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.UIConstants;
@ -49,7 +50,7 @@ public class EmailPane extends FurtherBasicBeanPane<EmailJavaScript> {
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 10));
tipsPane1 = new UILabel();
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"));
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;
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.border.UIRoundedBorder;
import com.fr.design.constants.KeyWords;
@ -188,12 +190,13 @@ public class JSContentPane extends BasicPane {
labelPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
labelPane.add(label,BorderLayout.CENTER);
JPanel jsParaPane = new JPanel(new BorderLayout());
funNameLabel.setBackground(FineUIUtils.getUIColor("background.normal", "background.normal"));
UIScrollPane scrollPane = new UIScrollPane(funNameLabel);
scrollPane.setOpaque(true);
scrollPane.setBorder(new UIRoundedBorder(UIConstants.TITLED_BORDER_COLOR, 1, UIConstants.ARC));
jsParaPane.add(row(10,
cell(scrollPane).weight(0.6),
cell(labelPane).weight(0.4)
cell(scrollPane).weight(0.55),
cell(labelPane).weight(0.45)
).getComponent());
return jsParaPane;
}

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

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

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

@ -1,5 +1,6 @@
package com.fr.design.menu;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.GraphHelper;
import com.fr.design.actions.UpdateAction;
import com.fr.design.gui.ilable.UILabel;
@ -52,11 +53,11 @@ public class NameSeparator extends UpdateAction {
}
public Dimension getSize() {
return new Dimension(super.getSize().width, 20);
return new Dimension(super.getSize().width, FineUIScale.scale(30));
}
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() {
this.setLayout(new BorderLayout());
//名字
nameTextField = new UITextField();
nameTextField = new UITextField(10);
nameTextField.setEditable(false);
//默认值
valueEditor = ValueEditorPaneFactory.createBasicValueEditorPane();
// richer:要排列显示的控件
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(nameTextField).weight(0.8),
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(valueEditor).weight(0.8),
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);
}

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;
import com.fine.theme.utils.FineUIScale;
import com.fr.decision.update.data.UpdateConstants;
import com.fr.decision.update.info.UpdateCallBack;
import com.fr.decision.update.info.UpdateProgressCallBack;
@ -295,7 +296,7 @@ public class UpdateMainDialog extends UIDialog {
loadingLabel = new LoadingLabel();
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.setPreferredSize(UPDATE_BUTTON);
updateButton.setPreferredSize(FineUIScale.scale(UPDATE_BUTTON));
updateButton.setEnabled(false);
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;
import com.fine.theme.light.ui.FineRoundBorder;
import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.base.Icon;
import com.fr.base.IconManager;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
@ -41,6 +43,7 @@ import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Window;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
@ -60,6 +63,10 @@ import java.awt.event.FocusListener;
import java.awt.geom.Rectangle2D;
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编辑
*/
@ -86,11 +93,11 @@ public class CustomIconPane extends BasicPane {
private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel iconLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon"));
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
centerPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Icon")));
JPanel noNamePane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane();
centerPane.add(noNamePane, BorderLayout.CENTER);
JPanel noNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
noNamePane.setBorder(new FineRoundBorder());
noNamePane.setBackground(Color.WHITE);
iconPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
// 开始加图标选择按钮
@ -100,14 +107,14 @@ public class CustomIconPane extends BasicPane {
refreshIconPane(false);
jsPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
jsPane.setPreferredSize(new Dimension(200, 180));
noNamePane.add(jsPane);
DescriptionTextArea des = new DescriptionTextArea(2);
des.setText(createDescriptionText());
centerPane.add(des, BorderLayout.SOUTH);
this.add(centerPane, BorderLayout.CENTER);
UILabel desLabel = new UILabel(createDescriptionText());
desLabel.setForeground(Color.GRAY);
centerPane.add(column(
cell(noNamePane).weight(0.9),
cell(desLabel).weight(0.1)
).getComponent());
JPanel eastPane = FRGUIPaneFactory.createCenterFlowInnerContainer_S_Pane();
JPanel buttonPane = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
@ -118,8 +125,10 @@ public class CustomIconPane extends BasicPane {
initEditButton(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);
}
if (this.iconName != null && ComparatorUtils.equals(this.iconName, selectedIconName)) {
g2d.setPaint(Color.RED);
g2d.setPaint(Color.BLUE);
} else {
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")));
cardLayout.show(customPane, tabTitles[index]);
});
this.add(
row(
cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(1.6), flex(1.4)
),
cell(customRow)
);
if (StringUtils.isNotEmpty(title)) {
this.add(
row(
cell(titleLabel).weight(1.2), cell(widgetValueHead).weight(3)
),
cell(customRow)
);
} else {
this.add(cell(widgetValueHead),cell(customPane));
}
}

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

@ -1,6 +1,7 @@
package com.fr.design.write.submit;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.GraphHelper;
import com.fr.data.AbstractClassJob;
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.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.flex;
/**
* Author : Shockway
@ -41,16 +43,17 @@ public abstract class CustomJobPane extends BasicBeanPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel reportletNamePane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
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"));
browserButton.setPreferredSize(new Dimension(
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"));
editButton.setPreferredSize(new Dimension(
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);
@ -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.add(row(10,
cell(classNameTextField).weight(0.8),
cell(browserButton).weight(0.1),
cell(editButton).weight(0.1)
).getComponent());
reportletNamePane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
reportletNamePane.add(row(4,
cell(classNameTextField).weight(1.0),
cell(browserButton),
cell(editButton)
).getComponent(), BorderLayout.CENTER);
objectProperiesPane = new ObjectProperiesPane();
objectProperiesPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"), null));
JPanel dsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
dsPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
dsPane.add(area);
dsPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description"), null));
this.add(column(
cell(reportletNamePane),
cell(objectProperiesPane).weight(1.0),
cell(dsPane)
this.add(column(20,
cell(FineUIUtils.wrapComponentWithTitle(reportletNamePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Class_Name"))),
cell(FineUIUtils.wrapComponentWithTitle(objectProperiesPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Property"))).weight(1.0),
cell(FineUIUtils.wrapComponentWithTitle(dsPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Custom_Job_Description")))
).getComponent());
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.theme.icon.LazyIcon;
import com.fine.swing.ui.layout.Spacer;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.BaseFormula;
import com.fr.base.Parameter;
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.DataBaseItems;
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.BasicPane;
import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.editor.ValueEditorPane;
@ -94,6 +98,7 @@ import java.util.EventObject;
import java.util.List;
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.cell;
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());
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());
typePane.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type")));
chooseTable = new ChoosePaneSupportFormula();
chooseTable.setBorder(BorderFactory.createTitledBorder(new ModLineBorder(ModLineBorder.TOP), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table")));
chooseTable.setTableNameComboBoxPopSize(160, 320);
chooseTable.setTableNameComboBoxPopSize(FineUIScale.scale(160), FineUIScale.scale(320));
// peter:编辑的TablePane
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));
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.setPreferredScrollableViewportSize(new Dimension(280, 150));
keyColumnValuesTable.setPreferredScrollableViewportSize(FineUIScale.scale(new Dimension(280, 150)));
keyColumnValuesTable.setShowHorizontalLines(true);
DefaultTableCellHeaderRenderer headerRenderer = new DefaultTableCellHeaderRenderer();
headerRenderer.setHorizontalAlignment(SwingConstants.LEFT);
keyColumnValuesTable.getTableHeader().setDefaultRenderer(headerRenderer);
northPane.add(column(10, true,
cell(typePane),
cell(chooseTable))
.getComponent());
this.add(column(10, true,
cell(northPane),
cell(editTablePane))
northPane.add(column(10,
cell(FineUIUtils.wrapComponentWithTitle(typePane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Submit_Type"))),
cell(FineUIUtils.wrapComponentWithTitle(chooseTable, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Base_Table"))))
.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();
addButtons(editTablePane);
addBottomPane();
addListeners();
}
@ -258,16 +266,19 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
UpdateCheckBox.setEnabled(b);
}
private void addBottomPane() {
JPanel eventPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
eventPane.add(addEventButton());
private JPanel initBottomPane() {
JPanel eventPane = new JPanel(new BorderLayout());
eventPane.setPreferredSize(createControlBtnPanePreferredSize());
eventPane.add(addEventButton(), BorderLayout.WEST);
JPanel conditionPane = this.createConditionPane();
JPanel btPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
btPane.add(eventPane, BorderLayout.CENTER);
btPane.add(conditionPane, BorderLayout.NORTH);
this.add(btPane, BorderLayout.SOUTH);
btPane.add(column(5,
cell(FineUIUtils.wrapComponentWithTitle(conditionPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Submit_Condition"))),
cell(eventPane)
).getComponent());
return btPane;
}
private UIButton addEventButton() {
@ -295,7 +306,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
private JPanel createConditionPane() {
JPanel conditionPane = new JPanel();
conditionPane.setPreferredSize(createConditionPanePreferredSize());
setBorderAndLayout(conditionPane);
@ -307,7 +317,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
DefaultTreeCellRenderer cr = (DefaultTreeCellRenderer) conditionsTree.getCellRenderer();
cr.setForeground(UIConstants.NORMAL_BACKGROUND);
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"));
addSubmitConditionButton.addActionListener(new ActionListener() {
@Override
@ -336,12 +346,12 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
});
JPanel controlBtnPane = new JPanel(new GridLayout(1, 1, 4, 4));
controlBtnPane.setPreferredSize(createControlBtnPanePreferredSize());
controlBtnPane.add(addSubmitConditionButton);
JPanel controlBtnPane = new JPanel(new BorderLayout());
controlBtnPane.setPreferredSize(FineUIScale.scale(new Dimension(122, 20)));
controlBtnPane.add(addSubmitConditionButton, BorderLayout.NORTH);
conditionPane.add(row(
cell(jp).weight(0.74),
column(cell(controlBtnPane).weight(0.5),cell(new UILabel()).weight(0.5)).weight(0.26)
cell(jp).weight(1.0),
cell(new Spacer(122).add(controlBtnPane))
).getComponent());
return conditionPane;
@ -349,8 +359,6 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
protected void setBorderAndLayout(JPanel jPanel) {
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) {
@ -359,7 +367,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
protected Dimension createConditionPanePreferredSize() {
return new Dimension(454, 80);
return FineUIScale.scale(new Dimension(454, 80));
}
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;
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.design.components.notification.NotificationDialog;
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.gui.ibutton.UIButton;
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.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
@ -141,7 +146,7 @@ public class EnvDetectorDialog extends JDialog {
JPanel headerPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
headerPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 12, 0));
this.detectButton = new UIButton(buttonStatus.getDesc()) {
this.detectButton = new UIToggleButton(buttonStatus.getDesc()) {
@Override
public ButtonUI getUI() {
@ -162,7 +167,6 @@ public class EnvDetectorDialog extends JDialog {
};
}
};
detectButton.setForeground(Color.WHITE);
detectButton.setToolTipText(buttonStatus.getDesc());
detectButton.addActionListener(event -> {
if (buttonStatus.isNotExecuting()) {
@ -171,9 +175,9 @@ public class EnvDetectorDialog extends JDialog {
stopDetecting(detectButton);
}
});
detectButton.setPreferredSize(new Dimension(68, 20));
detectButton.setBorderPainted(false);
detectButton.setContentAreaFilled(false);
detectButton.setForeground(FineUIUtils.getUIColor("background.normal", "background.normal"));
detectButton.setBackground(FineUIUtils.getUIColor("EnvDetectorButton.background", "EnvDetectorButton.background"));
headerPanel.add(detectButton, BorderLayout.WEST);
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">
<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"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.7 14.8828V6.2H15.9561C18.3552 6.2 20.3 8.14483 20.3 10.5439C20.3 12.872 18.4685 14.7724 16.1677 14.8828H8.7ZM6.5 14.8828V5.03226C6.5 4.46216 6.96216 4 7.53226 4H15.9561C19.5702 4 22.5 6.92981 22.5 10.5439C22.5 12.3184 21.7937 13.9279 20.6469 15.1067C23.4422 15.8574 25.5 18.4091 25.5 21.4414C25.5 25.0636 22.5636 28 18.9414 28H7.61765C7.00039 28 6.5 27.4996 6.5 26.8823V17.0878V14.8828ZM8.7 17.0878V25.8H18.9414C21.3486 25.8 23.3 23.8486 23.3 21.4414C23.3 19.0342 21.3486 17.0828 18.9414 17.0828H16.2159C16.1297 17.0861 16.0431 17.0878 15.9561 17.0878H8.7Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

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">
<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"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M13 6.1C13 5.49249 13.4925 5 14.1 5H24.9C25.5075 5 26 5.49249 26 6.1C26 6.70751 25.5075 7.2 24.9 7.2H20.7248L14.1248 24.8001H17.9C18.5075 24.8001 19 25.2925 19 25.9001C19 26.5076 18.5075 27.0001 17.9 27.0001H7.1C6.49249 27.0001 6 26.5076 6 25.9001C6 25.2925 6.49249 24.8001 7.1 24.8001H11.7752L18.3752 7.2H14.1C13.4925 7.2 13 6.70751 13 6.1Z" fill="#0A1C38" fill-opacity="0.9"/>
</svg>

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

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",
"bias": "insert/bias.svg",
"sub_report": "insert/sub_report.svg",
"float_normal": "insert/float_normal.svg",
"popup": {
"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.arc = $Button.arc
EnvDetecorButton.background = #FF419BF9
#---- CheckBox ----
CheckBox.arc = 4
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;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.Utils;
import com.fr.chart.web.ChartHyperRelateCellLink;
import com.fr.design.gui.columnrow.ColumnRowVerticalPane;
@ -42,7 +44,7 @@ public class ChartHyperRelateCellLinkPane extends AbstractHyperLinkPane<ChartHyp
}
private void initComponent() {
this.setLayout(FRGUIPaneFactory.createM_BorderLayout());
this.setLayout(new BorderLayout());
if (needRenamePane()) {
itemNameTextField = new UITextField();
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();
centerPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Cell")));
colRowPane = new ColumnRowVerticalPane();
centerPane.add(colRowPane, BorderLayout.NORTH);
addPaneInCenter(centerPane);
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(
cell(centerPane).weight(0.2),
cell(parameterViewPane).weight(0.8)
cell(FineUIUtils.wrapComponentWithTitle(centerPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Hyper_Related_Cell"))).weight(0.3),
cell(FineUIUtils.wrapComponentWithTitle(parameterViewPane, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter"))).weight(0.7)
).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;
import com.fine.theme.utils.FineUIScale;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.Utils;
import com.fr.chart.web.ChartHyperRelateFloatLink;
import com.fr.design.DesignModelAdapter;
import com.fr.design.constants.UIConstants;
import com.fr.design.gui.frpane.ReportletParameterViewPane;
import com.fr.design.gui.icombobox.UIComboBox;
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.stable.ParameterProvider;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.Border;
import javax.swing.border.LineBorder;
import javax.swing.border.TitledBorder;
import java.awt.Dimension;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* @author kunsnat E-mail:kunsnat@gmail.com
@ -53,30 +54,28 @@ public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane<ChartHy
if (needRenamePane()) {
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.setPreferredSize(new Dimension(90, 20));
JPanel pane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane();
pane.add(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert-Float") + ":"));
pane.add(floatNameBox);
Border boder = new LineBorder(UIConstants.TITLED_BORDER_COLOR);
Font font = null;
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));
// 圆角不行
centerPane.setBorder(border);
floatNameBox.setPreferredSize(new Dimension(FineUIScale.scale(160), FineUIScale.scale(24)));
JPanel pane = new JPanel(new BorderLayout());
pane.setBorder(BorderFactory.createEmptyBorder(4, 0, 4, 0));
UILabel floatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_M_Insert-Float"));
pane.add(row(20,
cell(floatLabel),
cell(floatNameBox)
).getComponent());
centerPane.add(pane, BorderLayout.NORTH);
addPaneInCenter(centerPane);
parameterViewPane = new ReportletParameterViewPane(getChartParaType(), getValueEditorPane(), getValueEditorPane());
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(500, 200));
this.add(parameterViewPane, BorderLayout.SOUTH);
this.add(column(10,
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) {

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

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

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.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
backgroundPane = new ReportBackgroundSpecialPane();
backgroundPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
backgroundPane.setBorder(new ScaledEmptyBorder(10, 0, 0, 10));
backgroundLabeledPane = TableLayoutHelper.createCommonTableLayoutPane(
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() {
@Override
@ -148,7 +148,7 @@ public class NewReportBackgroundPane extends BasicPane {
10,
Layouts.row(10, Layouts.cell(createLeftPane()), Layouts.cell(createRightPane()))
).getComponent();
contentContainer.setPreferredSize(new Dimension(600, 540));
contentContainer.setPreferredSize(FineUIScale.scale(new Dimension(600, 540)));
addAttributeChangeListener(new AttributeChangeListener() {
@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"))),
row(cell(isNeedPassword), fix(5), cell(passwordWritePane))
).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

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.SpinnerNumberModel;
import javax.swing.JFormattedTextField;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.frpane.FineTabbedPane;
@ -683,7 +685,7 @@ public class PageSetupPane extends BasicPane {
public ShowPagePane() {
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
// color.
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);
}
};
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)));
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")
@ -213,7 +213,6 @@ public class ReportColumnsPane extends BasicPane{
JPanel divideRowPane = column(
20,
cell(wrapComponentWithTitle(north, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Style"))),
cell(north),
cell(center)
).getComponent();
@ -344,15 +343,15 @@ public class ReportColumnsPane extends BasicPane{
10,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Column_Data") + ":")).weight(0.12),
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),
flex(0.4)
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.35)
),
row(
10,
cell(copyLabel).weight(0.12),
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),
flex(0.4)
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.35)
)
).getComponent();

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

@ -1,6 +1,7 @@
package com.fr.design.report;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.FineJOptionPane;
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.row;
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.FineUIScale.scale;
@ -92,7 +94,7 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
outAdvicePane.setPreferredSize(new Dimension(FineUIScale.scale(600), FineUIScale.scale(160)));
outAdvicePane.add(createAdvicePane());
this.add(column(10,
this.add(column(20,
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(outAdvicePane, Toolkit.i18nText("Fine-Design_Report_Advice"))))
@ -135,7 +137,8 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
* 目前先屏蔽后面新引擎显示页码再加上相关代码
*/
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 pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
engineXPageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
@ -151,17 +154,26 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
rowCountBox.setSelected(false);
rowCountPanel.add(rowCountBox);
JPanel tip = createTipPane(Toolkit.i18nText("Fine-Design_Report_Engine_X_tip"));
engineXSettingPane.add(column(10,
cell(pageQueryBoxPanel),
cell(engineXPageQueryPane),
cell(rowCountPanel),
cell(tip))
engineXSettingPane.add(row(20,
column(10,
column(fix(6), cell(title)),
cell(new UILabel()),
cell(new UILabel()),
cell(new UILabel())
),
column(10,
cell(pageQueryBoxPanel),
cell(engineXPageQueryPane),
cell(rowCountPanel),
cell(tip)))
.getComponent());
outEngineXSettingPane.add(engineXSettingPane);
}
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 pageQueryBoxPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
lineEnginePageQueryBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Fixed_Line_Paging"));
@ -174,10 +186,15 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
lineEngineSettingPane.add(lineEnginePageQueryPane);
lineEnginePageQueryBox.addActionListener(new SelectActionListener(lineEnginePageQueryBox, lineEnginePageQueryPane));
JPanel tipPane = createTipPane(Toolkit.i18nText("Fine-Design_Report_Line_Engine_tip"));
lineEngineSettingPane.add(column(10,
cell(pageQueryBoxPanel),
cell(lineEnginePageQueryPane),
cell(tipPane))
lineEngineSettingPane.add(row(20,
column(10,
column(fix(6), cell(title)),
cell(new UILabel()),
cell(new UILabel())),
column(10,
cell(pageQueryBoxPanel),
cell(lineEnginePageQueryPane),
cell(tipPane)))
.getComponent());
outLineEngineSettingPane.add(lineEngineSettingPane);
}
@ -191,12 +208,12 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
}
private JPanel createPageQueryPane(IntegerEditor countPerPageEditor) {
double p = TableLayout.PREFERRED;
double rowSize[] = {p, p};
double columnSize[] = {p, p};
Component[][] components = {{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage") + ":"), countPerPageEditor}};
JPanel pageQueryPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
pageQueryPane.setBorder(BorderFactory.createEmptyBorder(5, 15, 0, 0));
JPanel pageQueryPane = new JPanel(new BorderLayout());
pageQueryPane.setBorder(new ScaledEmptyBorder(0, 8, 0, 0));
pageQueryPane.add(row(4,
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LayerPageReport_Count_PerPage"))),
cell(countPerPageEditor)
).getComponent());
return pageQueryPane;
}
@ -242,16 +259,9 @@ public class ReportEnginePane extends BasicBeanPane<LayerReportAttr> {
buttonGroup.add(lineEngine);
radioButtons.add(newEngine);
radioButtons.add(lineEngine);
double p = TableLayout.FILL;
double[] rowSize = {p};
double[] columnSize = {p, p, p, p, p};
Component[][] components = new Component[][]{
new Component[]{
newEngine,
lineEngine
}
};
JPanel pagingEngineRadioPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel pagingEngineRadioPanel = new JPanel(new BorderLayout());
pagingEngineRadioPanel.add(row(20, cell(newEngine), cell(lineEngine)).getComponent());
newEngine.addActionListener(new EngineSelectActionListener(newEngine, engineSettingPane, outEngineXSettingPane, outLineEngineSettingPane));
lineEngine.addActionListener(new EngineSelectActionListener(lineEngine, engineSettingPane, outLineEngineSettingPane, outEngineXSettingPane));
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.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.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{
private static final int V_GAP = 20;
private static final int MAX_LABEL_WIDTH = 100;
@ -49,45 +50,35 @@ public class WriteShortCutsPane extends JPanel{
}
private JPanel createContentPane() {
JPanel contentPane = new JPanel();
JPanel contentPane = new JPanel(new BorderLayout());
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
// 纵向布局,横向自适应
contentPane.setLayout(new GridBagLayout());
GridBagConstraints cons = new GridBagConstraints();
cons.fill = GridBagConstraints.HORIZONTAL;
cons.weightx = 1;
cons.gridx = 0;
cons.insets = new Insets(20, 0, 0, 0);
contentPane.add(getFeatureNamePane(), cons);
contentPane.add(getHintsPane(), cons);
contentPane.add(column(20,
cell(FineUIUtils.wrapComponentWithTitle(getFeatureNamePane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Shortcut_Set"))),
cell(FineUIUtils.wrapComponentWithTitle(getHintsPane(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips")))
).getComponent());
return contentPane;
}
private JPanel getFeatureNamePane(){
JPanel featureNamePane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Shortcut_Set"));
featureNamePane.setLayout(new BorderLayout());
UILabel name = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Feature_Name"), SwingConstants.CENTER);
JPanel featureNamePane = new JPanel(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 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 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);
nextColHK = new UILabel(nextColString, SwingConstants.CENTER);
JPanel switchBtnPane = getSwitchBtnPane();
nextRowHK = new UILabel(nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new GridLayout(2, 4, 0, 0));
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
centerPane.add(name);
centerPane.add(nextCol);
centerPane.add(new JPanel());
centerPane.add(nextRow);
centerPane.add(shortName);
centerPane.add(nextColHK);
centerPane.add(switchBtnPane);
centerPane.add(nextRowHK);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(column(24,
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)),
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))
).getComponent());
featureNamePane.add(centerPane, BorderLayout.CENTER);
@ -104,25 +95,22 @@ public class WriteShortCutsPane extends JPanel{
}
private JPanel getHintsPane(){
JPanel hintsPane = FRGUIPaneFactory.createTitledBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"));
hintsPane.setLayout(new BorderLayout());
JPanel hintsPane = new JPanel(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 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);
preRow = new UILabel("Shift+" + nextRowString, SwingConstants.CENTER);
JPanel centerPane = new JPanel(new GridLayout(2, 3, 0, V_GAP));
centerPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 100));
preCol = new UILabel("Shift+" + nextColString, SwingConstants.LEFT);
preRow = new UILabel("Shift+" + nextRowString, SwingConstants.LEFT);
centerPane.add(systemDefault);
centerPane.add(preColText);
centerPane.add(preCol);
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
centerPane.add(new JPanel());
centerPane.add(preRowText);
centerPane.add(preRow);
centerPane.add(column(24,
row(10, cell(systemDefault).weight(0.13), cell(preColText).weight(0.24), cell(preCol).weight(0.14), flex(0.64)),
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);

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(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)
)
).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.BasicScrollPane;
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.icontainer.UIScrollPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.widget.mobile.WidgetMobilePane;
@ -36,7 +34,9 @@ public class CellWidgetCardPane extends BasicPane {
private WidgetMobilePane currentWidgetMobilePane;
//属性配置切换面板
private ArrayList<JPanel> paneList;
private FineTabbedPane tabsPane;
private JPanel center;
private UIHeadGroup tabsHeaderIconPane;
private CardLayout tabbedPane;
private BasicWidgetPropertySettingPane widgetPropertyPane;
//通用属性容器
@ -64,11 +64,31 @@ public class CellWidgetCardPane extends BasicPane {
this.removeAll();
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")};
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();
BasicScrollPane basicScrollPane = new AttrScrollPane() {
@Override
protected JPanel createContentPane() {
return attriTabPane;
}
};
widgetPropertyPane = new BasicWidgetPropertySettingPane();
UIExpandablePane basicPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 280, 24, widgetPropertyPane);
attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
@ -91,17 +111,10 @@ public class CellWidgetCardPane extends BasicPane {
mobileCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
mobileTabPane.add(mobileCardPane, BorderLayout.CENTER);
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();
}
@ -109,7 +122,7 @@ public class CellWidgetCardPane extends BasicPane {
private void initPaneList() {
paneList = new ArrayList<JPanel>();
paneList.add(attriTabPane);
paneList.add(eventTabPane);
paneList.add(eventPane);
paneList.add(mobileTabPane);
}
@ -148,7 +161,7 @@ public class CellWidgetCardPane extends BasicPane {
currentWidgetMobilePane = mobilePane;
//tabsHeaderIconPane.setSelectedIndex(0);
tabsHeaderIconPane.setSelectedIndex(0);
}
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 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 {
private JPanel widgetValuePane;
private WidgetValueEditor widgetValueEditor;
@ -32,24 +27,18 @@ public class ValueWidgetPane extends WidgetPane {
public JPanel 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);
widgetValuePane = new JPanel(new BorderLayout());
JPanel centerPane = new JPanel(new BorderLayout());
centerPane.setOpaque(false);
widgetValuePane.setOpaque(false);
centerPane.add(row(
cell(label).weight(68),
cell(widgetValuePane).weight(372)).getComponent()
);
JPanel jPanel = new JPanel();
jPanel.setBackground(Color.WHITE);
jPanel.setLayout(new BorderLayout());
jPanel.add(column(10, true,
cell(northPane),
cell(centerPane)
).getComponent());
widgetValuePane = new JPanel();
widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout());
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{northPane, label,widgetValuePane},
};
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
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(
10,
cell(northPane).weight(0.17),
cell(cellEditorCardPane).weight(0.83)
cell(northPane),
cell(cellEditorCardPane).weight(1)
).getComponent()
);
}
@ -90,8 +90,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
return column(
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(68),
cell(editorTypeComboBox).weight(372)
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Select_Widget"))).weight(LEFT_WEIGHT),
cell(editorTypeComboBox).weight(RIGHT_WEIGHT)
)
).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.column;
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 {
@ -31,11 +33,13 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
widgetNameComboBox = new ParameterTreeComboBox();
widgetNameComboBox.refreshTree();
this.add(row(LayoutConstants.HORIZONTAL_GAP,
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(0.2),
cell(widgetNameComboBox).weight(0.6),
cell(enableCheckBox).weight(0.1),
cell(visibleCheckBox).weight(0.1)
this.add(column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name"))).weight(LEFT_WEIGHT),
cell(widgetNameComboBox).weight(RIGHT_WEIGHT)
),
cell(enableCheckBox),
cell(visibleCheckBox)
).getComponent());
}

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

@ -1,14 +1,16 @@
package com.fr.design.widget.ui;
import com.fine.theme.light.ui.FineRoundBorder;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.FRContext;
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.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.component.DateValuePane;
import com.fr.design.widget.component.UIComboBoxNoArrow;
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 javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.BorderUIResource;
import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import java.util.Date;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
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> {
private UIButtonGroup returnTypeButtonGroup;
private UIButtonGroup returnTypeComboBox;
private DateValuePane startDv;
private DateValuePane endDv;
private UIComboBox currentFormatComboBox;
private UILabel currentSampleLabel;
private UIButtonGroup formatButtonGroup;
private UILabel currentSamplelabel;
private UIButtonGroup fomatHeadGroup;
private static final int SAMPLE_LABEL_PADDING = 4;
public DateEditorDefinePane() {
}
@ -52,22 +53,33 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
@Override
protected JPanel setSecondContentPane() {
returnTypeButtonGroup = new UIButtonGroup<>(new String[] {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Date") ,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_String")});
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")});
JPanel formatHead = createFormatHead();
startDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date"));
endDv = new DateValuePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date"));
UILabel returnTypeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Date_Selector_Return_Type"));
return column(LayoutConstants.VERTICAL_GAP,
cell(formatHead),
cell(startDv),
cell(endDv),
cell(waterMarkDictPane),
row(
cell(returnTypeLabel).weight(LEFT_WEIGHT), cell(returnTypeButtonGroup).weight(1.4), flex(1.6)
)
).getComponent();
startDv = new DateValuePane();
endDv = new DateValuePane();
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
UILabel formatLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Format"));
formatLabel.setVerticalAlignment(SwingConstants.TOP);
UILabel startDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_Start_Date"));
startDateLabel.setVerticalAlignment(SwingConstants.TOP);
UILabel endDateLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_FS_End_Date"));
endDateLabel.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{formatLabel, formatHead},
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
@ -76,20 +88,20 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
}
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(){
@ -101,51 +113,58 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
}
};
sampleLabel.setHorizontalAlignment(SwingConstants.CENTER);
sampleLabel.setFont(this.getFont());
sampleLabel.setForeground(FlatUIUtils.getUIColor("Label.tipColor", Color.GRAY));
sampleLabel.setFont(FRContext.getDefaultValues().getFRFont());
return sampleLabel;
}
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[] timeArray = FormatField.getInstance().getFormatArray(FormatField.FormatContents.TIME);
final UIComboBox dateFormatComboBox = new UIComboBoxNoArrow(dateArray);
final UIComboBox timeFormatComboBox = new UIComboBoxNoArrow(timeArray);
dateFormatComboBox.addActionListener(e -> refreshPreviewLabel());
timeFormatComboBox.addActionListener(e -> refreshPreviewLabel());
dateFormatComboBox.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
refreshPreviewLabel();
}
});
timeFormatComboBox.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
refreshPreviewLabel();
}
});
final UILabel dateSampleLabel = createSamplePane();
final UILabel timeSampleLabel = createSamplePane();
JPanel fomatHeadPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
final CardLayout cardLayout = new CardLayout();
final JPanel customPane = new JPanel(cardLayout);
JPanel dateFormatPane = createFormatPane(dateFormatComboBox, dateSampleLabel);
JPanel timeFormatPane = createFormatPane(timeFormatComboBox, timeSampleLabel);
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"));
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")};
formatButtonGroup = 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.addChangeListener(e -> {
int newSelectedIndex = formatButtonGroup.getSelectedIndex();
cardLayout.show(customPane, tabTitles[newSelectedIndex]);
if(newSelectedIndex == 0){
currentFormatComboBox = dateFormatComboBox;
currentSampleLabel = dateSampleLabel;
}else{
currentFormatComboBox = timeFormatComboBox;
currentSampleLabel = timeSampleLabel;
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")};
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")});
fomatHeadGroup.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
int newSelectedIndex = fomatHeadGroup.getSelectedIndex();
cardLayout.show(customPane, tabTitles[newSelectedIndex]);
if(newSelectedIndex == 0){
currentFormatComboBox = dateFormatComboBox;
currentSamplelabel = dateSampleLabel;
}else{
currentFormatComboBox = timeFormatComboBox;
currentSamplelabel = timeSampleLabel;
}
refreshPreviewLabel();
}
refreshPreviewLabel();
});
return column(LayoutConstants.VERTICAL_GAP,
row(
cell(formatLabel).weight(LEFT_WEIGHT), cell(formatButtonGroup).weight(1.4), flex(1.6)
),
row(flex(LEFT_WEIGHT), cell(customPane).weight(RIGHT_WEIGHT))
).getComponent();
fomatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH);
fomatHeadPane.add(customPane, BorderLayout.CENTER);
return fomatHeadPane;
}
private void refreshPreviewLabel() {
String text = (String) currentFormatComboBox.getSelectedItem();
if (text != null && text.length() > 0) {
@ -153,15 +172,14 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(text);
String sample = simpleDateFormat.format(new Date());
DateFormatCheckResult result = DateFormatCheckManager.check(sample, text);
currentSampleLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_StyleFormat_Sample") + ":" + result.getSample());
currentSampleLabel.setForeground(result.getColor());
currentSamplelabel.setText(result.getSample());
currentSamplelabel.setForeground(result.getColor());
} catch (Exception exp) {
currentSampleLabel.removeAll();
currentSampleLabel.setForeground(Color.red);
currentSampleLabel.setText(exp.getMessage());
currentSamplelabel.setForeground(Color.red);
currentSamplelabel.setText(exp.getMessage());
}
} else {
currentSampleLabel.setText(new Date().toString());
currentSamplelabel.setText(new Date().toString());
}
}
@ -181,11 +199,11 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
@Override
protected void populateSubDirectWriteEditorBean(DateEditor e) {
String formatText = e.getFormatText();
formatButtonGroup.setSelectedIndex(getDateType(e));
formatButtonGroup.populateBean();
fomatHeadGroup.setSelectedIndex(getDateType(e));
fomatHeadGroup.populateBean();
currentFormatComboBox.setSelectedItem(formatText);
returnTypeButtonGroup.setSelectedIndex(e.isReturnDate() ? 0 : 1);
returnTypeComboBox.setSelectedIndex(e.isReturnDate() ? 0 : 1);
startDv.populate(e.getStartDate());
endDv.populate(e.getEndDate());
}
@ -194,7 +212,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
protected DateEditor updateSubDirectWriteEditorBean() {
DateEditor ob = new DateEditor();
ob.setFormatText(this.getSimpleDateFormat().toPattern());
ob.setReturnDate(returnTypeButtonGroup.getSelectedIndex() == 0);
ob.setReturnDate(returnTypeComboBox.getSelectedIndex() == 0);
ob.setStartDate(startDv.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;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIUtils;
import com.fr.data.SubmitJob;
import com.fr.design.ExtraDesignClassManager;
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.mainframe.ElementCasePane;
import com.fr.design.scrollruler.ModLineBorder;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
@ -191,19 +193,13 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
}
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());
typePane.add(row(10,
flex(0.002),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type") + ":")).weight(0.158),
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);
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type"))),
cell(csjConfigComboBox)).getComponent());
this.add(customCardPane, BorderLayout.CENTER);*/
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());
csjConfigComboBox.addItemListener(new ItemListener() {

Loading…
Cancel
Save