Browse Source

Merge pull request #9155 in DESIGN/design from final/11.0 to persist/11.0

* commit '485db16bd01baec4d63e23488c4ea61a20496783':
  REPORT-73256 文本超出后隐藏设置会影响单元格基本属性设置
  REPORT-73256 文本超出后隐藏设置会影响单元格基本属性设置
  REPORT-71957 组件复用-创建组件,确认后提示共享组件创建失败,且日志有报错
  REPORT-72073 alphafine,使用技巧交互效果修改
  REPORT-72252 LocalResourceProvider接口在11版本上有问题
  REPORT-71957 组件复用-创建组件,确认后提示共享组件创建失败,且日志有报错
  REPORT-72097 表格字体选中后会变成黑色
  REPORT-71719 改下顺序
  REPORT-71719 改一下位置,调整下国际化
  REPORT-71402 fvs使用含有SQL的公式,模拟计算时,设计器卡死
  REPORT-70446 mac下悬浮弹窗隐藏重新展示时偶现白点
  REPORT-71213 设计器关闭失败
  REPORT-71158 打开fvs,从远程切换到本地,设计器模板展示空白
fix-lag
superman 2 years ago
parent
commit
61b95d9dea
  1. 6
      designer-base/src/main/java/com/fr/design/data/datapane/connect/SslPane.java
  2. 3
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  3. 30
      designer-base/src/main/java/com/fr/design/parameter/ParameterInputNoneListenerPane.java
  4. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
  5. 59
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java
  6. 61
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  7. 10
      designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java
  8. 4
      designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java
  9. 4
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/light_yellow_bulb.svg
  10. 4
      designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/yellow_bulb.svg

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

@ -70,16 +70,16 @@ public class SslPane extends BasicPane {
JPanel filePanelCa = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{{keyPathCa, fileChooserButtonCa}}, new double[]{p}, new double[]{f, 20}, 0);
Component[] compCa = {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Ca") + ":", SwingConstants.RIGHT), filePanelCa};
Component[] compVerifyCa = {null, verifyCa};
JPanel filePanelClientCert = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{{keyPathClientCert, fileChooserButtonClientCert}}, new double[]{p}, new double[]{f, 20}, 0);
Component[] compClientCert = {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Client_Cert") + ":", SwingConstants.RIGHT), filePanelClientCert};
JPanel filePanelClientKey = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{{keyPathClientKey, fileChooserButtonClientKey}}, new double[]{p}, new double[]{f, 20}, 0);
Component[] compClientKey = {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Client_Key") + ":", SwingConstants.RIGHT), filePanelClientKey};
JPanel filePanelClientCert = TableLayoutHelper.createCommonTableLayoutPane(new Component[][]{{keyPathClientCert, fileChooserButtonClientCert}}, new double[]{p}, new double[]{f, 20}, 0);
Component[] compClientCert = {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Client_Cert") + ":", SwingConstants.RIGHT), filePanelClientCert};
// Component[] comCipher = {new UILabel(Toolkit.i18nText("Fine-Design_Basic_Ssl_Cipher") + ":", SwingConstants.RIGHT), cipher};
usingComps = new Component[][]{
compCa,
compVerifyCa,
compClientCert,
compClientKey,
compClientCert
// comCipher
};
usingSsl.setSelected(true);

3
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -38,6 +38,7 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.parameter.ParameterInputNoneListenerPane;
import com.fr.design.parameter.ParameterInputPane;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
@ -964,7 +965,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
if (parameters.length < 1 && editor4CalPane.update().size() < 1) {
return parameterMap;
}
ParameterInputPane pPane = new ParameterInputPane(parameters);
ParameterInputPane pPane = new ParameterInputNoneListenerPane(parameters);
pPane.showSmallWindow(new JFrame(), new DialogActionAdapter() {
@Override
public void doOk() {

30
designer-base/src/main/java/com/fr/design/parameter/ParameterInputNoneListenerPane.java

@ -0,0 +1,30 @@
package com.fr.design.parameter;
import com.fr.design.editor.ValueEditorPane;
import com.fr.stable.ParameterProvider;
/**
* 与ParameterInputPane区别在于 输入参数不会触发模板修改事件
*
* 适用于参数不需要存储在模板中的场景
*
* @author hades
* @version 11.0
* Created by hades on 2022/5/13
*/
public class ParameterInputNoneListenerPane extends ParameterInputPane {
public ParameterInputNoneListenerPane(ParameterProvider[] parameters) {
super(parameters);
}
public ParameterInputNoneListenerPane(ParameterProvider[] parameters, boolean allowBlank) {
super(parameters, allowBlank);
}
@Override
protected void initTextListener(ValueEditorPane textF) {
// 这边输入参数 不用联动模板变化激活保存按钮 相关参数并不存储在模板
// do nothing
}
}

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/AlphaFineConstants.java

@ -191,7 +191,9 @@ public class AlphaFineConstants {
public static final Icon BULB_ICON = IconUtils.readIcon("com/fr/design/mainframe/alphafine/images/bulb.svg");
public static final Icon BLUE_BULB_ICON = IconUtils.readIcon("com/fr/design/mainframe/alphafine/images/blue_bulb.svg");
public static final Icon YELLOW_BULB_ICON = IconUtils.readIcon("com/fr/design/mainframe/alphafine/images/yellow_bulb.svg");
public static final Icon LIGHT_YELLOW_BULB_ICON = IconUtils.readIcon("com/fr/design/mainframe/alphafine/images/light_yellow_bulb.svg");
public static final String HOT_SEARCH = Toolkit.i18nText("Fine-Design_Report_AlphaFine_Hot_Search");

59
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java

@ -33,6 +33,7 @@ import com.fr.design.mainframe.alphafine.search.manager.impl.PluginSearchManager
import com.fr.design.mainframe.alphafine.search.manager.impl.ProductNewsSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.impl.SegmentationManager;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.stable.StringUtils;
import java.awt.BorderLayout;
@ -66,8 +67,11 @@ import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.SwingConstants;
import javax.swing.Timer;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
/**
* @author hades
@ -241,13 +245,10 @@ public class AlphaFineFrame extends JFrame {
topRightPane.setBackground(Color.WHITE);
JPanel tipPane = new JPanel(new BorderLayout());
tipPane.setBackground(Color.WHITE);
String toolTip = AlphaFineShortCutUtil.getDisplayShortCut(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Short_Cut", DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getShortcuts()));
tipIconLabel = new UILabel(AlphaFineConstants.BULB_ICON);
tipIconLabel.addMouseListener(tipMouseListener);
tipIconLabel.setToolTipText(toolTip);
useTipLabel = new UILabel(SKILLS);
useTipLabel.addMouseListener(tipMouseListener);
useTipLabel.setToolTipText(toolTip);
useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6);
tipPane.add(tipIconLabel, BorderLayout.WEST);
tipPane.add(useTipLabel, BorderLayout.CENTER);
@ -264,19 +265,63 @@ public class AlphaFineFrame extends JFrame {
private MouseAdapter tipMouseListener = new MouseAdapter() {
private JPopupMenu popupMenu;
@Override
public void mouseEntered(MouseEvent e) {
useTipLabel.setForeground(UIConstants.FLESH_BLUE);
tipIconLabel.setIcon(AlphaFineConstants.BLUE_BULB_ICON);
tipIconLabel.setIcon(AlphaFineConstants.YELLOW_BULB_ICON);
}
@Override
public void mouseExited(MouseEvent e) {
useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6);
tipIconLabel.setIcon(AlphaFineConstants.BULB_ICON);
if (popupMenu == null || !popupMenu.isShowing()) {
useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6);
tipIconLabel.setIcon(AlphaFineConstants.BULB_ICON);
}
}
@Override
public void mousePressed(MouseEvent e) {
useTipLabel.setForeground(UIConstants.FLESH_BLUE);
tipIconLabel.setIcon(AlphaFineConstants.LIGHT_YELLOW_BULB_ICON);
popupMenu = createTipPop();
GUICoreUtils.showPopupMenu(popupMenu, e.getComponent(), e.getComponent().getX() - 60, e.getComponent().getY() + 20);
}
};
private JPopupMenu createTipPop() {
JPanel panel = new JPanel(new BorderLayout());
String toolTip = AlphaFineShortCutUtil.getDisplayShortCut(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Short_Cut", DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().getShortcuts()));
UILabel label = new UILabel(toolTip);
label.setForeground(AlphaFineConstants.FOREGROUND_COLOR_8);
label.setBackground(Color.WHITE);
panel.add(label);
panel.setBackground(Color.WHITE);
JPopupMenu popupMenu = new JPopupMenu();
popupMenu.setBorder(BorderFactory.createEmptyBorder(20, 5, 10, 5));
popupMenu.add(panel);
popupMenu.setBackground(Color.WHITE);
popupMenu.addPopupMenuListener(new PopupMenuListener() {
@Override
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
// do nothing
}
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
useTipLabel.setForeground(AlphaFineConstants.FOREGROUND_COLOR_6);
tipIconLabel.setIcon(AlphaFineConstants.BULB_ICON);
}
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
// do nothing
}
});
return popupMenu;
}
private JPanel createSearchPane() {
JPanel searchPane = new JPanel(new BorderLayout());
searchPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20));

61
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -79,6 +79,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
//文本超出时隐藏
private UICheckBox textOverflowCheckBox;
private int curSelectedIndex;
private UIComboBox showPartComboBox;
private CardLayout showPartLayout;
private JPanel showPartPane;
@ -325,7 +326,16 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
showPartLayout.show(showPartPane, "none");
showPartPane.setPreferredSize(new Dimension(0, 0));
}
// 记录目前自动调整哪个被选中
for (int i = 0; i < adjustRadioButtons.length; i++) {
if (adjustRadioButtons[i].isSelected()) {
curSelectedIndex = i;
break;
}
}
noAutoRadioButton.setSelected(true);
} else {
adjustRadioButtons[curSelectedIndex].setSelected(true);
}
}
});
@ -421,25 +431,37 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
@Override
public void itemStateChanged(ItemEvent e) {
Style elementStyle = cellElement.getStyle();
FRFont frFont = elementStyle.getFRFont();
if (showContent.getSelectedIndex() == 3) {
fileNamePane.setPreferredSize(new Dimension(100, 20));
fileNameLayout.show(fileNamePane, "content");
frFont = frFont.applyForeground(Color.blue);
frFont = frFont.applyUnderline(Constants.LINE_THIN);
} else {
fileNameLayout.show(fileNamePane, "none");
fileNamePane.setPreferredSize(new Dimension(0, 0));
frFont = frFont.applyForeground(Color.black);
frFont = frFont.applyUnderline(Constants.LINE_NONE);
if (e.getStateChange() == ItemEvent.SELECTED) {
if (showContent.getSelectedIndex() == 3) {
fileNamePane.setPreferredSize(new Dimension(100, 20));
fileNameLayout.show(fileNamePane, "content");
} else {
fileNameLayout.show(fileNamePane, "none");
fileNamePane.setPreferredSize(new Dimension(0, 0));
}
handleCellShowStyleChange(e);
}
cellElement.setStyle(elementStyle.deriveFRFont(frFont));
}
});
return fileNamePane;
}
private void handleCellShowStyleChange(ItemEvent itemEvent) {
CellGUIAttr cellGUIAttr = getCellGUIAttr();
int selectedIndex = showContent.getSelectedIndex();
boolean showAsDownload = cellGUIAttr.isShowAsDownload();
Style elementStyle = cellElement.getStyle();
FRFont frFont = elementStyle.getFRFont();
if (!showAsDownload && selectedIndex == 3) {
frFont = frFont.applyForeground(Color.blue);
frFont = frFont.applyUnderline(Constants.LINE_THIN);
} else if (showAsDownload && selectedIndex != 3) {
frFont = frFont.applyForeground(Color.black);
frFont = frFont.applyUnderline(Constants.LINE_NONE);
}
cellElement.setStyle(elementStyle.deriveFRFont(frFont));
}
private void initAllNames() {
defaultAutoRadioButton.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Follow_Paper_Settings"));
@ -475,15 +497,20 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Other");
}
private CellGUIAttr getCellGUIAttr() {
CellGUIAttr cellGUIAttr = cellElement.getCellGUIAttr();
if (cellGUIAttr == null) {
cellGUIAttr = CellGUIAttr.DEFAULT_CELLGUIATTR;
}
return cellGUIAttr;
}
@Override
protected void populateBean() {
this.currentPageFixedRowDataTipLabel.setText(" (" + Toolkit.i18nText("Fine-Design_Report_CellWrite_No_Page_Fixed_Row_Cell") + ")");
this.pageFixedRowDataCell = null;
checkPageFixedRow();
CellGUIAttr cellGUIAttr = cellElement.getCellGUIAttr();
if (cellGUIAttr == null) {
cellGUIAttr = CellGUIAttr.DEFAULT_CELLGUIATTR;
}
CellGUIAttr cellGUIAttr = getCellGUIAttr();
// 支持 跟随页面设置 选项 = 不在编辑表单中的报表块 && 不在大屏模板cpt组件中
boolean supportFollowTplDefine = !EastRegionContainerPane.getInstance().getCurrentMode().equals(EastRegionContainerPane.PropertyMode.FORM_REPORT)

10
designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java

@ -35,6 +35,7 @@ import com.fr.design.mainframe.share.ui.base.ui.PlaceHolderUI;
import com.fr.design.mainframe.share.util.ShareUIUtils;
import com.fr.design.share.effect.EffectItemGroup;
import com.fr.design.share.utils.ShareDialogUtils;
import com.fr.file.FileCommonUtils;
import com.fr.form.share.DefaultSharableWidget;
import com.fr.form.share.bean.StyleThemeBean;
import com.fr.form.share.constants.ShareComponentConstants;
@ -659,6 +660,15 @@ public class ShareMainPane extends JPanel {
Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
return false;
}
if (!FileCommonUtils.isFileNameValid(name)) {
FineJOptionPane.showMessageDialog(
shareDialog,
Toolkit.i18nText("Fine-Design_Share_Generate_Failure_Illegal_Component_Name_Tip"),
Toolkit.i18nText("Fine-Design_Basic_Error"),
ERROR_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon"));
return false;
}
if (upload && StringUtils.isEmpty(content.getText())) {
FineJOptionPane.showMessageDialog(shareDialog, Toolkit.i18nText("Fine-Design_Share_Lack_Content"),
Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));

4
designer-realize/src/main/java/com/fr/start/module/PreStartActivator.java

@ -2,6 +2,7 @@ package com.fr.start.module;
import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper;
import com.fr.design.file.TemplateResourceManager;
import com.fr.design.utils.DesignUtils;
import com.fr.file.TmpFileUtils;
import com.fr.general.CloudCenter;
@ -28,6 +29,9 @@ public class PreStartActivator extends Activator {
// 创建监听服务
DesignUtils.createListeningServer(DesignUtils.getPort(), startFileSuffix());
// 在插件引擎模块起来前 初始化下插件接口监听
TemplateResourceManager.getResource();
initLanguage();
}

4
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/light_yellow_bulb.svg

@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="5.40283" y="12.9943" width="5.16667" height="1.20556" rx="0.602778" fill="#FBB03B" fill-opacity="0.7"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.40234 9.68892V10.506C4.10652 9.66092 3.25 8.19854 3.25 6.53611C3.25 3.92043 5.37043 1.8 7.98611 1.8C10.6018 1.8 12.7222 3.92043 12.7222 6.53611C12.7222 8.1985 11.8657 9.66084 10.57 10.5059V11.2724C10.57 11.748 10.1845 12.1335 9.70888 12.1335H6.26443C5.78885 12.1335 5.40332 11.748 5.40332 11.2724V9.64432C5.40267 9.65911 5.40234 9.67398 5.40234 9.68892ZM7.22753 3.55733C7.34074 3.8092 7.22833 4.10516 6.97646 4.21837C6.22719 4.55514 5.67439 5.25006 5.53469 6.08273C5.489 6.35507 5.23119 6.5388 4.95885 6.49311C4.68652 6.44742 4.50278 6.18961 4.54847 5.91727C4.74465 4.74793 5.51914 3.77702 6.56649 3.30627C6.81836 3.19306 7.11432 3.30546 7.22753 3.55733ZM5.71997 7.5277C5.60631 7.27603 5.31015 7.16416 5.05848 7.27782C4.80682 7.39148 4.69494 7.68763 4.8086 7.9393C4.83113 7.98918 4.85479 8.03844 4.87955 8.08703C5.00491 8.33308 5.30599 8.43092 5.55204 8.30556C5.79809 8.1802 5.89593 7.87911 5.77057 7.63306C5.7529 7.59839 5.73603 7.56326 5.71997 7.5277Z" fill="#FBB03B" fill-opacity="0.7"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

4
designer-realize/src/main/resources/com/fr/design/mainframe/alphafine/images/yellow_bulb.svg

@ -0,0 +1,4 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="5.40283" y="12.9943" width="5.16667" height="1.20556" rx="0.602778" fill="#FBB03B"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.40234 9.68892V10.506C4.10652 9.66092 3.25 8.19854 3.25 6.53611C3.25 3.92043 5.37043 1.8 7.98611 1.8C10.6018 1.8 12.7222 3.92043 12.7222 6.53611C12.7222 8.1985 11.8657 9.66084 10.57 10.5059V11.2724C10.57 11.748 10.1845 12.1335 9.70888 12.1335H6.26443C5.78885 12.1335 5.40332 11.748 5.40332 11.2724V9.64432C5.40267 9.65911 5.40234 9.67398 5.40234 9.68892ZM7.22753 3.55733C7.34074 3.8092 7.22833 4.10516 6.97646 4.21837C6.22719 4.55514 5.67439 5.25006 5.53469 6.08273C5.489 6.35507 5.23119 6.5388 4.95885 6.49311C4.68652 6.44742 4.50278 6.18961 4.54847 5.91727C4.74465 4.74793 5.51914 3.77702 6.56649 3.30627C6.81836 3.19306 7.11432 3.30546 7.22753 3.55733ZM5.71997 7.5277C5.60631 7.27603 5.31015 7.16416 5.05848 7.27782C4.80682 7.39148 4.69494 7.68763 4.8086 7.9393C4.83113 7.98918 4.85479 8.03844 4.87955 8.08703C5.00491 8.33308 5.30599 8.43092 5.55204 8.30556C5.79809 8.1802 5.89593 7.87911 5.77057 7.63306C5.7529 7.59839 5.73603 7.56326 5.71997 7.5277Z" fill="#FBB03B"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Loading…
Cancel
Save