Browse Source

Pull request #1947: REPORT-30708 单元格配置框不跟随右侧配置按钮

Merge in DESIGN/design from ~HENRY.WANG/design:release/10.0 to release/10.0

* commit '90e9cac27a7698e1fb7edeb54cd454fa9bb687b1':
  REPORT-30708 单元格配置框不跟随右侧配置按钮 修改代码
  REPORT-30708 单元格配置框不跟随右侧配置按钮 修改代码
  REPORT-30708 单元格配置框不跟随右侧配置按钮 格式调整2
  REPORT-30708 单元格配置框不跟随右侧配置按钮 格式调整
  REPORT-30708 单元格配置框不跟随右侧配置按钮
feature/big-screen
Henry.Wang 4 years ago
parent
commit
38ebac0f18
  1. 9
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  2. 31
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

9
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -328,6 +328,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
if (DesignModeContext.isAuthorityEditing()) {
doResize();
}
//刷新FixedPopupPane的位置
EastRegionContainerPane.getInstance().freshCurrentPopupPane();
}
});
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
@ -972,6 +974,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
* @param jt 添加的模板.
*/
public void addAndActivateJTemplate(JTemplate<?, ?> jt) {
//切换文件后清空FixedPopupPane面板
EastRegionContainerPane.getInstance().clearCurrentPopupPane();
//释放模板对象
ActionFactory.editorRelease();
if (jt == null || jt.getEditingFILE() == null) {
@ -991,6 +995,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
* @param jt 模板
*/
public void activateJTemplate(JTemplate<?, ?> jt) {
//切换文件后清空FixedPopupPane面板
EastRegionContainerPane.getInstance().clearCurrentPopupPane();
//释放模板对象
ActionFactory.editorRelease();
if (jt == null || jt.getEditingFILE() == null) {
@ -1101,7 +1107,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
* @date 2014-10-14-下午6:31:05
*/
private void openFile(FILE tplFile) {
//切换文件后清空FixedPopupPane面板
EastRegionContainerPane.getInstance().clearCurrentPopupPane();
if (tplFile != null) {
int index = HistoryTemplateListCache.getInstance().contains(tplFile);
if (index != -1) {

31
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -67,6 +67,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private JPanel leftPane;
private JPanel rightPane;
private FixedPopupPane currentPopupPane;
private UIButton currentButton;
private static final int CONTAINER_WIDTH = containerWidth();
private static final int TAB_WIDTH = 38;
private static final int TAB_BUTTON_WIDTH = 32;
@ -929,6 +930,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} else {
hideCurrentPopupPane();
currentPopupPane = popupPane;
currentButton = button;
GUICoreUtils.showPopupMenu(popupPane, button, -popupPane.getPreferredSize().width, 0);
}
}
@ -1009,6 +1011,35 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
/**
* @Description:刷新currentPopupPane面板位置当设计器缩放时会调用这个函数
* @param
* @return:
* @Author: Henry.Wang
* @date: 2020/7/30 11:39
*/
public void freshCurrentPopupPane() {
if(currentPopupPane.isVisible()){
hideCurrentPopupPane();
if (currentPopupPane != null && currentButton != null && !isRightPaneVisible()) {
GUICoreUtils.showPopupMenu(currentPopupPane, currentButton, -currentPopupPane.getPreferredSize().width, 0);
}
}
}
/**
* @Description:清空currentPopupPane数据当切换模板时会调用这个函数
* @param
* @return:
* @Author: Henry.Wang
* @date: 2020/7/30 11:42
*/
public void clearCurrentPopupPane() {
hideCurrentPopupPane();
currentPopupPane = null;
currentButton = null;
}
// 弹出属性面板的工具条
private class PopupToolPane extends JPanel {
private String title;

Loading…
Cancel
Save