Browse Source

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

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

【改动思路】
同上

【review建议】
newui
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();
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 {

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.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);

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);
}
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);

Loading…
Cancel
Save