diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java index cf460f9ceb..7a00075d61 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java +++ b/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(); defaultPane.add(rightPane, BorderLayout.EAST); rightPane.add(initRightBottomPane(), BorderLayout.CENTER); - JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (!jTemplate.isJWorkBook() && ((JForm)jTemplate).isSelectRootPane()){ + JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (!jTemplate.isJWorkBook() && jTemplate instanceof JForm && ((JForm)jTemplate).isSelectRootPane()){ //界面上表单主体只有背景和透明度可以设置 rightPane.add(initBodyRightTopPane(), BorderLayout.NORTH); } else { diff --git a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java b/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java index 4a034e9be5..5cbddadb4d 100644 --- a/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java +++ b/designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java @@ -66,8 +66,10 @@ public class LayoutStylePane extends BasicBeanPane { this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - boolean isRootLayout = currentEditingTemplate != null && !currentEditingTemplate.isJWorkBook() && ((JForm)currentEditingTemplate).isSelectRootPane(); + JTemplate currentEditingTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + boolean isRootLayout = currentEditingTemplate != null && + !currentEditingTemplate.isJWorkBook() && + currentEditingTemplate instanceof JForm && ((JForm)currentEditingTemplate).isSelectRootPane(); namedTitleStylePane = createNamedTitleStylePane(isRootLayout); namedBodyStylePane = createNamedBodyStylePane(isRootLayout); diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java index 85265fa6ec..1c77bdaf1e 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java +++ b/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); } - JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); - if (jTemplate.isJWorkBook() || !((JForm)jTemplate).isSelectRootPane()) { + JTemplate jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); + if (jTemplate.isJWorkBook() || !((jTemplate instanceof JForm) && ((JForm)jTemplate).isSelectRootPane())) { ratioLockedButton = new AspectRatioLockedButton(width, height); ratioLockedButton.setGlobalName(i18nText("Fine-Design_Form_Coords_And_Size")); ratioLockedButton.setLockEnabled(false);