|
|
|
@ -12,6 +12,8 @@ import com.fr.design.gui.ibutton.UIButtonUI;
|
|
|
|
|
import com.fr.design.gui.icontainer.UIEastResizableContainer; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.layout.VerticalFlowLayout; |
|
|
|
|
import com.fr.design.menu.SnapChatUtil; |
|
|
|
|
import com.fr.design.notification.SnapChat; |
|
|
|
|
import com.fr.design.ui.util.UIUtil; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUIPaintUtils; |
|
|
|
@ -171,7 +173,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
} |
|
|
|
|
updateAllPropertyPane(); |
|
|
|
|
} |
|
|
|
|
}); } |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, filter); |
|
|
|
|
PluginListenerRegistration.getInstance().listen( |
|
|
|
|
PluginEventType.BeforeStop, |
|
|
|
@ -221,11 +224,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
String key = provider.key(); |
|
|
|
|
PropertyItemBean itemBean = provider.getItem(); |
|
|
|
|
PropertyItem propertyItem = new PropertyItem(itemBean.getName(), |
|
|
|
|
itemBean.getTitle(), |
|
|
|
|
itemBean.getBtnIconName(), |
|
|
|
|
itemBean.getBtnIconBaseDir(), |
|
|
|
|
itemBean.getVisibleModes(), |
|
|
|
|
itemBean.getEnableModes()); |
|
|
|
|
itemBean.getTitle(), |
|
|
|
|
itemBean.getBtnIconName(), |
|
|
|
|
itemBean.getBtnIconBaseDir(), |
|
|
|
|
itemBean.getVisibleModes(), |
|
|
|
|
itemBean.getEnableModes(), |
|
|
|
|
itemBean.getSnapChat(), |
|
|
|
|
itemBean.getPromptWindow()); |
|
|
|
|
UIButton button = propertyItem.getButton(); |
|
|
|
|
List<ActionListener> buttonListeners = itemBean.getButtonListeners(); |
|
|
|
|
if (buttonListeners != null) { |
|
|
|
@ -324,6 +329,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
cellElement.popupDialog.showDefaultPane(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 禁用单元格元素tab
|
|
|
|
|
private void enableCellElementPane(PropertyItem cellElement) { |
|
|
|
|
cellElement.setEnabled(true); |
|
|
|
@ -381,7 +387,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 可通过此方法,判断当前的编辑模式 |
|
|
|
|
* */ |
|
|
|
|
*/ |
|
|
|
|
public PropertyMode getCurrentMode() { |
|
|
|
|
return currentMode; |
|
|
|
|
} |
|
|
|
@ -527,7 +533,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
propertyItemMap.get(KEY_WIDGET_SETTINGS).replaceHeaderPane(paraPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void main(String[] args){ |
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
JFrame jf = new JFrame("test"); |
|
|
|
|
// jf = new JFrame("test");
|
|
|
|
|
|
|
|
|
@ -549,7 +555,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
// leftPane.add(b2);
|
|
|
|
|
// leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS));
|
|
|
|
|
|
|
|
|
|
JPanel content = (JPanel)jf.getContentPane(); |
|
|
|
|
JPanel content = (JPanel) jf.getContentPane(); |
|
|
|
|
// content.setLayout(null);
|
|
|
|
|
content.add(cc, BorderLayout.CENTER); |
|
|
|
|
content.add(new EastRegionContainerPane(), BorderLayout.EAST); |
|
|
|
@ -657,6 +663,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class PropertyItem { |
|
|
|
|
private SnapChat snapChat; |
|
|
|
|
private UIButton button; |
|
|
|
|
private String name; // 用于 card 切换
|
|
|
|
|
private String title; // 用于显示
|
|
|
|
@ -667,6 +674,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
private FixedPopupPane popupPane; // 左侧固定弹出框
|
|
|
|
|
private PopupToolPane popupToolPane; // 弹出工具条
|
|
|
|
|
private PopupDialog popupDialog; // 弹出框
|
|
|
|
|
private PromptWindow promptWindow; //提示窗
|
|
|
|
|
private boolean isPoppedOut = false; // 是否弹出
|
|
|
|
|
private boolean isVisible = true; // 是否可见
|
|
|
|
|
private boolean replace = false; // 是否被替代
|
|
|
|
@ -687,14 +695,16 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public PropertyItem(String name, String title, String btnIconName, PropertyMode[] visibleModes, PropertyMode[] enableModes) { |
|
|
|
|
this(name, title, btnIconName, ICON_BASE_DIR, visibleModes, enableModes); |
|
|
|
|
this(name, title, btnIconName, ICON_BASE_DIR, visibleModes, enableModes, null, null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public PropertyItem(String name, String title, String btnIconName, String iconBaseDir, PropertyMode[] visibleModes, PropertyMode[] enableModes) { |
|
|
|
|
public PropertyItem(String name, String title, String btnIconName, String iconBaseDir, PropertyMode[] visibleModes, PropertyMode[] enableModes, SnapChat snapChat, PromptWindow promptWindow) { |
|
|
|
|
this.name = name; |
|
|
|
|
this.title = title; |
|
|
|
|
this.btnIconName = btnIconName; |
|
|
|
|
this.iconBaseDir = iconBaseDir; |
|
|
|
|
this.snapChat = snapChat; |
|
|
|
|
this.promptWindow = promptWindow; |
|
|
|
|
initButton(); |
|
|
|
|
initPropertyPanel(); |
|
|
|
|
initModes(visibleModes, enableModes); |
|
|
|
@ -835,7 +845,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
if (isRightPaneVisible()) { |
|
|
|
|
hideCurrentPopupPane(); |
|
|
|
|
replaceContentPane(contentPane); |
|
|
|
|
} else if(popupPane != null && popupPane.isVisible()) { |
|
|
|
|
} else if (popupPane != null && popupPane.isVisible()) { |
|
|
|
|
popupPane.replaceContentPane(contentArea); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -872,9 +882,13 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
public Dimension getPreferredSize() { |
|
|
|
|
return new Dimension(TAB_BUTTON_WIDTH, TAB_BUTTON_HEIGHT); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void paintComponent(Graphics g) { |
|
|
|
|
super.paintComponent(g); |
|
|
|
|
if (snapChat != null && !snapChat.hasRead()) { |
|
|
|
|
SnapChatUtil.paintPropertyItemPoint(g, getBounds()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
button.set4LargeToolbarButton(); |
|
|
|
@ -902,6 +916,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
popupFixedPane(); |
|
|
|
|
} |
|
|
|
|
setTabButtonSelected(); |
|
|
|
|
if (snapChat != null && !snapChat.hasRead()) { |
|
|
|
|
snapChat.markRead(); |
|
|
|
|
if (promptWindow != null) { |
|
|
|
|
promptWindow.showWindow(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
button.setToolTipText(title); |
|
|
|
@ -1015,8 +1035,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @Description:刷新currentPopupPane面板位置,当设计器缩放时会调用这个函数 |
|
|
|
|
* @param |
|
|
|
|
* @Description:刷新currentPopupPane面板位置,当设计器缩放时会调用这个函数 |
|
|
|
|
* @return: |
|
|
|
|
* @Author: Henry.Wang |
|
|
|
|
* @date: 2020/7/30 11:39 |
|
|
|
@ -1031,8 +1051,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @Description:清空currentPopupPane数据,当切换模板时会调用这个函数 |
|
|
|
|
* @param |
|
|
|
|
* @Description:清空currentPopupPane数据,当切换模板时会调用这个函数 |
|
|
|
|
* @return: |
|
|
|
|
* @Author: Henry.Wang |
|
|
|
|
* @date: 2020/7/30 11:42 |
|
|
|
@ -1071,12 +1091,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
} |
|
|
|
|
repaint(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
|
if (e.getX() >= ARROW_RANGE_START) { |
|
|
|
|
onPop(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mouseReleased(MouseEvent e) { |
|
|
|
|
mouseDownCompCoords = null; |
|
|
|
@ -1084,6 +1106,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
contentPane.setBackground(originColor); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
|
if (e.getX() < ARROW_RANGE_START) { |
|
|
|
@ -1105,6 +1128,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
} |
|
|
|
|
repaint(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mouseDragged(MouseEvent e) { |
|
|
|
|
if (isMovable && mouseDownCompCoords != null) { |
|
|
|
@ -1217,6 +1241,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
private Container contentPane; |
|
|
|
|
private JPanel defaultPane; // 无可用配置项
|
|
|
|
|
private PropertyItem propertyItem; |
|
|
|
|
|
|
|
|
|
public PopupDialog(PropertyItem propertyItem) { |
|
|
|
|
super(DesignerContext.getDesignerFrame()); |
|
|
|
|
container = getContentPane(); |
|
|
|
@ -1319,6 +1344,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
|
|
|
|
|
mouseDownCompCoords = e.getLocationOnScreen(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void mouseReleased(MouseEvent e) { |
|
|
|
|
mouseDownCompCoords = null; |
|
|
|
|