Browse Source

REPORT-3163 合作开发9.0设计器=>弹出框不可用时,显示提示

master
plough 7 years ago
parent
commit
7e62dea1cf
  1. 16
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

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

@ -13,6 +13,7 @@ import com.fr.general.FRFont;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.third.fr.pdf.kernel.utils.CompareTool; import com.fr.third.fr.pdf.kernel.utils.CompareTool;
import com.sap.conn.jco.JCo;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
@ -493,6 +494,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void updateStatus() { public void updateStatus() {
setEnabled(enableModes.contains(currentMode)); setEnabled(enableModes.contains(currentMode));
setVisible(visibleModes.contains(currentMode)); setVisible(visibleModes.contains(currentMode));
if (!isEnabled() && isPoppedOut()) {
popupDialog.showDefaultPane();
}
} }
public boolean isVisible() { public boolean isVisible() {
@ -894,6 +898,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private JPanel contentWrapper; private JPanel contentWrapper;
private JComponent contentPane; private JComponent contentPane;
private JPanel defaultPane; // 无可用配置项
private PropertyItem propertyItem; private PropertyItem propertyItem;
public PopupDialog(PropertyItem propertyItem) { public PopupDialog(PropertyItem propertyItem) {
super(DesignerContext.getDesignerFrame()); super(DesignerContext.getDesignerFrame());
@ -924,6 +929,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
initListener(); initListener();
this.setVisible(true); this.setVisible(true);
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available"));
}
public void showDefaultPane() {
replaceContentPane(defaultPane);
} }
public void adjustLocation() { public void adjustLocation() {
@ -935,7 +946,10 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public void replaceContentPane(PropertyItem propertyItem) { public void replaceContentPane(PropertyItem propertyItem) {
this.propertyItem = propertyItem; this.propertyItem = propertyItem;
JComponent contentPane = propertyItem.getContentPane(); replaceContentPane(propertyItem.getContentPane());
}
public void replaceContentPane(JComponent contentPane) {
contentWrapper.remove(this.contentPane); contentWrapper.remove(this.contentPane);
contentWrapper.add(this.contentPane = contentPane, BorderLayout.CENTER); contentWrapper.add(this.contentPane = contentPane, BorderLayout.CENTER);
refreshContainer(); refreshContainer();

Loading…
Cancel
Save