Browse Source

REPORT-3163 合作开发9.0设计器=>切换编辑状态时,校正tab按钮的选中标记

master
plough 7 years ago
parent
commit
30024e7fe1
  1. 41
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

41
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -77,7 +77,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public static final EastRegionContainerPane getInstance() { public static final EastRegionContainerPane getInstance() {
if (THIS == null) { if (THIS == null) {
THIS = new EastRegionContainerPane(); THIS = new EastRegionContainerPane();
// THIS.setLastToolPaneY(DesignerEnvManager.getEnvManager().getLastEastRegionToolPaneY());
THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastEastRegionContainerWidth()); THIS.setLastContainerWidth(DesignerEnvManager.getEnvManager().getLastEastRegionContainerWidth());
} }
return THIS; return THIS;
@ -85,13 +84,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public EastRegionContainerPane() { public EastRegionContainerPane() {
super(); super();
// setVerticalDragEnabled(false);
initPropertyItemList(); initPropertyItemList();
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available")); defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available"));
defaultAuthorityPane = getDefaultPane(Inter.getLocText("FR-Designer_Not_Support_Authority_Edit")); defaultAuthorityPane = getDefaultPane(Inter.getLocText("FR-Designer_Not_Support_Authority_Edit"));
switchMode(PropertyMode.REPORT); switchMode(PropertyMode.REPORT);
// initContentPane();
// super(leftPane, rightPane);
setContainerWidth(CONTAINER_WIDTH); setContainerWidth(CONTAINER_WIDTH);
} }
@ -230,8 +226,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public EastRegionContainerPane(JPanel leftPane, JPanel rightPane) { public EastRegionContainerPane(JPanel leftPane, JPanel rightPane) {
super(leftPane, rightPane); super(leftPane, rightPane);
// setVerticalDragEnabled(false);
// setContainerWidth(260);
} }
public void replaceUpPane(JComponent pane) { public void replaceUpPane(JComponent pane) {
@ -377,29 +371,23 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
hasEnabledTab = true; hasEnabledTab = true;
if (!propertyItem.isPoppedOut()) { if (!propertyItem.isPoppedOut()) {
propertyCard.show(rightPane, name); // 显示第一个可用tab propertyCard.show(rightPane, name); // 显示第一个可用tab
propertyItem.setTabButtonSelected();
hasAvailableTab = true; hasAvailableTab = true;
break; break;
} }
} }
} }
if (!hasAvailableTab) { if (!hasAvailableTab) {
resetPropertyIcons();
if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) { if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) {
propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE); propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE);
} else { } else {
propertyCard.show(rightPane, DEFAULT_PANE); propertyCard.show(rightPane, DEFAULT_PANE);
} }
} }
// if (this.getRightPane() instanceof DockingView) {
// ((DockingView) this.getRightPane()).refreshDockingView();
// }
} }
public void refreshDownPane() { public void refreshDownPane() {
// JComponent pane = propertyItemList.get(1).getContentPane();
// if (pane instanceof DockingView) {
// ((DockingView) pane).refreshDockingView();
// }
} }
private void refreshContainer() { private void refreshContainer() {
@ -460,7 +448,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
this.btnIconName = btnIconName; this.btnIconName = btnIconName;
initButton(); initButton();
initPropertyPanel(); initPropertyPanel();
// this.visibleModes = new ArrayList<PropertyMode>(visibleModes);
initModes(visibleModes, enableModes); initModes(visibleModes, enableModes);
} }
@ -576,11 +563,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
// private void refreshContainer() {
// propertyPanel.validate();
// propertyPanel.repaint();
// propertyPanel.revalidate();
// }
private String getBtnIconUrl() { private String getBtnIconUrl() {
return ICON_BASE_DIR + btnIconName + iconSuffix; 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() { private void initButton() {
button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) { button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) {
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
@ -614,11 +604,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} else { } else {
popupFixedPane(); popupFixedPane();
} }
resetPropertyIcons(); setTabButtonSelected();
iconSuffix = ICON_SUFFIX_SELECTED;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
} }
}); });
} }
@ -655,7 +641,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 弹出对话框 // 弹出对话框
public void popupDialog() { public void popupDialog() {
// setIsPoppedOut(true);
if (isPoppedOut) { if (isPoppedOut) {
return; return;
} }
@ -667,15 +652,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupDialog.adjustLocation(); popupDialog.adjustLocation();
popupDialog.setVisible(true); popupDialog.setVisible(true);
} }
// initContentPane();
// refreshContainer();
removeItem(this); removeItem(this);
} }
public void popToFrame() { public void popToFrame() {
if (isPoppedOut) { if (isPoppedOut) {
isPoppedOut = false; isPoppedOut = false;
// popupDialog.dispose();
popupDialog.setVisible(false); popupDialog.setVisible(false);
initContentPane(); initContentPane();
onResize(); onResize();
@ -892,7 +874,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
container.add(popupToolPane, BorderLayout.NORTH); container.add(popupToolPane, BorderLayout.NORTH);
container.add(contentPane, BorderLayout.CENTER); container.add(contentPane, BorderLayout.CENTER);
setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT); setSize(CONTENT_WIDTH, POPUP_DEFAULT_HEIGHT);
// validate();
adjustLocation(); adjustLocation();
initListener(); initListener();

Loading…
Cancel
Save