Browse Source

Merge branch 'feature/9.0' of http://cloud.finedevelop.com:2015/scm/~kerry/design into feature/9.0

kerry 7 years ago
parent
commit
c6c8546ddf
  1. 16
      designer_form/src/com/fr/design/mainframe/FormArea.java
  2. 2
      designer_form/src/com/fr/design/mainframe/JForm.java

16
designer_form/src/com/fr/design/mainframe/FormArea.java

@ -42,7 +42,6 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
private static final int MOBILE_ONLY_WIDTH = 375;
private static final int MOBILE_ONLY_HEIGHT = 560;
private FormDesigner designer;
private JForm jForm;
private int horizontalValue = 0;
private int verticalValue = 0;
private int verticalMax = 0;
@ -68,21 +67,12 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
}
public FormArea(FormDesigner designer) {
this(designer, null, true);
}
public FormArea(FormDesigner designer, JForm jForm) {
this(designer, jForm, true);
this(designer, true);
}
public FormArea(FormDesigner designer, boolean useScrollBar) {
this(designer, null, useScrollBar);
}
public FormArea(FormDesigner designer, JForm jForm, boolean useScrollBar) {
this.designer = designer;
this.designer.setParent(this);
this.jForm = jForm;
isValid = useScrollBar;
verScrollBar = new FormScrollBar(Adjustable.VERTICAL, this);
horScrollBar = new FormScrollBar(Adjustable.HORIZONTAL, this);
@ -94,6 +84,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
this.add(FormRulerLayout.VERTICAL, verScrollBar);
this.add(FormRulerLayout.HIRIZONTAL, horScrollBar);
enableEvents(AWTEvent.MOUSE_WHEEL_EVENT_MASK);
widthPane.setEnabled(!designer.getTarget().getFormMobileAttr().isMobileOnly());
} else {
// 报表参数界面只要标尺和中心pane
this.setLayout(new RulerLayout());
@ -102,11 +93,10 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
}
this.setFocusTraversalKeysEnabled(false);
this.designer.addMouseWheelListener(showValSpinnerMouseWheelListener);
widthPane.setEnabled(!jForm.getTarget().getFormMobileAttr().isMobileOnly());
}
public void onMobileAttrModified() {
FormMobileAttr formMobileAttr = jForm.getTarget().getFormMobileAttr();
FormMobileAttr formMobileAttr = designer.getTarget().getFormMobileAttr();
if (formMobileAttr.isMobileOnly()) {
widthPane.setValue(MOBILE_ONLY_WIDTH);
changeWidthPaneValue(MOBILE_ONLY_WIDTH);

2
designer_form/src/com/fr/design/mainframe/JForm.java

@ -225,7 +225,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
centerPane.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, new Color(85, 85, 85)));
formDesign = new FormDesigner(this.getTarget(), new TabChangeAction(BaseJForm.ELEMENTCASE_TAB, this));
WidgetToolBarPane.getInstance(formDesign);
FormArea area = new FormArea(formDesign, this);
FormArea area = new FormArea(formDesign);
JPanel areaWrapper = new JPanel(new BorderLayout());
areaWrapper.add(area, BorderLayout.CENTER);
areaWrapper.setBackground(Color.white);

Loading…
Cancel
Save