|
|
@ -48,7 +48,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
private static final String KEY_WIDGET_LIB = "widgetLib"; |
|
|
|
private static final String KEY_WIDGET_LIB = "widgetLib"; |
|
|
|
private static final String KEY_AUTHORITY_EDITION = "authorityEdition"; |
|
|
|
private static final String KEY_AUTHORITY_EDITION = "authorityEdition"; |
|
|
|
private static final String KEY_CONFIGURED_ROLES = "editedRoles"; |
|
|
|
private static final String KEY_CONFIGURED_ROLES = "editedRoles"; |
|
|
|
private static final String DEFAULT_PANE = "defaultPane"; // "无可用配置项"面板
|
|
|
|
private static final String DEFAULT_PANE = "defaultPane"; |
|
|
|
|
|
|
|
private static final String DEFAULT_AUTHORITY_PANE = "defaultAuthorityPane"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel defaultPane; // "无可用配置项"面板
|
|
|
|
|
|
|
|
private JPanel defaultAuthorityPane; // "该元素不支持权限编辑"
|
|
|
|
|
|
|
|
|
|
|
|
public enum PropertyMode { |
|
|
|
public enum PropertyMode { |
|
|
|
REPORT, // 报表
|
|
|
|
REPORT, // 报表
|
|
|
@ -83,6 +87,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
super(); |
|
|
|
super(); |
|
|
|
// setVerticalDragEnabled(false);
|
|
|
|
// setVerticalDragEnabled(false);
|
|
|
|
initPropertyItemList(); |
|
|
|
initPropertyItemList(); |
|
|
|
|
|
|
|
defaultPane = getDefaultPane(Inter.getLocText("FR-Designer_No_Settings_Available")); |
|
|
|
|
|
|
|
defaultAuthorityPane = getDefaultPane(Inter.getLocText("FR-Designer_Not_Support_Authority_Edit")); |
|
|
|
switchMode(PropertyMode.REPORT); |
|
|
|
switchMode(PropertyMode.REPORT); |
|
|
|
// initContentPane();
|
|
|
|
// initContentPane();
|
|
|
|
// super(leftPane, rightPane);
|
|
|
|
// super(leftPane, rightPane);
|
|
|
@ -140,9 +146,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// "无可用配置项"面板
|
|
|
|
// "无可用配置项"面板
|
|
|
|
private JPanel getDefaultPane() { |
|
|
|
private JPanel getDefaultPane(String prompt) { |
|
|
|
JPanel defaultPane = new JPanel(); |
|
|
|
JPanel defaultPane = new JPanel(); |
|
|
|
UILabel label = new UILabel(Inter.getLocText("FR-Designer_No_Settings_Available")); |
|
|
|
UILabel label = new UILabel(prompt); |
|
|
|
label.setHorizontalAlignment(SwingConstants.CENTER); |
|
|
|
label.setHorizontalAlignment(SwingConstants.CENTER); |
|
|
|
defaultPane.setLayout(new BorderLayout()); |
|
|
|
defaultPane.setLayout(new BorderLayout()); |
|
|
|
defaultPane.add(label, BorderLayout.CENTER); |
|
|
|
defaultPane.add(label, BorderLayout.CENTER); |
|
|
@ -166,7 +172,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
} |
|
|
|
} |
|
|
|
rightPane.add(item.getName(), item.getPropertyPanel()); |
|
|
|
rightPane.add(item.getName(), item.getPropertyPanel()); |
|
|
|
} |
|
|
|
} |
|
|
|
rightPane.add(DEFAULT_PANE, getDefaultPane()); |
|
|
|
rightPane.add(DEFAULT_PANE, defaultPane); |
|
|
|
|
|
|
|
rightPane.add(DEFAULT_AUTHORITY_PANE, defaultAuthorityPane); |
|
|
|
|
|
|
|
|
|
|
|
replaceRightPane(rightPane); |
|
|
|
replaceRightPane(rightPane); |
|
|
|
refreshRightPane(); |
|
|
|
refreshRightPane(); |
|
|
@ -363,17 +370,25 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void refreshRightPane() { |
|
|
|
public void refreshRightPane() { |
|
|
|
boolean hasAvailableTab = false; |
|
|
|
boolean hasAvailableTab = false; |
|
|
|
|
|
|
|
boolean hasEnabledTab = false; |
|
|
|
for (String name : propertyItemMap.keySet()) { |
|
|
|
for (String name : propertyItemMap.keySet()) { |
|
|
|
PropertyItem propertyItem = propertyItemMap.get(name); |
|
|
|
PropertyItem propertyItem = propertyItemMap.get(name); |
|
|
|
if (propertyItem.isVisible() && !propertyItem.isPoppedOut() && propertyItem.isEnabled()) { |
|
|
|
if (propertyItem.isVisible() && propertyItem.isEnabled()) { |
|
|
|
|
|
|
|
hasEnabledTab = true; |
|
|
|
|
|
|
|
if (!propertyItem.isPoppedOut()) { |
|
|
|
propertyCard.show(rightPane, name); // 显示第一个可用tab
|
|
|
|
propertyCard.show(rightPane, name); // 显示第一个可用tab
|
|
|
|
hasAvailableTab = true; |
|
|
|
hasAvailableTab = true; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (!hasAvailableTab) { |
|
|
|
if (!hasAvailableTab) { |
|
|
|
|
|
|
|
if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) { |
|
|
|
|
|
|
|
propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE); |
|
|
|
|
|
|
|
} else { |
|
|
|
propertyCard.show(rightPane, DEFAULT_PANE); |
|
|
|
propertyCard.show(rightPane, DEFAULT_PANE); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// if (this.getRightPane() instanceof DockingView) {
|
|
|
|
// if (this.getRightPane() instanceof DockingView) {
|
|
|
|
// ((DockingView) this.getRightPane()).refreshDockingView();
|
|
|
|
// ((DockingView) this.getRightPane()).refreshDockingView();
|
|
|
|