From 30024e7fe1b3e6d5029b67091d800f1ca2578e2e Mon Sep 17 00:00:00 2001 From: plough Date: Wed, 16 Aug 2017 16:34:16 +0800 Subject: [PATCH] =?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();