From ef5e7fe3e61ac5e568486913e79f1f95a0425011 Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 16 Aug 2017 15:56:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E5=AD=90=E5=AF=B9=E8=AF=9D=E6=A1=86=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=82=AC=E6=B5=AE=E5=BC=B9=E7=AA=97=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/gui/controlpane/UIControlPane.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java index 5908f06e1a..74c64de329 100644 --- a/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java +++ b/designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java @@ -301,6 +301,12 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH return; } } + // 如果有可见模态对话框,则不隐藏 + for (Window window : DesignerContext.getDesignerFrame().getOwnedWindows()) { + if (window instanceof JDialog && window.isVisible() && ((JDialog)window).isModal()) { + return; + } + } saveSettings(); setVisible(false); } From 30024e7fe1b3e6d5029b67091d800f1ca2578e2e Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 16 Aug 2017 16:34:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-3163=20=E5=90=88=E4=BD=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=919.0=E8=AE=BE=E8=AE=A1=E5=99=A8=3D>=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E7=8A=B6=E6=80=81=E6=97=B6=EF=BC=8C=E6=A0=A1?= =?UTF-8?q?=E6=AD=A3tab=E6=8C=89=E9=92=AE=E7=9A=84=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/EastRegionContainerPane.java | 41 +++++-------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java index b5bf0fc1a8..ab2dff8b2b 100644 --- a/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java +++ b/designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java @@ -77,7 +77,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public static final EastRegionContainerPane getInstance() { if (THIS == null) { THIS = new EastRegionContainerPane(); -// THIS.setLastToolPaneY(DesignerEnvManager.getEnvManager().getLastEastRegionToolPaneY()); THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastEastRegionContainerWidth()); } return THIS; @@ -85,13 +84,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public EastRegionContainerPane() { super(); -// setVerticalDragEnabled(false); initPropertyItemList(); defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available")); defaultAuthorityPane = getDefaultPane(Inter.getLocText("FR-Designer_Not_Support_Authority_Edit")); switchMode(PropertyMode.REPORT); -// initContentPane(); -// super(leftPane, rightPane); setContainerWidth(CONTAINER_WIDTH); } @@ -230,8 +226,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { public EastRegionContainerPane(JPanel leftPane, JPanel rightPane) { super(leftPane, rightPane); -// setVerticalDragEnabled(false); -// setContainerWidth(260); } public void replaceUpPane(JComponent pane) { @@ -377,29 +371,23 @@ public class EastRegionContainerPane extends UIEastResizableContainer { hasEnabledTab = true; if (!propertyItem.isPoppedOut()) { propertyCard.show(rightPane, name); // 显示第一个可用tab + propertyItem.setTabButtonSelected(); hasAvailableTab = true; break; } } } if (!hasAvailableTab) { + resetPropertyIcons(); if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) { propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE); } else { propertyCard.show(rightPane, DEFAULT_PANE); } } - -// if (this.getRightPane() instanceof DockingView) { -// ((DockingView) this.getRightPane()).refreshDockingView(); -// } } public void refreshDownPane() { -// JComponent pane = propertyItemList.get(1).getContentPane(); -// if (pane instanceof DockingView) { -// ((DockingView) pane).refreshDockingView(); -// } } private void refreshContainer() { @@ -460,7 +448,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { this.btnIconName = btnIconName; initButton(); initPropertyPanel(); -// this.visibleModes = new ArrayList(visibleModes); initModes(visibleModes, enableModes); } @@ -576,11 +563,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } } -// private void refreshContainer() { -// propertyPanel.validate(); -// propertyPanel.repaint(); -// propertyPanel.revalidate(); -// } private String getBtnIconUrl() { return ICON_BASE_DIR + btnIconName + iconSuffix; } @@ -594,6 +576,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } } + public void setTabButtonSelected() { + resetPropertyIcons(); + iconSuffix = ICON_SUFFIX_SELECTED; + button.setIcon(BaseUtils.readIcon(getBtnIconUrl())); + button.setBackground(selectedBtnBackground); + button.setOpaque(true); + } + private void initButton() { button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) { public Dimension getPreferredSize() { @@ -614,11 +604,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { } else { popupFixedPane(); } - resetPropertyIcons(); - iconSuffix = ICON_SUFFIX_SELECTED; - button.setIcon(BaseUtils.readIcon(getBtnIconUrl())); - button.setBackground(selectedBtnBackground); - button.setOpaque(true); + setTabButtonSelected(); } }); } @@ -655,7 +641,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { // 弹出对话框 public void popupDialog() { -// setIsPoppedOut(true); if (isPoppedOut) { return; } @@ -667,15 +652,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer { popupDialog.adjustLocation(); popupDialog.setVisible(true); } -// initContentPane(); -// refreshContainer(); removeItem(this); } public void popToFrame() { if (isPoppedOut) { isPoppedOut = false; -// popupDialog.dispose(); popupDialog.setVisible(false); initContentPane(); onResize(); @@ -892,7 +874,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer { container.add(popupToolPane, BorderLayout.NORTH); container.add(contentPane, BorderLayout.CENTER); setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT); -// validate(); adjustLocation(); initListener();