Browse Source

Merge pull request #6253 in DESIGN/design from release/11.0 to feature/x

* commit 'dc4558f2c70cae1fc8dc473b21abc31cd9e450ee':
  REPORT-60995 导出-导出事件-参数设置-取消勾选继承报表后弹窗关不掉
  REPORT-60919 && REPORT-60899 引导页优化解决弹窗类的引导快速点击发生异常的问题
  REPORT-60992 导出-导出事件-其他模板-点击模板文件后效果错乱
  REPORT-60900 视觉切图提供的有点问题,找视觉更新了切图
  REPORT-59545 设计器很多报错提示弹窗的交互有问题
  REPORT-60535 表单新自适应单元格设置“用下载链接显示二进制内容”设计器和PC打开颜色不一致
feature/x
superman 3 years ago
parent
commit
7e0fd02523
  1. 17
      designer-base/src/main/java/com/fr/design/formula/FormulaChecker.java
  2. 11
      designer-base/src/main/java/com/fr/design/formula/FormulaCheckerException.java
  3. 60
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  4. 13
      designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java
  5. 11
      designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java
  6. 55
      designer-base/src/main/java/com/fr/design/mainframe/guide/scene/ClickScene.java
  7. BIN
      designer-form/src/main/resources/com/fr/design/form/layouts/images/simple_style_18.png
  8. 10
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  9. 2
      designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/GuideSceneHelper.java
  10. 7
      designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java
  11. 22
      designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/UseLayoutAndComponentGuide.java
  12. 2
      designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java
  13. 5
      designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java

17
designer-base/src/main/java/com/fr/design/formula/FormulaChecker.java

@ -25,7 +25,7 @@ public class FormulaChecker {
private static final String INVALID_FORMULA = Toolkit.i18nText("Fine-Design_Basic_FormulaD_Invalid_Formula"); private static final String INVALID_FORMULA = Toolkit.i18nText("Fine-Design_Basic_FormulaD_Invalid_Formula");
public static final String COLON = ":"; public static final String COLON = ":";
public static String check(String formulaText) { public static String check(String formulaText) throws FormulaCheckerException {
StringReader in = new StringReader(formulaText); StringReader in = new StringReader(formulaText);
FRLexer lexer = new FRLexer(in); FRLexer lexer = new FRLexer(in);
@ -34,12 +34,15 @@ public class FormulaChecker {
try { try {
Expression expression = parser.parse(); Expression expression = parser.parse();
Node node = expression.getConditionalExpression(); Node node = expression.getConditionalExpression();
return FunctionCheckerDispatcher.getInstance() boolean valid = FunctionCheckerDispatcher.getInstance().getFunctionChecker(node).checkFunction(node);
.getFunctionChecker(node) if (valid) {
.checkFunction(node) ? VALID_FORMULA : INVALID_FORMULA; return VALID_FORMULA;
} else {
throw new FormulaCheckerException(INVALID_FORMULA);
}
} catch (ConditionCheckWrongException cce) { } catch (ConditionCheckWrongException cce) {
String functionName = cce.getFunctionName(); String functionName = cce.getFunctionName();
return functionName + Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Condition_Tips") + COLON; throw new FormulaCheckerException(functionName + Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Condition_Tips") + COLON);
} catch (FunctionCheckWrongException ce) { } catch (FunctionCheckWrongException ce) {
List<FunctionRule> rules = ce.getRules(); List<FunctionRule> rules = ce.getRules();
String functionName = ce.getFunctionName(); String functionName = ce.getFunctionName();
@ -60,10 +63,10 @@ public class FormulaChecker {
errorMsg.append(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Or")); errorMsg.append(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Or"));
} }
} }
return errorMsg.toString(); throw new FormulaCheckerException(errorMsg.toString());
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
return INVALID_FORMULA; throw new FormulaCheckerException(INVALID_FORMULA);
// alex:继续往下面走,expression为null时告知不合法公式 // alex:继续往下面走,expression为null时告知不合法公式
} }
} }

11
designer-base/src/main/java/com/fr/design/formula/FormulaCheckerException.java

@ -0,0 +1,11 @@
package com.fr.design.formula;
public class FormulaCheckerException extends Exception {
public FormulaCheckerException() {
}
public FormulaCheckerException(String message) {
super(message);
}
}

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

@ -650,12 +650,14 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
// Execute Formula default cell element. // Execute Formula default cell element.
String formulaText = formulaTextArea.getText().trim(); String formulaText = formulaTextArea.getText().trim();
String formulaValidMessage = FormulaChecker.check(formulaText); String formulaValidMessage;
FineJOptionPane.showMessageDialog( try {
FormulaPane.this, formulaValidMessage = FormulaChecker.check(formulaText);
formulaValidMessage + ".", showMessageDialog(formulaValidMessage + ".");
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), } catch (FormulaCheckerException e) {
JOptionPane.WARNING_MESSAGE); formulaValidMessage = e.getMessage();
showMessageDialog(formulaValidMessage + ".", false);
}
} }
}; };
@ -663,22 +665,26 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
String formulaText = formulaTextArea.getText().trim(); String formulaText = formulaTextArea.getText().trim();
String formulaValidMessage = FormulaChecker.check(formulaText);
;
String unSupportFormula = containsUnsupportedSimulationFormulas(formulaText); String unSupportFormula = containsUnsupportedSimulationFormulas(formulaText);
if (unSupportFormula != null) { if (unSupportFormula != null) {
FineJOptionPane.showMessageDialog( showMessageDialog(Toolkit.i18nText("Fine-Design_Basic_Formula_Unsupported_Formulas") + ":" + unSupportFormula, false);
FormulaPane.this,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_Unsupported_Formulas") + ":" + unSupportFormula,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
JOptionPane.INFORMATION_MESSAGE);
return; return;
} }
String formulaValidMessage;
boolean formulaValid;
try {
formulaValidMessage = FormulaChecker.check(formulaText);
formulaValid = true;
} catch (FormulaCheckerException formulaCheckerException) {
formulaValidMessage = formulaCheckerException.getMessage();
formulaValid = false;
}
String messageTips; String messageTips;
if (formulaValidMessage.equals(INVALID_FORMULA)) { if (ComparatorUtils.equals(formulaValidMessage, INVALID_FORMULA)) {
messageTips = INVALID_FORMULA; messageTips = INVALID_FORMULA;
} else { } else {
messageTips = formulaValidMessage.equals(VALID_FORMULA) ? "" : formulaValidMessage + "\n"; messageTips = ComparatorUtils.equals(formulaValidMessage, VALID_FORMULA) ? "" : formulaValidMessage + "\n";
Map<String, Object> paramsMap = setParamsIfExist(formulaText); Map<String, Object> paramsMap = setParamsIfExist(formulaText);
Calculator calculator = Calculator.createCalculator(); Calculator calculator = Calculator.createCalculator();
ParameterMapNameSpace parameterMapNameSpace = ParameterMapNameSpace.create(paramsMap); ParameterMapNameSpace parameterMapNameSpace = ParameterMapNameSpace.create(paramsMap);
@ -699,19 +705,33 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
String result = objectToString.length() > DEFUAL_FOMULA_LENGTH ? String result = objectToString.length() > DEFUAL_FOMULA_LENGTH ?
objectToString.substring(0, DEFUAL_FOMULA_LENGTH - ELLIPSIS.length()) + ELLIPSIS : objectToString; objectToString.substring(0, DEFUAL_FOMULA_LENGTH - ELLIPSIS.length()) + ELLIPSIS : objectToString;
messageTips = messageTips + messageTips = messageTips +
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_Cal_Result") + ":" + result; Toolkit.i18nText("Fine-Design_Basic_Formula_Cal_Result") + ":" + result;
FineLoggerFactory.getLogger().info("value:{}", value); FineLoggerFactory.getLogger().info("value:{}", value);
} catch (UtilEvalError utilEvalError) { } catch (UtilEvalError utilEvalError) {
FineLoggerFactory.getLogger().error("", utilEvalError); FineLoggerFactory.getLogger().error("", utilEvalError);
} }
} }
showMessageDialog(messageTips, formulaValid);
}
};
private void showMessageDialog(String message) {
showMessageDialog(message, true);
}
private void showMessageDialog(String message, boolean formulaValid) {
if (formulaValid) {
FineJOptionPane.showMessageDialog(
FormulaPane.this,
message);
} else {
FineJOptionPane.showMessageDialog( FineJOptionPane.showMessageDialog(
FormulaPane.this, FormulaPane.this,
messageTips, message,
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"),
JOptionPane.INFORMATION_MESSAGE); JOptionPane.WARNING_MESSAGE);
}
} }
};
private String containsUnsupportedSimulationFormulas(String formulaText) { private String containsUnsupportedSimulationFormulas(String formulaText) {
try { try {

13
designer-base/src/main/java/com/fr/design/javascript/ExportJavaScriptPane.java

@ -326,16 +326,19 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
private UIButton browserButton; private UIButton browserButton;
public ExportTemplateChooser() { public ExportTemplateChooser() {
reportletNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
// 路径输入框 // 路径输入框
reportPathTextField = new UITextField(7); reportPathTextField = new UITextField(8);
reportPathTextField.setEnabled(false); reportPathTextField.setEnabled(false);
reportletNamePane.add(reportPathTextField, BorderLayout.WEST);
// 选择路径按钮 // 选择路径按钮
browserButton = new UIButton("..."); browserButton = new UIButton("...");
browserButton.setVisible(true); browserButton.setVisible(true);
reportletNamePane.add(browserButton, BorderLayout.EAST);
Component[][] templateChooserComponent = {{reportPathTextField, browserButton}};
double[] rowSize = {TableLayout.PREFERRED};
double[] columnSize = {TableLayout.FILL, 22};
reportletNamePane = TableLayoutHelper.createCommonTableLayoutPane(templateChooserComponent, rowSize, columnSize, 0);
browserButton.addActionListener(new ActionListener() { browserButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
@ -777,6 +780,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
if (currentTemplatePane.extendParametersCheckBox.isSelected()) { if (currentTemplatePane.extendParametersCheckBox.isSelected()) {
exportJavaScript.setParameters(null); exportJavaScript.setParameters(null);
} else { } else {
if (parameterViewPane != null) {
List<ParameterProvider> parameterList = parameterViewPane.update(); List<ParameterProvider> parameterList = parameterViewPane.update();
if (!parameterList.isEmpty()) { if (!parameterList.isEmpty()) {
Parameter[] parameters = new Parameter[parameterList.size()]; Parameter[] parameters = new Parameter[parameterList.size()];
@ -784,6 +788,7 @@ public class ExportJavaScriptPane extends AbstractHyperLinkPane<ExportJavaScript
js.setParameters(parameters); js.setParameters(parameters);
} }
} }
}
exportJavaScript.addJS(js); exportJavaScript.addJS(js);
} else { } else {
List<SingleJavaScript> javaScripts = otherTemplatePane.editorPane.update(); List<SingleJavaScript> javaScripts = otherTemplatePane.editorPane.update();

11
designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java

@ -307,9 +307,6 @@ public abstract class AbstractGuideScene extends JPanel implements GuideScene {
nextButton.setBounds((getSceneWidth() - 60) / 2, getSceneHeight() - 100, 60, 30); nextButton.setBounds((getSceneWidth() - 60) / 2, getSceneHeight() - 100, 60, 30);
add(nextButton); add(nextButton);
} }
container.revalidate();
container.repaint();
} }
showContainer(); showContainer();
if (lifecycle != null) { if (lifecycle != null) {
@ -319,9 +316,7 @@ public abstract class AbstractGuideScene extends JPanel implements GuideScene {
@Override @Override
public void complete() { public void complete() {
container.getLayeredPane().remove(this); clear();
container.repaint();
if (lifecycle != null && !lifecycle.onComplete()) { if (lifecycle != null && !lifecycle.onComplete()) {
return; return;
} }
@ -386,14 +381,16 @@ public abstract class AbstractGuideScene extends JPanel implements GuideScene {
return container.getLayeredPane().getHeight(); return container.getLayeredPane().getHeight();
} }
private void clear() { public void clear() {
targetList = new ArrayList<>(); targetList = new ArrayList<>();
highlightList = new ArrayList<>(); highlightList = new ArrayList<>();
this.nextButton = null; this.nextButton = null;
if (this.getComponentCount() > 0) {
this.removeAll(); this.removeAll();
invalidate(); invalidate();
repaint(); repaint();
} }
}
@Override @Override
public void paint(Graphics g) { public void paint(Graphics g) {

55
designer-base/src/main/java/com/fr/design/mainframe/guide/scene/ClickScene.java

@ -1,13 +1,15 @@
package com.fr.design.mainframe.guide.scene; package com.fr.design.mainframe.guide.scene;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.mainframe.guide.base.GuideManager; import com.fr.design.mainframe.guide.base.GuideManager;
import javax.swing.AbstractButton; import javax.swing.AbstractButton;
import javax.swing.ButtonModel;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import java.awt.Component; import java.awt.Component;
import java.awt.Point; import java.awt.Point;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
@ -58,50 +60,61 @@ public class ClickScene extends AbstractGuideScene{
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (e.getButton() == MouseEvent.BUTTON1) { if (e.getButton() == MouseEvent.BUTTON1) {
if ((e.getClickCount() == 1 && clickType == ClickType.LEFT) || (e.getClickCount() == 2 && clickType == ClickType.LEFT_DOUBLE)) { if ((e.getClickCount() == 1 && clickType == ClickType.LEFT) || (e.getClickCount() == 2 && clickType == ClickType.LEFT_DOUBLE)) {
if (isDispatch) { dealWithDispatchLeftClick(target, e, isDispatch);
redispatchMouseEvent(e, target);
}
complete();
} }
} else if (e.getButton() == MouseEvent.BUTTON3 && clickType == ClickType.RIGHT) { } else if (e.getButton() == MouseEvent.BUTTON3 && clickType == ClickType.RIGHT) {
clear();
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (isDispatch) { if (isDispatch) {
redispatchMouseEvent(e, target); redispatchMouseEvent(e, target);
} }
complete(); complete();
} }
});
} }
@Override
public void mousePressed(MouseEvent e) {
if (isDispatch) {
if (target instanceof AbstractButton) {
AbstractButton b = (AbstractButton) target;
b.setFocusable(false);
}
redispatchMouseEvent(e, target);
}
} }
@Override @Override
public void mouseReleased(MouseEvent e) { public void mousePressed(MouseEvent e) {
if ((target instanceof AbstractButton) && (target.getParent() instanceof UIButtonGroup)) {
if (isDispatch) { if (isDispatch) {
redispatchMouseEvent(e, target); redispatchMouseEvent(e, target);
} }
} }
@Override
public void mouseEntered(MouseEvent e) {
if (isDispatch) {
redispatchMouseEvent(e, target);
} }
});
} }
private void dealWithDispatchLeftClick(Component target, MouseEvent e, boolean isDispatch) {
clear();
SwingUtilities.invokeLater(new Runnable() {
@Override @Override
public void mouseExited(MouseEvent e) { public void run() {
if (isDispatch) { if (isDispatch) {
if (target instanceof AbstractButton) {
AbstractButton button = (AbstractButton) target;
ActionListener[] actionListeners= button.getActionListeners();
for(int i = 0; i < actionListeners.length; i++) {
ActionListener actionListener = actionListeners[i];
actionListener.actionPerformed(new ActionEvent(
button,
ActionEvent.ACTION_PERFORMED,
button.getActionCommand(),
e.getWhen(),
e.getModifiers()
));
}
} else {
redispatchMouseEvent(e, target); redispatchMouseEvent(e, target);
} }
} }
complete();
}
}); });
} }
@ -114,7 +127,7 @@ public class ClickScene extends AbstractGuideScene{
@Override @Override
public void showScene() { public void showScene() {
// 交互类的 scene 如果没有高亮内容块载,需要及时终止Guide,否则就没法去掉模态框影响到设计器主功能的使用了 // 交互类的 scene 如果没有高亮内容块载,需要及时终止Guide,否则就没法去掉模态框影响到设计器主功能的使用了
if (this.getComponentCount() == 0) { if (this.getComponentCount() == 0 && getHighlightList().isEmpty()) {
GuideManager.getInstance().getCurrentGuide().terminate(); GuideManager.getInstance().getCurrentGuide().terminate();
} else { } else {
super.showScene(); super.showScene();

BIN
designer-form/src/main/resources/com/fr/design/form/layouts/images/simple_style_18.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.cell.settingpane; package com.fr.design.mainframe.cell.settingpane;
import com.fr.base.Style;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPane;
@ -21,11 +22,13 @@ import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase;
import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.cellattr.CellGUIAttr; import com.fr.report.cell.cellattr.CellGUIAttr;
import com.fr.report.cell.cellattr.CellInsertPolicyAttr; import com.fr.report.cell.cellattr.CellInsertPolicyAttr;
import com.fr.report.cell.cellattr.CellPageAttr; import com.fr.report.cell.cellattr.CellPageAttr;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import java.awt.Color; import java.awt.Color;
@ -327,13 +330,20 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
Style elementStyle = cellElement.getStyle();
FRFont frFont = elementStyle.getFRFont();
if (showContent.getSelectedIndex() == 3) { if (showContent.getSelectedIndex() == 3) {
fileNamePane.setPreferredSize(new Dimension(100, 20)); fileNamePane.setPreferredSize(new Dimension(100, 20));
fileNameLayout.show(fileNamePane, "content"); fileNameLayout.show(fileNamePane, "content");
frFont = frFont.applyForeground(Color.blue);
frFont = frFont.applyUnderline(Constants.LINE_THIN);
} else { } else {
fileNameLayout.show(fileNamePane, "none"); fileNameLayout.show(fileNamePane, "none");
fileNamePane.setPreferredSize(new Dimension(0, 0)); fileNamePane.setPreferredSize(new Dimension(0, 0));
frFont = frFont.applyForeground(Color.black);
frFont = frFont.applyUnderline(Constants.LINE_NONE);
} }
cellElement.setStyle(elementStyle.deriveFRFont(frFont));
} }
}); });
return fileNamePane; return fileNamePane;

2
designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/GuideSceneHelper.java

@ -19,8 +19,6 @@ import com.fr.design.utils.ComponentUtils;
import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.design.worker.save.CallbackSaveWorker;
import com.fr.design.worker.save.EmptyCallBackSaveWorker; import com.fr.design.worker.save.EmptyCallBackSaveWorker;
import java.awt.Window;
public class GuideSceneHelper { public class GuideSceneHelper {
public static GuideScene createFormDesignerBodyDisplayScene() { public static GuideScene createFormDesignerBodyDisplayScene() {
DisplayScene scene = new DisplayScene(); DisplayScene scene = new DisplayScene();

7
designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java

@ -98,9 +98,6 @@ public class ChangeLayoutComponentGuide {
@Override @Override
public boolean prepared() { public boolean prepared() {
switchButton.getComponentPopupMenu().setVisible(true); switchButton.getComponentPopupMenu().setVisible(true);
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
scene.addCustomTarget( scene.addCustomTarget(
GuideCreateUtils.createModalTarget(switchButton.getComponentPopupMenu()), GuideCreateUtils.createModalTarget(switchButton.getComponentPopupMenu()),
GuideCreateUtils.getRelativeBounds(switchButton.getComponentPopupMenu(), switchButton,0, -switchButton.getComponentPopupMenu().getHeight()) GuideCreateUtils.getRelativeBounds(switchButton.getComponentPopupMenu(), switchButton,0, -switchButton.getComponentPopupMenu().getHeight())
@ -109,9 +106,7 @@ public class ChangeLayoutComponentGuide {
scene.addBubbleTip(Toolkit.i18nText("Fine-Design_Guide_Scene_F001002_Tip_Select_Fix_layout"), null, GuideTip.Direction.RIGHT, 0.5f, 0.8f); scene.addBubbleTip(Toolkit.i18nText("Fine-Design_Guide_Scene_F001002_Tip_Select_Fix_layout"), null, GuideTip.Direction.RIGHT, 0.5f, 0.8f);
switchButton.getComponentPopupMenu().setVisible(false); switchButton.getComponentPopupMenu().setVisible(false);
scene.showScene(); scene.showScene();
} return true;
});
return false;
} }
}); });
return scene; return scene;

22
designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/UseLayoutAndComponentGuide.java

@ -32,6 +32,7 @@ import com.fr.form.share.group.DefaultShareGroup;
import com.fr.form.share.group.DefaultShareGroupManager; import com.fr.form.share.group.DefaultShareGroupManager;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.JComponent;
import java.awt.Component; import java.awt.Component;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -72,15 +73,11 @@ public class UseLayoutAndComponentGuide {
preloadShareComponent(); preloadShareComponent();
Component component = ComponentUtils.findComponentByName(NorthRegionContainerPane.getInstance(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_File")); Component component = ComponentUtils.findComponentByName(NorthRegionContainerPane.getInstance(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_File"));
fileHeadMenu = ((UIHeadMenu) component); fileHeadMenu = ((UIHeadMenu) component);
fileHeadMenu.setSelected(true);
fileHeadMenu.getPopupMenu().show(fileHeadMenu, 0, fileHeadMenu.getHeight());
return true; return true;
} }
@Override @Override
public void onEnd() { public void onEnd() {
fileHeadMenu.setSelected(false);
fileHeadMenu.getPopupMenu().setVisible(false);
if (newFormPane != null) { if (newFormPane != null) {
newFormPane.getWindow().dispose(); newFormPane.getWindow().dispose();
} }
@ -101,18 +98,18 @@ public class UseLayoutAndComponentGuide {
GuideCreateUtils.createModalTarget(fileHeadMenu.getPopupMenu()), GuideCreateUtils.createModalTarget(fileHeadMenu.getPopupMenu()),
GuideCreateUtils.getRelativeBounds(fileHeadMenu.getPopupMenu(), fileHeadMenu, 0 , fileHeadMenu.getHeight()) GuideCreateUtils.getRelativeBounds(fileHeadMenu.getPopupMenu(), fileHeadMenu, 0 , fileHeadMenu.getHeight())
); );
scene.addClickTarget(fileHeadMenu.getMenuComponent(2), ClickScene.ClickType.LEFT);
scene.addBubbleTip(Toolkit.i18nText("Fine-Design_Guide_Scene_F001001_Tip_New_Form"), GuideTip.Direction.BOTTOM); scene.addCustomClickTarget(
GuideCreateUtils.createTarget((JComponent) fileHeadMenu.getMenuComponent(2)),
GuideCreateUtils.getRelativeBounds(fileHeadMenu.getMenuComponent(2), fileHeadMenu, 0,fileHeadMenu.getHeight() + fileHeadMenu.getMenuComponent(2).getY()),
ClickScene.ClickType.LEFT
);
scene.addBubbleTip(Toolkit.i18nText("Fine-Design_Guide_Scene_F001001_Tip_New_Form") + "测试文本测试文本测试文本测试文本测试文本", GuideTip.Direction.BOTTOM);
scene.showScene(); scene.showScene();
return true; return true;
} }
@Override
public void onShow() {
fileHeadMenu.setSelected(false);
fileHeadMenu.getPopupMenu().setVisible(false);
}
@Override @Override
public boolean onComplete() { public boolean onComplete() {
@ -124,6 +121,7 @@ public class UseLayoutAndComponentGuide {
return scene; return scene;
} }
public static GuideScene createScene2() { public static GuideScene createScene2() {
DisplayScene scene = new DisplayScene(); DisplayScene scene = new DisplayScene();
scene.registerLifecycle(new GuideSceneLifecycleAdaptor() { scene.registerLifecycle(new GuideSceneLifecycleAdaptor() {
@ -136,7 +134,7 @@ public class UseLayoutAndComponentGuide {
scene.showScene(); scene.showScene();
GuideCreateUtils.TIMER.purge(); GuideCreateUtils.TIMER.purge();
} }
}, 300); }, 100);
return false; return false;
} }
}); });

2
designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java

@ -267,7 +267,7 @@ public class DownloadComponentPackageGuide {
scene.showScene(); scene.showScene();
GuideCreateUtils.TIMER.purge(); GuideCreateUtils.TIMER.purge();
} }
}, 300); }, 100);
return false; return false;
} }
}); });

5
designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java

@ -136,7 +136,7 @@ public class ThemeToggleGuide {
scene.showScene(); scene.showScene();
GuideCreateUtils.TIMER.purge(); GuideCreateUtils.TIMER.purge();
} }
},300); },100);
return false; return false;
} }
}); });
@ -194,7 +194,7 @@ public class ThemeToggleGuide {
if (target2 != null) { if (target2 != null) {
uiButtonGroup[0] = (UIButtonGroup) target2; uiButtonGroup[0] = (UIButtonGroup) target2;
target2 = ((UIButtonGroup) target2).getButton(0); target2 = ((UIButtonGroup) target2).getButton(0);
scene.addClickTarget(target2, ClickScene.ClickType.LEFT, true); scene.addClickTarget(target2, ClickScene.ClickType.LEFT,true);
scene.addBubbleTip( scene.addBubbleTip(
Toolkit.i18nText("Fine-Design_Guide_Scene_F002001_Tip_Toggle_Follow_Theme"), Toolkit.i18nText("Fine-Design_Guide_Scene_F002001_Tip_Toggle_Follow_Theme"),
Toolkit.i18nText("Fine-Design_Guide_Scene_F002001_Tip_Toggle_Follow_Theme_Description"), Toolkit.i18nText("Fine-Design_Guide_Scene_F002001_Tip_Toggle_Follow_Theme_Description"),
@ -214,6 +214,7 @@ public class ThemeToggleGuide {
if (uiButtonGroup[0] != null) { if (uiButtonGroup[0] != null) {
uiButtonGroup[0].setSelectedIndex(0); uiButtonGroup[0].setSelectedIndex(0);
} }
GuideCreateUtils.getFormDesigner().repaint();
return true; return true;
} }
}); });

Loading…
Cancel
Save