Browse Source

Merge pull request #1171 in DESIGN/design from ~LUCIAN.CHEN/design:feature/10.0 to feature/10.0

* commit '733a6f28257c86e696699057c6c1bedd12fcd0d0':
  无jira任务,sonar问题修复
  无jira任务,sonar问题修复
research/11.0
Lucian.Chen 5 years ago
parent
commit
f073a8a936
  1. 3
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardAddButton.java
  2. 4
      designer-form/src/main/java/com/fr/design/form/layout/FRTitleLayout.java
  3. 2
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

3
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardAddButton.java

@ -92,6 +92,9 @@ public class XCardAddButton extends XButton {
if(cardLayout == null && tagLayout ==null ){ if(cardLayout == null && tagLayout ==null ){
initRelateLayout(); initRelateLayout();
} }
if (cardLayout == null) {
throw new IllegalArgumentException("cardLayout can not be null");
}
int index = cardLayout.toData().getWidgetCount(); int index = cardLayout.toData().getWidgetCount();
//添加新的tab,并将原来的设为未选中状态 //添加新的tab,并将原来的设为未选中状态

4
designer-form/src/main/java/com/fr/design/form/layout/FRTitleLayout.java

@ -126,15 +126,17 @@ public class FRTitleLayout implements FRLayoutManager, LayoutManager{
int titleH = title==null ? 0 : WTitleLayout.TITLE_HEIGHT; int titleH = title==null ? 0 : WTitleLayout.TITLE_HEIGHT;
for (int i=0; i< target.getComponentCount(); i++) { for (int i=0; i< target.getComponentCount(); i++) {
Component comp = target.getComponent(i); Component comp = target.getComponent(i);
if (comp != null) {
if (comp == title) { if (comp == title) {
comp.setBounds(0, 0, width, WTitleLayout.TITLE_HEIGHT); comp.setBounds(0, 0, width, WTitleLayout.TITLE_HEIGHT);
} else if (comp == body) { } else if (comp == body) {
int y = titleH+gap; int y = titleH + gap;
comp.setBounds(0, y, width, height-y); comp.setBounds(0, y, width, height-y);
} }
} }
} }
} }
}
public Object getConstraints(Component comp) { public Object getConstraints(Component comp) {
if (comp == null){ if (comp == null){

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

@ -573,8 +573,8 @@ public class EditingMouseListener extends MouseInputAdapter {
GUICoreUtils.showPopupMenu(cellPopupMenu, designer, e.getX(), e.getY()); GUICoreUtils.showPopupMenu(cellPopupMenu, designer, e.getX(), e.getY());
} }
} }
}
creator.doLayout(); creator.doLayout();
}
LayoutUtils.layoutRootContainer(designer.getRootComponent()); LayoutUtils.layoutRootContainer(designer.getRootComponent());
} }

Loading…
Cancel
Save