Browse Source

REPORT-62896 下载主题引导过程中概率性退出引导问题

bugfix/11.0
Tommy 3 years ago
parent
commit
ed0a2090df
  1. 6
      designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java
  2. 27
      designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/theme/DownloadComponentPackageGuide.java

6
designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java

@ -140,11 +140,11 @@ public class FormWidgetDetailPane extends FormDockView{
}
public void switch2Local() {
cardLayout.show(centerPane, paneList.get(0).getTitle());
headGroup.setSelectedIndex(0);
}
public void swich2Online() {
cardLayout.show(centerPane, paneList.get(1).getTitle());
public void switch2Online() {
headGroup.setSelectedIndex(ONLINE_TAB);
}
private UILabel tipLabel(String text) {

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

@ -29,6 +29,7 @@ import com.fr.design.mainframe.guide.tip.GuideTip;
import com.fr.design.mainframe.share.ui.block.OnlineWidgetPackageBlock;
import com.fr.design.mainframe.share.ui.online.OnlineWidgetRepoPane;
import com.fr.design.mainframe.share.ui.online.OnlineWidgetTabPane;
import com.fr.design.mainframe.share.ui.online.widgetpackage.OnlineWidgetPackagesShowPane;
import com.fr.design.mainframe.share.util.DownloadUtils;
import com.fr.design.utils.ComponentUtils;
import com.fr.form.share.utils.ShareUtils;
@ -102,22 +103,23 @@ public class DownloadComponentPackageGuide {
EastRegionContainerPane.getInstance().showContainer();
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS);
OnlineWidgetRepoPane onlineWidgetRepoPane = OnlineWidgetRepoPane.getInstance();
onlineWidgetRepoPane.setContent();
OnlineWidgetTabPane tabPane = (OnlineWidgetTabPane) ComponentUtils.findComponentByClass(onlineWidgetRepoPane, OnlineWidgetTabPane.class);
UITabGroup tabGroup = (UITabGroup) ComponentUtils.findComponentByClass(tabPane, UITabGroup.class);
JPanel centerPane = (JPanel) tabPane.getComponent(1);
if (centerPane.getComponentCount() > 0) {
Component onlineWidgetPackagesShowPane = ComponentUtils.findComponentByClass(onlineWidgetRepoPane, OnlineWidgetPackagesShowPane.class);
if (onlineWidgetPackagesShowPane != null) {
GuideManager.getInstance().getCurrentGuide().start();
} else {
onlineWidgetRepoPane.setContent();
OnlineWidgetTabPane tabPane = (OnlineWidgetTabPane) ComponentUtils.findComponentByClass(onlineWidgetRepoPane, OnlineWidgetTabPane.class);
JPanel centerPane = (JPanel) tabPane.getComponent(1);
centerPane.addContainerListener(new ContainerAdapter() {
@Override
public void componentAdded(ContainerEvent e) {
GuideManager.getInstance().getCurrentGuide().start();
if (e.getChild() instanceof OnlineWidgetPackagesShowPane) {
GuideManager.getInstance().getCurrentGuide().start();
}
}
});
}
tabGroup.setSelectedIndex(1);
tabGroup.tabChanged(1);
switch2OnlinePackageBlock();
} else {
GuideCreateUtils.showNoNetworkAlert();
GuideManager.getInstance().getCurrentGuide().terminate();
@ -168,7 +170,7 @@ public class DownloadComponentPackageGuide {
@Override
public boolean onComplete() {
FormWidgetDetailPane.getInstance().swich2Online();
FormWidgetDetailPane.getInstance().switch2Online();
return true;
}
});
@ -298,4 +300,11 @@ public class DownloadComponentPackageGuide {
themeConfirmDialog.dispose();
}
}
private static void switch2OnlinePackageBlock() {
OnlineWidgetTabPane tabPane = (OnlineWidgetTabPane) ComponentUtils.findComponentByClass(OnlineWidgetRepoPane.getInstance(), OnlineWidgetTabPane.class);
UITabGroup tabGroup = (UITabGroup) ComponentUtils.findComponentByClass(tabPane, UITabGroup.class);
tabGroup.setSelectedIndex(1);
tabGroup.tabChanged(1);
}
}

Loading…
Cancel
Save