Browse Source

REPORT-71158 打开fvs,从远程切换到本地,设计器模板展示空白

【问题原因】
检测JTemplate类型,避免类型转换失败

【改动思路】
同上

【review建议】
release/11.0
Starryi 3 years ago
parent
commit
875098ed2a
  1. 4
      designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java
  2. 6
      designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java
  3. 4
      designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java

4
designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java

@ -333,8 +333,8 @@ public class LayoutBorderPane extends BasicPane {
JPanel rightPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel rightPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
defaultPane.add(rightPane, BorderLayout.EAST); defaultPane.add(rightPane, BorderLayout.EAST);
rightPane.add(initRightBottomPane(), BorderLayout.CENTER); rightPane.add(initRightBottomPane(), BorderLayout.CENTER);
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (!jTemplate.isJWorkBook() && ((JForm)jTemplate).isSelectRootPane()){ if (!jTemplate.isJWorkBook() && jTemplate instanceof JForm && ((JForm)jTemplate).isSelectRootPane()){
//界面上表单主体只有背景和透明度可以设置 //界面上表单主体只有背景和透明度可以设置
rightPane.add(initBodyRightTopPane(), BorderLayout.NORTH); rightPane.add(initBodyRightTopPane(), BorderLayout.NORTH);
} else { } else {

6
designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java

@ -66,8 +66,10 @@ public class LayoutStylePane extends BasicBeanPane<LayoutBorderStyle> {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
boolean isRootLayout = currentEditingTemplate != null && !currentEditingTemplate.isJWorkBook() && ((JForm)currentEditingTemplate).isSelectRootPane(); boolean isRootLayout = currentEditingTemplate != null &&
!currentEditingTemplate.isJWorkBook() &&
currentEditingTemplate instanceof JForm && ((JForm)currentEditingTemplate).isSelectRootPane();
namedTitleStylePane = createNamedTitleStylePane(isRootLayout); namedTitleStylePane = createNamedTitleStylePane(isRootLayout);
namedBodyStylePane = createNamedBodyStylePane(isRootLayout); namedBodyStylePane = createNamedBodyStylePane(isRootLayout);

4
designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java

@ -76,8 +76,8 @@ public class WidgetBoundPane extends BasicPane {
height.setEnabled(false); height.setEnabled(false);
} }
JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (jTemplate.isJWorkBook() || !((JForm)jTemplate).isSelectRootPane()) { if (jTemplate.isJWorkBook() || !((jTemplate instanceof JForm) && ((JForm)jTemplate).isSelectRootPane())) {
ratioLockedButton = new AspectRatioLockedButton(width, height); ratioLockedButton = new AspectRatioLockedButton(width, height);
ratioLockedButton.setGlobalName(i18nText("Fine-Design_Form_Coords_And_Size")); ratioLockedButton.setGlobalName(i18nText("Fine-Design_Form_Coords_And_Size"));
ratioLockedButton.setLockEnabled(false); ratioLockedButton.setLockEnabled(false);

Loading…
Cancel
Save