Browse Source

Merge pull request #14921 in DESIGN/design from fbp/release to fbp/feature

* commit '6357f6d7b66afe54d395a87ed217f0de8c705193':
  REPORT-135889 fix:NewUI自查问题修复
  REPORT-135889 fix:NewUI自查问题修复
  REPORT-135889 fix:NewUI自查问题修复
  REPORT-135889 fix:NewUI自查问题修复
  REPORT-135400 & REPORT-135840 & REPORT-134213 fix:fbp回归问题修复
fbp/feature
superman 2 months ago
parent
commit
d0cb8af409
  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. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java
  7. 2
      designer-realize/src/main/java/com/fr/design/mainframe/AbstractAttrPane.java
  8. 2
      designer-realize/src/main/java/com/fr/design/report/freeze/FreezeAndRepeatPane.java
  9. 17
      designer-realize/src/main/java/com/fr/design/widget/ui/UserEditorDefinePane.java
  10. 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;
import com.fr.base.FRContext;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton;
@ -18,12 +19,10 @@ import com.fr.stable.project.ProjectConstants;
import com.fr.workspace.WorkContext;
import javax.swing.AbstractAction;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingWorker;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.ByteArrayInputStream;
@ -43,8 +42,9 @@ public class JavaEditorPane extends BasicPane {
public JavaEditorPane(String className, String defaultText) {
this.className = className;
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
javaText = new RSyntaxTextArea();
javaText.setBorder(null);
configRSyntax(javaText);
if (StringUtils.isNotEmpty(className)) {
javaText.setText("//Loading source code from server...");
@ -86,6 +86,7 @@ public class JavaEditorPane extends BasicPane {
}
UIScrollPane jt = new UIScrollPane(javaText);
jt.setBorder(FineBorderFactory.createWrappedRoundBorder());
JPanel toolbarPane = new JPanel(new BorderLayout());
UIButton saveButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Save"));
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
public void mouseReleased(MouseEvent e) {
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.design.dialog.BasicPane;
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.ChartDataSheetStylePane;
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.ChartTitleAndBackgroundStylePane;
import javax.swing.BorderFactory;
import java.awt.BorderLayout;
import java.util.ArrayList;
import java.util.List;
@ -34,7 +35,9 @@ public class ChartStyleEditPane extends MultiTabPane<ThemedChartStyle> {
@Override
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));
}

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.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIUtils;
import com.fr.base.FRContext;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserverListener;
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.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.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
@ -24,12 +19,8 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Font;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
/**
* @author Bjorn
* @version 10.0
@ -70,11 +61,13 @@ public class ChartFontPane extends BasicPane {
}
protected void initComponents() {
Component[] components = new Component[]{
fontSizeComboBox, fontColor, italic, bold
};
UIToolbar toolbar = new UIToolbar();
toolbar.add(fontSizeComboBox);
toolbar.add(fontColor);
toolbar.add(italic);
toolbar.add(bold);
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.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.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
@ -203,7 +204,11 @@ public class ChartTextAttrPane extends BasicPane {
protected void initComponents() {
JPanel buttonPane = new JPanel(new BorderLayout(scale(10), 0));
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.add(getContentPane(buttonPane), BorderLayout.CENTER);

9
designer-chart/src/main/java/com/fr/van/chart/designer/AbstractVanChartScrollPane.java

@ -1,12 +1,9 @@
package com.fr.van.chart.designer;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.dialog.BasicScrollPane;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.Window;
/**
* Created by mengao on 2017/8/11.
@ -24,13 +21,11 @@ public abstract class AbstractVanChartScrollPane<T> extends BasicScrollPane<T> {
}
/**
* getHeight与最外层ChartPropertyPane获取的高度一致都是计算的面板高度而不是到设计器底部的高度
* 这里直接获取设计器高度减去单元格元素北区最大高度(格式TextFormatPaneContainer高度不固定)先让滚动效果显示起来
* 获取可视窗口高度
* @return height
*/
@Override
protected int getMaxHeight() {
Window window = SwingUtilities.getWindowAncestor(this);
return window.getHeight() - FineUIScale.scale(400);
return getVisibleRect().height;
}
}

2
designer-realize/src/main/java/com/fr/design/mainframe/AbstractAttrPane.java

@ -15,7 +15,7 @@ import java.awt.event.MouseWheelListener;
* 几点子类不需要写构造函数了所有的组件都放在createContentPane()方法生成的pane里面,它不需要考虑border
*/
public abstract class AbstractAttrPane extends AbstractAttrNoScrollPane {
private static final int MAXVALUE = FineUIScale.scale(100);
private static final int MAXVALUE = 100;
private static final int TITLE_HEIGHT = FineUIScale.scale(50);
private static final int MOUSE_WHEEL_SPEED = 5;
private int maxHeight = FineUIScale.scale(280);

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

@ -27,7 +27,7 @@ public abstract class FreezeAndRepeatPane extends BasicBeanPane<FT> {
protected boolean isEnalbed;
protected void initComponent() {
Dimension size = FineUIScale.createScaleDimension(50, 21);
Dimension size = FineUIScale.createScaleDimension(58, 21);
if (start instanceof UISpinner) {
start.setPreferredSize(size);
((UISpinner) start).addChangeListener(new ChangeListener() {

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

@ -1,13 +1,12 @@
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.utils.DesignUtils;
import com.fr.form.ui.NameWidget;
import javax.swing.SwingConstants;
import javax.swing.JTextArea;
import java.awt.BorderLayout;
import java.awt.Font;
public class UserEditorDefinePane extends AbstractDataModify<NameWidget> {
private NameWidget nWidget;
@ -18,13 +17,9 @@ public class UserEditorDefinePane extends AbstractDataModify<NameWidget> {
private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
UILabel infoLabel = new UILabel();
infoLabel.setFont(DesignUtils.getDefaultGUIFont().applySize(24).applyStyle(Font.BOLD));
infoLabel.setText(com.fr.design.i18n.Toolkit.i18nText(
"Fine-Design_Report_Widget_User_Defined_Editor") + ".");
infoLabel.setHorizontalAlignment(SwingConstants.CENTER);
this.add(infoLabel, BorderLayout.CENTER);
JTextArea label = FineUIUtils.createAutoWrapTipLabel(Toolkit.i18nText(
"Fine-Design_Report_Widget_User_Defined_Editor"));
this.add(label, BorderLayout.CENTER);
}
@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 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;
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 otherContentPane = this.setThirdContentPane();
if (otherContentPane != null) {
contentPane.add(row(cell(otherContentPane).weight(1.0)).getComponent());
contentPane.add(otherContentPane);
}
return contentPane;
}

Loading…
Cancel
Save