Browse Source

Merge pull request #2123 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '6addf43efe49b8b85ad7256299044b8a91193a66':
  删去多余的导包
  REPORT-24268 增强公式编辑器插件问题 回滚代码, 现有逻辑不支持功能
  判断还是要加上,可能在JWorkBook对象初始化之前,这边的逻辑就先开始了
  经过Hugh老哥提醒,使用注解的方式避免重复的判断
  存在空指针异常的可能性,增加一个判断语句
  REPORT-37020 参数面板,一个一个添加参数,面板长度不会自适应,撤销就会自适应显示了 1. 为添加单个参数组件和添加单个参数组件+添加查询按钮的方法都加上了设置中心Panel高度的逻辑
  REPORT-37020 参数面板,一个一个添加参数,面板长度不会自适应,撤销就会自适应显示了 1. 为添加单个参数组件和添加单个参数组件+添加查询按钮的方法都加上了设置中心Panel高度的逻辑
  REPORT-37588【frm设计界面支持缩放】多tab模版,右击tab显示提示,位置不对
  修改一下判断条件,避免以后重复写判断分支
  REPORT-37398 非中文设计器-英文下,报表分栏显示不全 主要修改: 1. bug原因是英文环境下一行放不下太多组件,所以被挤掉了,解决办法是增加判断,当系统语言是英文,就增大界面的高度,并将组件按照需求分块,分别用JPanel装起来,这样当第二个JPanel放不下就会自动换行,不会出现显示不全的问题 2. 由于将组件分块了,所以其他语言环境下,界面的高度也需要进行微调 3. 修改了一些代码规范问题
  REPORT-32317 cpt滚动条缩放问题 在更改了界面的比例后,增加更新滚动条的宽度的逻辑
research/11.0
superman 4 years ago
parent
commit
4a7b75f69c
  1. 5
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java
  3. 8
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  4. 10
      designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java

5
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -202,7 +202,8 @@ public class XCardSwitchButton extends XButton {
jPopupMenu.add(prev); jPopupMenu.add(prev);
jPopupMenu.add(next); jPopupMenu.add(next);
jPopupMenu.add(end); jPopupMenu.add(end);
GUICoreUtils.showPopupMenu(jPopupMenu, editingMouseListener.getDesigner(), e.getX(), e.getY()); FormDesigner designer = editingMouseListener.getDesigner();
GUICoreUtils.showPopupMenu(jPopupMenu, editingMouseListener.getDesigner(), designer.getOriginX(e.getX()), designer.getOriginY(e.getY()));
} }
@Override @Override
@ -251,7 +252,7 @@ public class XCardSwitchButton extends XButton {
//是否进入点击关闭按钮区域 //是否进入点击关闭按钮区域
private boolean isSelectedClose(MouseEvent e, FormDesigner designer){ private boolean isSelectedClose(MouseEvent e, FormDesigner designer){
int diff = designer.getArea().getHorScrollBar().getValue(); int diff = designer.getHorizontalScaleValue();
// mouse position // mouse position
int ex = e.getX() + diff; int ex = e.getX() + diff;

2
designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

@ -607,7 +607,7 @@ public class EditingMouseListener extends MouseInputAdapter {
if (e.getButton() == MouseEvent.BUTTON3) { if (e.getButton() == MouseEvent.BUTTON3) {
UIPopupMenu cellPopupMenu = creator.createPopupMenu(designer); UIPopupMenu cellPopupMenu = creator.createPopupMenu(designer);
if (cellPopupMenu != UIPopupMenu.EMPTY) { if (cellPopupMenu != UIPopupMenu.EMPTY) {
GUICoreUtils.showPopupMenu(cellPopupMenu, designer, e.getX(), e.getY()); GUICoreUtils.showPopupMenu(cellPopupMenu, designer, oldX, oldY);
} }
} }
creator.doLayout(); creator.doLayout();

8
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -1611,6 +1611,14 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
return (int) ((y - this.getPaintY()) / this.getScale()); return (int) ((y - this.getPaintY()) / this.getScale());
} }
public int getOriginX(int x) {
return (int) (x * this.getScale() + this.getPaintX());
}
public int getOriginY(int y) {
return (int) (y * this.getScale() + this.getPaintY());
}
public int getHorizontalScaleValue() { public int getHorizontalScaleValue() {
return (int) (this.getArea().getHorizontalValue() / this.scale); return (int) (this.getArea().getHorizontalValue() / this.scale);

10
designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java

@ -425,6 +425,9 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
if (propertyChangeListener != null) { if (propertyChangeListener != null) {
propertyChangeListener.propertyChange(); propertyChangeListener.propertyChange();
} }
if (workBook != null) {
workBook.setAutoHeightForCenterPane();
}
} }
/** /**
@ -445,6 +448,9 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
if (propertyChangeListener != null) { if (propertyChangeListener != null) {
propertyChangeListener.propertyChange(); propertyChangeListener.propertyChange();
} }
if (workBook != null) {
workBook.setAutoHeightForCenterPane();
}
} }
/** /**
@ -467,7 +473,9 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
if (propertyChangeListener != null) { if (propertyChangeListener != null) {
propertyChangeListener.propertyChange(); propertyChangeListener.propertyChange();
} }
workBook.setAutoHeightForCenterPane(); if (workBook != null) {
workBook.setAutoHeightForCenterPane();
}
} }
/** /**

Loading…
Cancel
Save