From 6033271af219eab9019ecd4063a3f9677ea23176 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Tue, 15 Sep 2020 15:35:13 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-39894=20=E4=B8=8D=E5=B0=86=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94=E5=B8=83=E5=B1=80=E5=92=8C=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E7=9A=84=E5=AD=90=E7=B1=BB=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E9=A1=B6=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/designer/creator/XCreator.java | 7 +++++++ .../fr/design/designer/creator/XWAbsoluteBodyLayout.java | 4 ++++ .../java/com/fr/design/designer/creator/XWFitLayout.java | 5 +++++ .../com/fr/design/designer/creator/XWParameterLayout.java | 6 ++++-- .../design/designer/creator/cardlayout/XWTabFitLayout.java | 4 ++++ .../main/java/com/fr/design/mainframe/TopXCreators.java | 3 +++ 6 files changed, 27 insertions(+), 2 deletions(-) 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 5eb284c7b..ec83a1f9a 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 9a7d6dc97..2c88e6252 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 06aca3c1b..3e425b4cd 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 3fc35a265..1d37024d9 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 8d5d232fa..a706674c7 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 4c5ba6527..89b261bb9 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) {