diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index 5eb284c7ba..ec83a1f9a5 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -805,4 +805,11 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo return false; } + /** + * 是否支持置顶显示 + */ + public boolean isTopable() { + return true; + } + } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java index 9a7d6dc975..2c88e62525 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java @@ -131,4 +131,8 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout { return false; } + @Override + public boolean isTopable() { + return false; + } } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java index 06aca3c1b3..3e425b4cd9 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java @@ -1222,6 +1222,11 @@ public class XWFitLayout extends XLayoutContainer { return false; } + @Override + public boolean isTopable() { + return false; + } + public boolean switch2FitBodyLayout(XCreator creator) { try { XWFitLayout xfl = (XWFitLayout) creator.getBackupParent(); diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java index 3fc35a265c..1d37024d98 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java @@ -251,6 +251,8 @@ public class XWParameterLayout extends XWAbsoluteLayout { return false; } - - + @Override + public boolean isTopable() { + return false; + } } diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index 8d5d232fa6..a706674c7b 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -639,4 +639,8 @@ public class XWTabFitLayout extends XWFitLayout { checkVisible(); } + @Override + public boolean isTopable() { + return true; + } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/TopXCreators.java b/designer-form/src/main/java/com/fr/design/mainframe/TopXCreators.java index 4c5ba6527e..89b261bb9a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/TopXCreators.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/TopXCreators.java @@ -58,6 +58,9 @@ public class TopXCreators extends JComponent { SelectionModel selectionModel = designer.getSelectionModel(); XCreator[] xCreators = selectionModel.getSelection().getSelectedCreators(); for (XCreator creator : xCreators) { + if (!creator.isTopable()) { + continue; + } XWCardMainBorderLayout topXMainBorderLayout = XCreatorUtils.getTopXMainBorderLayout(creator); add(new TopXCreator(designer, creator)); if (topXMainBorderLayout != null) {