Browse Source

Pull request #14769: 无jira任务, fbp/release 合 fbp/feature

Merge in DESIGN/design from fbp/release to fbp/feature

* commit 'e0609489a91fc9807d632e7bb8b6cc010c8612ca':
  fix:FVS图标右侧配置栏左右边距过窄 REPORT-132138
  无jira 超链面板布局优化
  REPORT-133112 fix: 控件参数面板刷新事件调整
  REPORT-132391 fix: 更新升级面板国际化尺寸调整
  REPORT-133167 fix: 帆软通行证面板自适应尺寸
  REPORT-133410 fix: 富文本编辑器补充滚动条
  REPORT-133535 【fr-fbp回归】模板内数据连接鉴权失败
  REPORT-133327 【fr-fbp回归】【数据集】fbp设计器和平台 新建数据连接读的自定义驱动不一致
fbp/feature
superman 3 months ago committed by zhouping-周平
parent
commit
4ba7806917
  1. 1
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  2. 8
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  3. 11
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java
  4. 3
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  5. 38
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java
  6. 2
      designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java
  7. 1
      designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java
  8. 21
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java
  9. 20
      designer-realize/src/main/java/com/fr/design/report/RichTextPane.java

1
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -366,6 +366,7 @@ public class JDBCDefPane extends JPanel {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
driverLoaders = new HashMap<>();
}
driverLoaders.entrySet().removeIf(entry -> StringUtils.isEmpty(entry.getValue().getDriverClass()));
nameAndRepresent = getDriverLoaderAndRepresent(driverLoaders);
}

8
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -100,6 +100,7 @@ import com.fr.stable.core.UUID;
import com.fr.widgettheme.designer.WidgetThemeDisplayAction;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.lock.TplOperator;
import com.fr.workspace.server.repository.WorkplaceConstants;
import com.fr.workspace.server.repository.template.TemplateRepository;
import javax.swing.BorderFactory;
@ -1748,10 +1749,9 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
}
private boolean checkJTemplateAuthority() {
// todo:微服务待调整
//if (!FSConfig.getInstance().getAuthorizeAttr().isDataConnectionAuthority()) {
// return true;
//}
if (!WorkplaceConstants.isConnectionEditAuth()) {
return true;
}
JTemplateAuthorityChecker jTemplateAuthorityChecker = new JTemplateAuthorityChecker(this);
if (jTemplateAuthorityChecker.isAuthority()) {
return true;

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

@ -1,7 +1,6 @@
package com.fr.design.update.ui.dialog;
import com.fanruan.product.ProductConstants;
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;
@ -14,7 +13,6 @@ import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -62,6 +60,7 @@ import java.util.*;
import java.util.List;
import java.util.concurrent.ExecutionException;
import static com.fine.theme.utils.FineUIScale.scale;
import static java.nio.charset.StandardCharsets.*;
import static javax.swing.JOptionPane.QUESTION_MESSAGE;
@ -72,11 +71,10 @@ public class UpdateMainDialog extends UIDialog {
public static final Dimension DEFAULT = new Dimension(660, 620);
private static final Dimension PROGRESSBAR = new Dimension(120, 15);
private static final Dimension UPDATE_BUTTON = new Dimension(80, 24);
private static final int UPDATE_PANE_ROW_SIZE = 30;
private static final int UPDATE_CONTENT_PANE_ROW_SIZE = 10;
private static final int UPDATE_CONTENT_PANE_COLUMN_SIZE = 10;
private static final int UPDATE_CONTENT_PANE_LABEL_COLUMN_SIZE = 100;
private static final int UPDATE_CONTENT_PANE_LABEL_COLUMN_SIZE = 120;
private static final int SEARCH_PANE_ROW_SIZE = 50;
private static final int SEARCH_PANE_TEXT_COLUMN = 130;
private static final int SEARCH_PANE_COLUMN_GAP = 3;
@ -159,7 +157,7 @@ public class UpdateMainDialog extends UIDialog {
progressBar.setForeground(UpdateConstants.BAR_COLOR);
progressBar.setVisible(false);
progressBar.setStringPainted(true);
progressBar.setPreferredSize(PROGRESSBAR);
progressBar.setPreferredSize(scale(PROGRESSBAR));
progressBarPane.add(GUICoreUtils.createBorderLayoutPane(
progressBar, BorderLayout.CENTER
@ -298,7 +296,6 @@ 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(FineUIScale.scale(UPDATE_BUTTON));
updateButton.setEnabled(false);
double[] rowSize = {TableLayout.PREFERRED};
@ -692,7 +689,7 @@ public class UpdateMainDialog extends UIDialog {
* 显示窗口
*/
public void showDialog() {
setSize(DEFAULT);
setSize(scale(DEFAULT));
setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Updater_UpdateAndUpgrade"));
GUICoreUtils.centerWindow(this);
setVisible(true);

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

@ -1186,7 +1186,8 @@ South.SheetSelectedColor = #FFF
#---- North ----
North.userinfoLabel.borderMargins=2, 16, 2, 16
North.userinfoLabel.width=80
North.userinfoLabel.maxWidth=176
North.userinfoLabel.minWidth=80
North.userinfoLabel.height=24
North.border = $defaultBorderColor
North.messageLabel.foreground=$text.placeholder

38
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperPopAttrPane.java

@ -1,5 +1,8 @@
package com.fr.design.chart.series.SeriesCondition.impl;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.base.Parameter;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.web.ChartHyperPoplink;
@ -9,18 +12,13 @@ import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.AbstractChartAttrPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.ParameterProvider;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
/**
* 图表弹出超链, 悬浮窗属性设置界面.
@ -52,41 +50,31 @@ public class ChartHyperPopAttrPane extends AbstractChartAttrPane {
@Override
protected JPanel createContentPane() {
JPanel pane = new JPanel();
pane.setLayout(FRGUIPaneFactory.createBorderLayout());
pane.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
pane.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
titleField = new UITextField(15);
titleField.setPreferredSize(new Dimension(200, 20));
widthField = new UINumberField(4);
widthField.setColumns(10);
widthField.setPreferredSize(new Dimension(200, 20));
heightField = new UINumberField(4);
heightField.setColumns(10);
heightField.setPreferredSize(new Dimension(200, 20));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { p,f};
double[] rowSize = { p,p,p,p,p,p};
Component[][] components = new Component[][]{
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Title") + ":", SwingConstants.RIGHT), titleField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ":", SwingConstants.RIGHT), widthField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height") + ":", SwingConstants.RIGHT), heightField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Title") + ":"), titleField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ":"), widthField},
new Component[]{new BoldFontTextLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Height") + ":"), heightField},
};
widthField.setText(String.valueOf(DEFAULT_V_VALUE));
heightField.setText(String.valueOf(DEFAULT_H_VALUE));
JPanel northPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
JPanel northPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
pane.add(northPane, BorderLayout.NORTH);
parameterViewPane = new ReportletParameterViewPane(paraType, valueEditorPane, valueRenderPane);
parameterViewPane.setBorder(GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")));
parameterViewPane.setPreferredSize(new Dimension(200, 200));
pane.add(parameterViewPane, BorderLayout.CENTER);
pane.add(FineUIUtils.wrapComponentWithTitle(parameterViewPane,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Parameter")), BorderLayout.CENTER);
return pane;
}

2
designer-chart/src/main/java/com/fr/design/mainframe/ChartPropertyPane.java

@ -40,7 +40,7 @@ public class ChartPropertyPane extends BaseChartPropertyPane {
protected void initComponent() {
this.setLayout(new BorderLayout());
this.setBorder(new ScaledEmptyBorder(10, 0, 0, 0));
this.setBorder(new ScaledEmptyBorder(10, 4, 0, 4));
}
@Override

1
designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java

@ -114,6 +114,7 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
this.createTabPane();
this.initTables();
revalidate();
}
/**

21
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -3,7 +3,6 @@
*/
package com.fr.design.mainframe.bbs;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.FRContext;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager;
@ -29,6 +28,8 @@ import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import static com.fine.theme.utils.FineUIScale.scale;
/**
* @author neil
@ -63,12 +64,11 @@ public class UserInfoPane extends BasicPane {
* 构造函数
*/
private UserInfoPane() {
this.setPreferredSize(FineUIScale.scale(new Dimension(UIManager.getInt("North.userinfoLabel.width"), UIManager.getInt("North.userinfoLabel.height"))));
this.setLayout(new BorderLayout());
this.userInfoLabel = new UserInfoLabel(this);
Insets insets = UIManager.getInsets("North.userinfoLabel.borderMargins");
Insets scaledInsets = FineUIScale.scale(insets);
Insets scaledInsets = scale(insets);
this.userInfoLabel.setBorder(BorderFactory.createEmptyBorder(scaledInsets.top, scaledInsets.left, scaledInsets.bottom, scaledInsets.right));
this.markUnSignIn();
@ -105,6 +105,7 @@ public class UserInfoPane extends BasicPane {
public void markUnSignIn() {
this.userInfoLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Login_Onclick"));
this.userInfoLabel.resetUserName();
fitSize();
}
/**
@ -115,6 +116,18 @@ public class UserInfoPane extends BasicPane {
public void markSignIn(String userName) {
this.userInfoLabel.setText(userName);
this.userInfoLabel.setUserName(userName);
fitSize();
}
private void fitSize() {
int height = UIManager.getInt("North.userinfoLabel.height");
int maxWidth = UIManager.getInt("North.userinfoLabel.maxWidth");
int minWidth = UIManager.getInt("North.userinfoLabel.minWidth");
int labelWidth = userInfoLabel.getPreferredSize().width;
// 自适应尺寸,并限制最大最小尺寸
int preferWidth = Math.min(Math.max(minWidth, labelWidth), maxWidth);
Dimension fitDimension = scale(new Dimension(preferWidth, height));
setPreferredSize(fitDimension);
}
@Override
@ -199,6 +212,4 @@ public class UserInfoPane extends BasicPane {
});
executorService.shutdown();
}
}

20
designer-realize/src/main/java/com/fr/design/report/RichTextPane.java

@ -1,11 +1,13 @@
package com.fr.design.report;
import com.fine.theme.utils.FineUIUtils;
import com.formdev.flatlaf.ui.FlatRoundBorder;
import com.fr.base.BaseFormula;
import com.fr.base.Style;
import com.fr.design.border.FineBorderFactory;
import com.fr.design.cell.editor.RichTextToolBar;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
@ -20,6 +22,7 @@ import com.fr.stable.Constants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import javax.swing.ScrollPaneConstants;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultStyledDocument;
@ -32,8 +35,6 @@ import java.awt.Font;
import java.math.BigDecimal;
import java.util.Iterator;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.column;
public class RichTextPane extends BasicPane {
@ -50,13 +51,16 @@ public class RichTextPane extends BasicPane {
}
protected void initComponents() {
this.setLayout(new BorderLayout());
this.setLayout(FRGUIPaneFactory.createScaledBorderLayout(0, 10));
textPane = new RichTextEditingPane();
textPane.setBorder(new FlatRoundBorder());
textPane.setBackground(FineUIUtils.getUIColor("background.normal", "background"));
textPane.setFont(DEFAUL_FONT);
toolBar = new RichTextToolBar(textPane);
this.add(column(10, cell(toolBar), cell(textPane).weight(1)).getComponent());
textPane.setFont(DEFAUL_FONT);
UIScrollPane scrollPane = new UIScrollPane(textPane,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder());
toolBar = new RichTextToolBar(textPane);
this.add(toolBar, BorderLayout.NORTH);
this.add(scrollPane, BorderLayout.CENTER);
}
@Override

Loading…
Cancel
Save