|
|
@ -95,6 +95,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent { |
|
|
|
private double START_VALUE = DEFAULT_SLIDER; |
|
|
|
private double START_VALUE = DEFAULT_SLIDER; |
|
|
|
private double screenValue; |
|
|
|
private double screenValue; |
|
|
|
private UIButton fixLayoutSwitchButton; |
|
|
|
private UIButton fixLayoutSwitchButton; |
|
|
|
|
|
|
|
private boolean isFixLayoutEditState; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public FormScrollBar getHorScrollBar() { |
|
|
|
public FormScrollBar getHorScrollBar() { |
|
|
@ -250,9 +251,23 @@ public class FormArea extends JComponent implements ScrollRulerComponent { |
|
|
|
slidePane.addValueChangeListener(showValSpinnerChangeListener); |
|
|
|
slidePane.addValueChangeListener(showValSpinnerChangeListener); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void undoFixLayoutState(boolean isFixLayout) { |
|
|
|
|
|
|
|
getFormEditor().getRootComponent().setFixLayout(isFixLayout); |
|
|
|
|
|
|
|
this.switchLayout(isFixLayout); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void switchBodyLayout(XLayoutContainer xLayoutContainer) { |
|
|
|
public void switchBodyLayout(XLayoutContainer xLayoutContainer) { |
|
|
|
this.fixLayoutSwitchButton.setVisible(xLayoutContainer.supportFixLayout()); |
|
|
|
this.fixLayoutSwitchButton.setVisible(xLayoutContainer.supportFixLayout()); |
|
|
|
this.fixLayoutSwitchButton.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout_No_Fix_Layout")); |
|
|
|
this.switchLayout(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void switchLayout(boolean isFixLayout) { |
|
|
|
|
|
|
|
this.isFixLayoutEditState = isFixLayout; |
|
|
|
|
|
|
|
this.fixLayoutSwitchButton.setText(isFixLayout ? com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout_Fix_Layout") : |
|
|
|
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout_No_Fix_Layout")); |
|
|
|
|
|
|
|
FormMobileAttr formMobileAttr = designer.getTarget().getFormMobileAttr(); |
|
|
|
|
|
|
|
widthPane.setEnabled(!isFixLayout && !formMobileAttr.isMobileOnly()); |
|
|
|
|
|
|
|
heightPane.setEnabled(!isFixLayout); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -338,8 +353,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent { |
|
|
|
if(object instanceof XCreator){ |
|
|
|
if(object instanceof XCreator){ |
|
|
|
updateCreatorsBackupBound((XCreator) object); |
|
|
|
updateCreatorsBackupBound((XCreator) object); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} } |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置宽度的控件及响应事件
|
|
|
|
//设置宽度的控件及响应事件
|
|
|
@ -956,6 +970,10 @@ public class FormArea extends JComponent implements ScrollRulerComponent { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isFixLayout(){ |
|
|
|
|
|
|
|
return this.isFixLayoutEditState; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class Switch2NoFixLayoutAction extends UpdateAction{ |
|
|
|
class Switch2NoFixLayoutAction extends UpdateAction{ |
|
|
|
public Switch2NoFixLayoutAction(){ |
|
|
|
public Switch2NoFixLayoutAction(){ |
|
|
|
this.putValue(Action.SMALL_ICON, null); |
|
|
|
this.putValue(Action.SMALL_ICON, null); |
|
|
@ -966,7 +984,8 @@ public class FormArea extends JComponent implements ScrollRulerComponent { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
getFormEditor().getRootComponent().setFixLayout(false); |
|
|
|
getFormEditor().getRootComponent().setFixLayout(false); |
|
|
|
fixLayoutSwitchButton.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout_No_Fix_Layout")); |
|
|
|
switchLayout(false); |
|
|
|
|
|
|
|
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); |
|
|
|
DesignerContext.getDesignerFrame().refresh(); |
|
|
|
DesignerContext.getDesignerFrame().refresh(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -982,7 +1001,8 @@ public class FormArea extends JComponent implements ScrollRulerComponent { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
getFormEditor().getRootComponent().setFixLayout(true); |
|
|
|
getFormEditor().getRootComponent().setFixLayout(true); |
|
|
|
fixLayoutSwitchButton.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout_Fix_Layout")); |
|
|
|
switchLayout(true); |
|
|
|
|
|
|
|
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); |
|
|
|
DesignerContext.getDesignerFrame().refresh(); |
|
|
|
DesignerContext.getDesignerFrame().refresh(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|