|
|
@ -301,6 +301,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void addParameterPane(JComponent paraPane) { |
|
|
|
public void addParameterPane(JComponent paraPane) { |
|
|
|
|
|
|
|
// System.out.println("add para");
|
|
|
|
|
|
|
|
propertyItemMap.get(KEY_WIDGET_SETTINGS).replaceHeaderPane(paraPane); |
|
|
|
// propertyItemMap.get(KEY_HYPERLINK).replaceContentPane(paraPane);
|
|
|
|
// propertyItemMap.get(KEY_HYPERLINK).replaceContentPane(paraPane);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -340,7 +342,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void removeParameterPane() { |
|
|
|
public void removeParameterPane() { |
|
|
|
|
|
|
|
propertyItemMap.get(KEY_WIDGET_SETTINGS).removeHeaderPane(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -396,6 +398,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
private String title; // 用于显示
|
|
|
|
private String title; // 用于显示
|
|
|
|
private JComponent propertyPanel; |
|
|
|
private JComponent propertyPanel; |
|
|
|
private JComponent contentPane; |
|
|
|
private JComponent contentPane; |
|
|
|
|
|
|
|
private JComponent headerPane; // 在contentPane 上方,可以用于显示参数面板
|
|
|
|
|
|
|
|
private Container contentArea; // 包含 headerPane 和 contentPane
|
|
|
|
private FixedPopupPane popupPane; // 左侧固定弹出框
|
|
|
|
private FixedPopupPane popupPane; // 左侧固定弹出框
|
|
|
|
private PopupToolPane popupToolPane; // 弹出工具条
|
|
|
|
private PopupToolPane popupToolPane; // 弹出工具条
|
|
|
|
private PopupDialog popupDialog; // 弹出框
|
|
|
|
private PopupDialog popupDialog; // 弹出框
|
|
|
@ -404,6 +408,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
private boolean isEnabled = true; // 是否可用
|
|
|
|
private boolean isEnabled = true; // 是否可用
|
|
|
|
private Set<PropertyMode> visibleModes; |
|
|
|
private Set<PropertyMode> visibleModes; |
|
|
|
private Set<PropertyMode> enableModes; |
|
|
|
private Set<PropertyMode> enableModes; |
|
|
|
|
|
|
|
private static final int MAX_PARA_HEIGHT = 240; |
|
|
|
|
|
|
|
|
|
|
|
public PropertyItem(String name, String title, String btnUrl, PropertyMode[] visibleModes, PropertyMode[] enableModes) { |
|
|
|
public PropertyItem(String name, String title, String btnUrl, PropertyMode[] visibleModes, PropertyMode[] enableModes) { |
|
|
|
this.name = name; |
|
|
|
this.name = name; |
|
|
@ -454,9 +459,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
propertyPanel.setBackground(Color.pink); |
|
|
|
propertyPanel.setBackground(Color.pink); |
|
|
|
contentPane = generateContentPane(); |
|
|
|
contentPane = generateContentPane(); |
|
|
|
popupToolPane = new PopupToolPane(this, PopupToolPane.DOWN_BUTTON); |
|
|
|
popupToolPane = new PopupToolPane(this, PopupToolPane.DOWN_BUTTON); |
|
|
|
|
|
|
|
headerPane = new JPanel(); |
|
|
|
|
|
|
|
contentArea = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
contentArea.add(headerPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
contentArea.add(contentPane, BorderLayout.CENTER); |
|
|
|
propertyPanel.setLayout(new BorderLayout()); |
|
|
|
propertyPanel.setLayout(new BorderLayout()); |
|
|
|
propertyPanel.add(popupToolPane, BorderLayout.NORTH); |
|
|
|
propertyPanel.add(popupToolPane, BorderLayout.NORTH); |
|
|
|
propertyPanel.add(contentPane, BorderLayout.CENTER); |
|
|
|
propertyPanel.add(contentArea, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isPoppedOut() { |
|
|
|
public boolean isPoppedOut() { |
|
|
@ -477,8 +486,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void replaceContentPane(JComponent pane) { |
|
|
|
public void replaceContentPane(JComponent pane) { |
|
|
|
propertyPanel.remove(this.contentPane); |
|
|
|
contentArea.remove(this.contentPane); |
|
|
|
propertyPanel.add(this.contentPane = pane); |
|
|
|
contentArea.add(this.contentPane = pane); |
|
|
|
if (popupDialog != null && isPoppedOut) { |
|
|
|
if (popupDialog != null && isPoppedOut) { |
|
|
|
popupDialog.replaceContentPane(this); |
|
|
|
popupDialog.replaceContentPane(this); |
|
|
|
} |
|
|
|
} |
|
|
@ -493,6 +502,25 @@ public class EastRegionContainerPane extends UIEastResizableContainer { |
|
|
|
return contentPane; |
|
|
|
return contentPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void replaceHeaderPane(JComponent pane) { |
|
|
|
|
|
|
|
contentArea.remove(headerPane); |
|
|
|
|
|
|
|
int height = Math.min(pane.getPreferredSize().height, MAX_PARA_HEIGHT); |
|
|
|
|
|
|
|
pane.setPreferredSize(new Dimension(pane.getPreferredSize().width, height)); |
|
|
|
|
|
|
|
headerPane = pane; |
|
|
|
|
|
|
|
contentArea.add(headerPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
refreshContainer(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void removeHeaderPane() { |
|
|
|
|
|
|
|
contentArea.remove(headerPane); |
|
|
|
|
|
|
|
refreshContainer(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public JComponent getHeaderPane() { |
|
|
|
|
|
|
|
return headerPane; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void onResize() { |
|
|
|
public void onResize() { |
|
|
|
if (isRightPaneVisible()) { |
|
|
|
if (isRightPaneVisible()) { |
|
|
|
hideCurrentPopupPane(); |
|
|
|
hideCurrentPopupPane(); |
|
|
|