Browse Source

Pull request #14915: REPORT-135889 fix:NewUI自查问题修复

Merge in DESIGN/design from ~LEVY.XIE/design:fbp/release to fbp/release

* commit '773cf88c457bfc5d5feb21de0db8a3680d55883b':
  REPORT-135889 fix:NewUI自查问题修复
  REPORT-135889 fix:NewUI自查问题修复
  REPORT-135889 fix:NewUI自查问题修复
  REPORT-135889 fix:NewUI自查问题修复
fbp/release
Levy.Xie-解安森 2 months ago
parent
commit
72d0f78e58
  1. 7
      designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java
  2. 1
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  3. 7
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleEditPane.java
  4. 21
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java
  5. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  6. 17
      designer-realize/src/main/java/com/fr/design/widget/ui/UserEditorDefinePane.java
  7. 4
      designer-realize/src/main/java/com/fr/design/widget/ui/WritableRepeatEditorPane.java

7
designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java

@ -1,6 +1,7 @@
package com.fr.design.formula; package com.fr.design.formula;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -18,12 +19,10 @@ import com.fr.stable.project.ProjectConstants;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import javax.swing.AbstractAction; import javax.swing.AbstractAction;
import javax.swing.JOptionPane;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
@ -43,8 +42,9 @@ public class JavaEditorPane extends BasicPane {
public JavaEditorPane(String className, String defaultText) { public JavaEditorPane(String className, String defaultText) {
this.className = className; this.className = className;
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
javaText = new RSyntaxTextArea(); javaText = new RSyntaxTextArea();
javaText.setBorder(null);
configRSyntax(javaText); configRSyntax(javaText);
if (StringUtils.isNotEmpty(className)) { if (StringUtils.isNotEmpty(className)) {
javaText.setText("//Loading source code from server..."); javaText.setText("//Loading source code from server...");
@ -86,6 +86,7 @@ public class JavaEditorPane extends BasicPane {
} }
UIScrollPane jt = new UIScrollPane(javaText); UIScrollPane jt = new UIScrollPane(javaText);
jt.setBorder(FineBorderFactory.createWrappedRoundBorder());
JPanel toolbarPane = new JPanel(new BorderLayout()); JPanel toolbarPane = new JPanel(new BorderLayout());
UIButton saveButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save")); UIButton saveButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save"));
saveButton.setAction(new SaveAction()); saveButton.setAction(new SaveAction());

1
designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -86,6 +86,7 @@ public class UIEastResizableContainer extends JPanel {
@Override @Override
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
dragging = false; dragging = false;
updateCursor(e);
} }
}; };

7
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/ChartStyleEditPane.java

@ -4,6 +4,7 @@ import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.theme.settings.ThemedChartStyle; import com.fr.base.theme.settings.ThemedChartStyle;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.MultiTabPane; import com.fr.design.dialog.MultiTabPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.theme.edit.chart.ChartAxisStylePane; import com.fr.design.mainframe.theme.edit.chart.ChartAxisStylePane;
import com.fr.design.mainframe.theme.edit.chart.ChartDataSheetStylePane; import com.fr.design.mainframe.theme.edit.chart.ChartDataSheetStylePane;
import com.fr.design.mainframe.theme.edit.chart.ChartLabelStylePane; import com.fr.design.mainframe.theme.edit.chart.ChartLabelStylePane;
@ -11,7 +12,7 @@ import com.fr.design.mainframe.theme.edit.chart.ChartLegendStylePane;
import com.fr.design.mainframe.theme.edit.chart.ChartSeriesStylePane; import com.fr.design.mainframe.theme.edit.chart.ChartSeriesStylePane;
import com.fr.design.mainframe.theme.edit.chart.ChartTitleAndBackgroundStylePane; import com.fr.design.mainframe.theme.edit.chart.ChartTitleAndBackgroundStylePane;
import javax.swing.BorderFactory; import java.awt.BorderLayout;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -34,7 +35,9 @@ public class ChartStyleEditPane extends MultiTabPane<ThemedChartStyle> {
@Override @Override
protected void initLayout() { protected void initLayout() {
super.initLayout(); this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
this.add(tabPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); setBorder(new ScaledEmptyBorder(10, 10, 10, 10));
} }

21
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java

@ -2,21 +2,16 @@ package com.fr.design.mainframe.theme.edit.chart;
import com.fine.theme.icon.LazyIcon; import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineLayoutBuilder; import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.FineUITable; import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
@ -24,12 +19,8 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font; import java.awt.Font;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/** /**
* @author Bjorn * @author Bjorn
* @version 10.0 * @version 10.0
@ -70,11 +61,13 @@ public class ChartFontPane extends BasicPane {
} }
protected void initComponents() { protected void initComponents() {
Component[] components = new Component[]{ UIToolbar toolbar = new UIToolbar();
fontSizeComboBox, fontColor, italic, bold toolbar.add(fontSizeComboBox);
}; toolbar.add(fontColor);
toolbar.add(italic);
toolbar.add(bold);
JPanel buttonPane = new JPanel(new BorderLayout()); JPanel buttonPane = new JPanel(new BorderLayout());
buttonPane.add(row(4, cell(fontSizeComboBox), cell(fontColor), cell(italic), cell(bold)).getComponent()); buttonPane.add(toolbar);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(getContentPane(buttonPane), BorderLayout.CENTER); this.add(getContentPane(buttonPane), BorderLayout.CENTER);

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -10,6 +10,7 @@ import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.mode.ChartEditContext; import com.fr.design.mainframe.chart.mode.ChartEditContext;
@ -203,7 +204,11 @@ public class ChartTextAttrPane extends BasicPane {
protected void initComponents() { protected void initComponents() {
JPanel buttonPane = new JPanel(new BorderLayout(scale(10), 0)); JPanel buttonPane = new JPanel(new BorderLayout(scale(10), 0));
buttonPane.add(fontSizeComboBox, BorderLayout.CENTER); buttonPane.add(fontSizeComboBox, BorderLayout.CENTER);
buttonPane.add(FineLayoutBuilder.createHorizontalLayout(10, fontColor, italic, bold), BorderLayout.EAST); UIToolbar toolbar = new UIToolbar();
toolbar.add(fontColor);
toolbar.add(italic);
toolbar.add(bold);
buttonPane.add(toolbar, BorderLayout.EAST);
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(getContentPane(buttonPane), BorderLayout.CENTER); this.add(getContentPane(buttonPane), BorderLayout.CENTER);

17
designer-realize/src/main/java/com/fr/design/widget/ui/UserEditorDefinePane.java

@ -1,13 +1,12 @@
package com.fr.design.widget.ui; package com.fr.design.widget.ui;
import com.fr.design.gui.ilable.UILabel; import com.fine.theme.utils.FineUIUtils;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.form.ui.NameWidget; import com.fr.form.ui.NameWidget;
import javax.swing.SwingConstants; import javax.swing.JTextArea;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Font;
public class UserEditorDefinePane extends AbstractDataModify<NameWidget> { public class UserEditorDefinePane extends AbstractDataModify<NameWidget> {
private NameWidget nWidget; private NameWidget nWidget;
@ -18,13 +17,9 @@ public class UserEditorDefinePane extends AbstractDataModify<NameWidget> {
private void initComponents() { private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel(); JTextArea label = FineUIUtils.createAutoWrapTipLabel(Toolkit.i18nText(
infoLabel.setFont(DesignUtils.getDefaultGUIFont().applySize(24).applyStyle(Font.BOLD)); "Fine-Design_Report_Widget_User_Defined_Editor"));
infoLabel.setText(com.fr.design.i18n.Toolkit.i18nText( this.add(label, BorderLayout.CENTER);
"Fine-Design_Report_Widget_User_Defined_Editor") + ".");
infoLabel.setHorizontalAlignment(SwingConstants.CENTER);
this.add(infoLabel, BorderLayout.CENTER);
} }
@Override @Override

4
designer-realize/src/main/java/com/fr/design/widget/ui/WritableRepeatEditorPane.java

@ -5,8 +5,6 @@ import com.fr.form.ui.WriteAbleRepeatEditor;
import javax.swing.JPanel; import javax.swing.JPanel;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.column; import static com.fine.swing.ui.layout.Layouts.column;
public abstract class WritableRepeatEditorPane<E extends WriteAbleRepeatEditor> extends DirectWriteEditorDefinePane<E> { public abstract class WritableRepeatEditorPane<E extends WriteAbleRepeatEditor> extends DirectWriteEditorDefinePane<E> {
@ -21,7 +19,7 @@ public abstract class WritableRepeatEditorPane<E extends WriteAbleRepeatEditor>
JPanel contentPane = column(LayoutConstants.VERTICAL_GAP).getComponent(); JPanel contentPane = column(LayoutConstants.VERTICAL_GAP).getComponent();
JPanel otherContentPane = this.setThirdContentPane(); JPanel otherContentPane = this.setThirdContentPane();
if (otherContentPane != null) { if (otherContentPane != null) {
contentPane.add(row(cell(otherContentPane).weight(1.0)).getComponent()); contentPane.add(otherContentPane);
} }
return contentPane; return contentPane;
} }

Loading…
Cancel
Save