From cdf4faaea7ae8e489b36475c805da6262aaabaa3 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Tue, 12 Oct 2021 19:02:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-57813=20=E4=B8=BB=E9=A2=98=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E6=98=AF=E6=8F=90=E5=89=8D=E4=B8=8B=E8=BD=BD=E4=B8=80?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guide/creator/theme/ThemeToggleGuide.java | 39 +++++++++++++++++-- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java index 2387a470c..36d34b124 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.guide.creator.theme; +import com.fr.base.theme.FormTheme; import com.fr.base.theme.FormThemeConfig; import com.fr.base.theme.TemplateTheme; import com.fr.design.file.HistoryTemplateListCache; @@ -12,6 +13,7 @@ import com.fr.design.mainframe.guide.GuideIds; import com.fr.design.mainframe.guide.base.Guide; import com.fr.design.mainframe.guide.base.GuideBuilder; import com.fr.design.mainframe.guide.base.GuideLifecycleAdaptor; +import com.fr.design.mainframe.guide.base.GuideManager; import com.fr.design.mainframe.guide.creator.GuideCreateUtils; import com.fr.design.mainframe.guide.creator.GuideSceneHelper; import com.fr.design.mainframe.guide.scene.ClickScene; @@ -20,6 +22,7 @@ import com.fr.design.mainframe.guide.scene.GuideScene; import com.fr.design.mainframe.guide.scene.GuideSceneLifecycleAdaptor; import com.fr.design.mainframe.guide.tip.BubbleTip; import com.fr.design.mainframe.guide.tip.GuideTip; +import com.fr.design.mainframe.theme.AsyncThemeFetcher; import com.fr.design.mainframe.theme.TemplateThemeBlock; import com.fr.design.mainframe.theme.TemplateThemeGridPagesPane; import com.fr.design.mainframe.theme.dialog.TemplateThemeUsingDialog; @@ -27,12 +30,17 @@ import com.fr.design.utils.ComponentUtils; import javax.swing.SwingUtilities; import java.awt.Component; +import java.util.List; import java.util.TimerTask; public class ThemeToggleGuide { + private static final int PAGE_THEME_COUNT = 9; + private static final int DEFAULT_THEME_INDEX = 4; private static TemplateThemeUsingDialog themeDialog; private static String TARGET_XCREATOR_NAME = "chart00"; private static String filePath; + private static int themeLoadCount; + private static int selectedThemeIndex; public static Guide createGuide() { GuideScene scene1 = createScene1(); @@ -55,15 +63,38 @@ public class ThemeToggleGuide { .registerLifecycle(new GuideLifecycleAdaptor() { @Override public boolean prepared() { - filePath = GuideCreateUtils.openGuideFile("/com/fr/report/guide/template", "toggle_theme", ".frm"); - EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS); - return true; + List themeNames = FormThemeConfig.getInstance().getThemeNames(); + themeLoadCount = Math.min(themeNames.size(), PAGE_THEME_COUNT); + if (themeLoadCount == 0) { + GuideManager.getInstance().getCurrentGuide().terminate(); + } + selectedThemeIndex = Math.min(themeLoadCount - 1, DEFAULT_THEME_INDEX); + int lazyCount = themeLoadCount; + AsyncThemeFetcher asyncThemeFetcher = new AsyncThemeFetcher<>(PAGE_THEME_COUNT, FormThemeConfig.getInstance()); + for (int index = 0; index < lazyCount; index++) { + asyncThemeFetcher.submit(themeNames.get(index), new AsyncThemeFetcher.AsyncThemeFetchCallbackAdapter(){ + @Override + public void afterCachedFetch(FormTheme theme) { + themeLoadCount--; + if (themeLoadCount == 0) { + filePath = GuideCreateUtils.openGuideFile("/com/fr/report/guide/template", "toggle_theme", ".frm"); + EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS); + asyncThemeFetcher.shutdown(); + GuideManager.getInstance().getCurrentGuide().start(); + } + } + }); + } + return false; } @Override public void onEnd() { closeTemplateThemeUsingDialog(); GuideCreateUtils.deleteGuideFile(filePath); + filePath = null; + themeLoadCount = 0; + selectedThemeIndex = 0; } }) .getGuide(); @@ -118,7 +149,7 @@ public class ThemeToggleGuide { scene.registerLifecycle(new GuideSceneLifecycleAdaptor() { @Override public boolean prepared() { - String name = FormThemeConfig.getInstance().getThemeNames().get(4); + String name = FormThemeConfig.getInstance().getThemeNames().get(selectedThemeIndex); Component component = ComponentUtils.findComponentByName(themeDialog.getContentPane(), name); if (component instanceof TemplateThemeBlock) { scene.addClickTarget(component, ClickScene.ClickType.LEFT, true); From 4b744ae469a3ea4627e24ce1d489ef329ed771a1 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Tue, 12 Oct 2021 22:26:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-60798=20=E5=9C=A8=E7=BA=BF=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E4=B8=BB=E9=A2=98=E5=8F=B3=E5=87=BB=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=8C=85=E5=90=8E=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/ui/block/PreviewWidgetBlock.java | 2 +- .../theme/DownloadComponentPackageGuide.java | 46 +++++++++++++++---- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/PreviewWidgetBlock.java b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/PreviewWidgetBlock.java index 58dee8945..65a429458 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/PreviewWidgetBlock.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/PreviewWidgetBlock.java @@ -58,7 +58,7 @@ public abstract class PreviewWidgetBlock extends JPanel implements MouseListe return null; } - protected JPopupMenu getRightClickPopupMenu() { + public JPopupMenu getRightClickPopupMenu() { return rightClickPopupMenu; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java index d36506c94..feb2f02fe 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java @@ -40,10 +40,13 @@ import javax.swing.JDialog; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JPopupMenu; +import javax.swing.JScrollPane; +import javax.swing.SwingUtilities; import java.awt.Component; import java.awt.Point; import java.awt.event.ContainerAdapter; import java.awt.event.ContainerEvent; +import java.util.List; import java.util.TimerTask; import java.util.UUID; @@ -170,12 +173,29 @@ public class DownloadComponentPackageGuide { scene.registerLifecycle(new GuideSceneLifecycleAdaptor() { @Override public boolean prepared() { - onlineWidgetPackageBlock = (OnlineWidgetPackageBlock) ComponentUtils.findComponentByClass(EastRegionContainerPane.getInstance(), OnlineWidgetPackageBlock.class); - if (onlineWidgetPackageBlock != null) { - scene.addClickTarget(onlineWidgetPackageBlock, ClickScene.ClickType.RIGHT); - scene.addBubbleTip(Toolkit.i18nText("Fine-Design_Guide_Scene_F002002_Tip_Right_Click_Package"), GuideTip.Direction.LEFT); + List components = ComponentUtils.findComponentsByClass(EastRegionContainerPane.getInstance(), OnlineWidgetPackageBlock.class); + for (int index = 0; index < components.size(); index++) { + OnlineWidgetPackageBlock block = (OnlineWidgetPackageBlock) components.get(index); + if (StringUtils.isNotEmpty(block.getWidget().getThemePath())) { + onlineWidgetPackageBlock = block; + break; + } } - return true; + if (onlineWidgetPackageBlock == null) { + GuideManager.getInstance().getCurrentGuide().terminate(); + } else { + JScrollPane scrollPane = getParentScrollPane(onlineWidgetPackageBlock); + scrollPane.getVerticalScrollBar().setValue(onlineWidgetPackageBlock.getY()); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + scene.addClickTarget(onlineWidgetPackageBlock, ClickScene.ClickType.RIGHT); + scene.addBubbleTip(Toolkit.i18nText("Fine-Design_Guide_Scene_F002002_Tip_Right_Click_Package"), GuideTip.Direction.LEFT); + scene.showScene(); + } + }); + } + return false; } }); return scene; @@ -187,7 +207,7 @@ public class DownloadComponentPackageGuide { @Override public boolean prepared() { scene.addTarget(onlineWidgetPackageBlock); - JPopupMenu popupMenu = onlineWidgetPackageBlock.getComponentPopupMenu(); + JPopupMenu popupMenu = onlineWidgetPackageBlock.getRightClickPopupMenu(); Point location = getPopupMenuLocation(); scene.addCustomTarget( GuideCreateUtils.createTarget(popupMenu), @@ -204,7 +224,7 @@ public class DownloadComponentPackageGuide { scene.registerLifecycle(new GuideSceneLifecycleAdaptor() { @Override public boolean prepared() { - JPopupMenu popupMenu = onlineWidgetPackageBlock.getComponentPopupMenu(); + JPopupMenu popupMenu = onlineWidgetPackageBlock.getRightClickPopupMenu(); Point location = getPopupMenuLocation(); scene.addCustomTarget( GuideCreateUtils.createModalTarget(popupMenu), @@ -279,7 +299,7 @@ public class DownloadComponentPackageGuide { } private static Point getPopupMenuLocation() { - JPopupMenu popupMenu = onlineWidgetPackageBlock.getComponentPopupMenu(); + JPopupMenu popupMenu = onlineWidgetPackageBlock.getRightClickPopupMenu(); return new Point((onlineWidgetPackageBlock.getWidth() - popupMenu.getWidth()) / 2, (onlineWidgetPackageBlock.getHeight()- popupMenu.getHeight()) / 2); } @@ -289,4 +309,14 @@ public class DownloadComponentPackageGuide { } } + private static JScrollPane getParentScrollPane(Component component) { + if (component.getParent() == null) { + return null; + } + if (component.getParent() instanceof JScrollPane) { + return (JScrollPane) component.getParent(); + } + return getParentScrollPane(component.getParent()); + } + } From 364b073c285e15745345e89b4790e016c8c4f5f1 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Fri, 15 Oct 2021 19:52:45 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-60919=20&&=20REPORT-60899=20?= =?UTF-8?q?=E5=BC=95=E5=AF=BC=E9=A1=B5=E4=BC=98=E5=8C=96=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E7=B1=BB=E7=9A=84=E5=BC=95=E5=AF=BC=E5=BF=AB?= =?UTF-8?q?=E9=80=9F=E7=82=B9=E5=87=BB=E5=8F=91=E7=94=9F=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../guide/scene/AbstractGuideScene.java | 17 ++--- .../mainframe/guide/scene/ClickScene.java | 73 +++++++++++-------- .../guide/creator/GuideSceneHelper.java | 2 - .../layout/ChangeLayoutComponentGuide.java | 23 +++--- .../layout/UseLayoutAndComponentGuide.java | 24 +++--- .../theme/DownloadComponentPackageGuide.java | 2 +- .../guide/creator/theme/ThemeToggleGuide.java | 5 +- 7 files changed, 74 insertions(+), 72 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java b/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java index f0d74789d..240244fff 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java +++ b/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); add(nextButton); } - - container.revalidate(); - container.repaint(); } showContainer(); if (lifecycle != null) { @@ -319,9 +316,7 @@ public abstract class AbstractGuideScene extends JPanel implements GuideScene { @Override public void complete() { - container.getLayeredPane().remove(this); - container.repaint(); - + clear(); if (lifecycle != null && !lifecycle.onComplete()) { return; } @@ -386,13 +381,15 @@ public abstract class AbstractGuideScene extends JPanel implements GuideScene { return container.getLayeredPane().getHeight(); } - private void clear() { + public void clear() { targetList = new ArrayList<>(); highlightList = new ArrayList<>(); this.nextButton = null; - this.removeAll(); - invalidate(); - repaint(); + if (this.getComponentCount() > 0) { + this.removeAll(); + invalidate(); + repaint(); + } } @Override diff --git a/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/ClickScene.java b/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/ClickScene.java index 6217f41e7..0d8b5711b 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/ClickScene.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/ClickScene.java @@ -1,13 +1,15 @@ package com.fr.design.mainframe.guide.scene; +import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.mainframe.guide.base.GuideManager; import javax.swing.AbstractButton; -import javax.swing.ButtonModel; import javax.swing.SwingUtilities; import java.awt.Component; import java.awt.Point; import java.awt.Rectangle; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -58,49 +60,60 @@ public class ClickScene extends AbstractGuideScene{ public void mouseClicked(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON1) { if ((e.getClickCount() == 1 && clickType == ClickType.LEFT) || (e.getClickCount() == 2 && clickType == ClickType.LEFT_DOUBLE)) { - if (isDispatch) { - redispatchMouseEvent(e, target); - } - complete(); + dealWithDispatchLeftClick(target, e, isDispatch); } } else if (e.getButton() == MouseEvent.BUTTON3 && clickType == ClickType.RIGHT) { - if (isDispatch) { - redispatchMouseEvent(e, target); - } - complete(); + clear(); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + if (isDispatch) { + redispatchMouseEvent(e, target); + } + complete(); + } + }); } + } + @Override public void mousePressed(MouseEvent e) { - if (isDispatch) { - if (target instanceof AbstractButton) { - AbstractButton b = (AbstractButton) target; - b.setFocusable(false); + if ((target instanceof AbstractButton) && (target.getParent() instanceof UIButtonGroup)) { + if (isDispatch) { + redispatchMouseEvent(e, target); } - redispatchMouseEvent(e, target); - } - } - - @Override - public void mouseReleased(MouseEvent e) { - if (isDispatch) { - 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 - public void mouseExited(MouseEvent e) { + public void run() { if (isDispatch) { - redispatchMouseEvent(e, target); + 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); + } } + complete(); } }); } @@ -114,7 +127,7 @@ public class ClickScene extends AbstractGuideScene{ @Override public void showScene() { // 交互类的 scene 如果没有高亮内容块载,需要及时终止Guide,否则就没法去掉模态框影响到设计器主功能的使用了 - if (this.getComponentCount() == 0) { + if (this.getComponentCount() == 0 && getHighlightList().isEmpty()) { GuideManager.getInstance().getCurrentGuide().terminate(); } else { super.showScene(); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/GuideSceneHelper.java b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/GuideSceneHelper.java index ff80efcf9..2131fda07 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/GuideSceneHelper.java +++ b/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.EmptyCallBackSaveWorker; -import java.awt.Window; - public class GuideSceneHelper { public static GuideScene createFormDesignerBodyDisplayScene() { DisplayScene scene = new DisplayScene(); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java index 335837196..a9b7f56c8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java @@ -98,20 +98,15 @@ public class ChangeLayoutComponentGuide { @Override public boolean prepared() { switchButton.getComponentPopupMenu().setVisible(true); - SwingUtilities.invokeLater(new Runnable() { - @Override - public void run() { - scene.addCustomTarget( - GuideCreateUtils.createModalTarget(switchButton.getComponentPopupMenu()), - GuideCreateUtils.getRelativeBounds(switchButton.getComponentPopupMenu(), switchButton,0, -switchButton.getComponentPopupMenu().getHeight()) - ); - scene.addClickTarget(switchButton.getComponentPopupMenu().getComponent(1), ClickScene.ClickType.LEFT, true); - 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); - scene.showScene(); - } - }); - return false; + scene.addCustomTarget( + GuideCreateUtils.createModalTarget(switchButton.getComponentPopupMenu()), + GuideCreateUtils.getRelativeBounds(switchButton.getComponentPopupMenu(), switchButton,0, -switchButton.getComponentPopupMenu().getHeight()) + ); + scene.addClickTarget(switchButton.getComponentPopupMenu().getComponent(1), ClickScene.ClickType.LEFT, true); + 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); + scene.showScene(); + return true; } }); return scene; diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/UseLayoutAndComponentGuide.java b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/UseLayoutAndComponentGuide.java index 6234ea790..54fc5577b 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/UseLayoutAndComponentGuide.java +++ b/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.stable.StringUtils; +import javax.swing.JComponent; import java.awt.Component; import java.util.ArrayList; import java.util.List; @@ -72,15 +73,11 @@ public class UseLayoutAndComponentGuide { preloadShareComponent(); Component component = ComponentUtils.findComponentByName(NorthRegionContainerPane.getInstance(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_File")); fileHeadMenu = ((UIHeadMenu) component); - fileHeadMenu.setSelected(true); - fileHeadMenu.getPopupMenu().show(fileHeadMenu, 0, fileHeadMenu.getHeight()); return true; } @Override public void onEnd() { - fileHeadMenu.setSelected(false); - fileHeadMenu.getPopupMenu().setVisible(false); if (newFormPane != null) { newFormPane.getWindow().dispose(); } @@ -101,18 +98,18 @@ public class UseLayoutAndComponentGuide { GuideCreateUtils.createModalTarget(fileHeadMenu.getPopupMenu()), 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(); return true; } - - @Override - public void onShow() { - fileHeadMenu.setSelected(false); - fileHeadMenu.getPopupMenu().setVisible(false); - } + @Override public boolean onComplete() { @@ -124,6 +121,7 @@ public class UseLayoutAndComponentGuide { return scene; } + public static GuideScene createScene2() { DisplayScene scene = new DisplayScene(); scene.registerLifecycle(new GuideSceneLifecycleAdaptor() { @@ -136,7 +134,7 @@ public class UseLayoutAndComponentGuide { scene.showScene(); GuideCreateUtils.TIMER.purge(); } - }, 300); + }, 100); return false; } }); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java index d36506c94..349857a3b 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java @@ -247,7 +247,7 @@ public class DownloadComponentPackageGuide { scene.showScene(); GuideCreateUtils.TIMER.purge(); } - }, 300); + }, 100); return false; } }); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java index 2387a470c..5b7024778 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/ThemeToggleGuide.java @@ -105,7 +105,7 @@ public class ThemeToggleGuide { scene.showScene(); GuideCreateUtils.TIMER.purge(); } - },300); + },100); return false; } }); @@ -163,7 +163,7 @@ public class ThemeToggleGuide { if (target2 != null) { uiButtonGroup[0] = (UIButtonGroup) target2; target2 = ((UIButtonGroup) target2).getButton(0); - scene.addClickTarget(target2, ClickScene.ClickType.LEFT, true); + scene.addClickTarget(target2, ClickScene.ClickType.LEFT,true); scene.addBubbleTip( Toolkit.i18nText("Fine-Design_Guide_Scene_F002001_Tip_Toggle_Follow_Theme"), Toolkit.i18nText("Fine-Design_Guide_Scene_F002001_Tip_Toggle_Follow_Theme_Description"), @@ -183,6 +183,7 @@ public class ThemeToggleGuide { if (uiButtonGroup[0] != null) { uiButtonGroup[0].setSelectedIndex(0); } + GuideCreateUtils.getFormDesigner().repaint(); return true; } });