Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

feature/big-screen
Bryant 5 years ago
parent
commit
1dde2b5e1f
  1. 12
      designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java
  2. 22
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java
  3. 36
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java
  4. 4
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java
  5. 3
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java
  6. 4
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
  7. 14
      designer-realize/src/main/java/com/fr/design/condition/WHPane.java

12
designer-base/src/main/java/com/fr/design/gui/icombocheckbox/UIComboCheckBox.java

@ -132,7 +132,17 @@ public class UIComboCheckBox extends JComponent implements UIObserver, GlobalNam
}
private UITextField createEditor() {
UITextField editor = new UITextField();
UITextField editor = new UITextField() {
@Override
protected void initListener() {
this.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
attributeChange();
}
});
}
};
editor.setEditable(false);
editor.setPreferredSize(new Dimension(110, 20));
addPopupListener(editor);

22
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/UpMenuStyleDefinePane.java

@ -51,29 +51,29 @@ public class UpMenuStyleDefinePane extends StyleDefinePaneWithSelectConf {
gapFix.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
titleWidthFix.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
buttonGroup.add(titleWidthFix);
JPanel flowLeft = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
flowLeft.add(gapFix);
flowLeft.add(titleWidthFix);
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{displayGap, flowLeft}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20));
centerPane.setPreferredSize(new Dimension(500, 20));
final JPanel wrapTabWidthPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tabWidthLabel, tabWidthPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
wrapTabWidthPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20));
wrapTabWidthPanel.setPreferredSize(new Dimension(200, 20));
gapFix.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
updatePreviewPane();
wrapTabWidthPanel.setVisible(titleWidthFix.isSelected());
}
});
titleWidthFix.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
updatePreviewPane();
wrapTabWidthPanel.setVisible(titleWidthFix.isSelected());
}
});
JPanel flowLeft = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
flowLeft.add(gapFix);
flowLeft.add(titleWidthFix);
JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{displayGap, flowLeft}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
centerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20));
centerPane.setPreferredSize(new Dimension(500, 20));
JPanel wrapTabWidthPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{tabWidthLabel, tabWidthPanel}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
wrapTabWidthPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 15, 20));
wrapTabWidthPanel.setPreferredSize(new Dimension(200, 20));
JPanel outerPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 10);
outerPane.setBorder(BorderFactory.createEmptyBorder(0, 20, 5, 20));
outerPane.add(centerPane);

36
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/AbstractFRLayoutDefinePane.java

@ -0,0 +1,36 @@
package com.fr.design.widget.ui.designer.layout;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.form.ui.container.WSortLayout;
/**
* @author hades
* @version 9.0
* Created by hades on 2019/11/18
*/
public abstract class AbstractFRLayoutDefinePane<T extends WSortLayout> extends AbstractDataModify<T> {
public AbstractFRLayoutDefinePane(XCreator xCreator) {
super(xCreator);
}
public AbstractFRLayoutDefinePane(XCreator xCreator, FormDesigner designer) {
super(xCreator, designer);
}
protected void copyLayoutAttr(WSortLayout srcLayout, WSortLayout destLayout) {
destLayout.clearListeners();
destLayout.clearMobileWidgetList();
for (int i = 0, len = srcLayout.getMobileWidgetListSize(); i < len; i++) {
destLayout.addMobileWidget(srcLayout.getMobileWidget(i));
}
destLayout.setSorted(true);
for (int i = 0, len = srcLayout.getListenerSize(); i < len; i++) {
destLayout.addListener(srcLayout.getListener(i));
}
}
}

4
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

@ -131,7 +131,9 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
if (layoutType == WBodyLayoutType.ABSOLUTE) {
((XWFitLayout) creator.getBackupParent()).toData().resetStyle();
if (state == WBodyLayoutType.FIT.getTypeValue()) {
((XWFitLayout)creator.getBackupParent()).switch2FitBodyLayout(creator);
XWFitLayout xwFitLayout = ((XWFitLayout)creator.getBackupParent());
xwFitLayout.switch2FitBodyLayout(creator);
copyLayoutAttr(layout, xwFitLayout.toData());
}
}
layout.setBorderStyle((LayoutBorderStyle) borderStyleEditor.getValue());

3
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteLayoutDefinePane.java

@ -11,7 +11,6 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.form.ui.container.WAbsoluteLayout;
import javax.swing.BorderFactory;
@ -23,7 +22,7 @@ import java.awt.Component;
/**
* Created by ibm on 2017/8/2.
*/
public class FRAbsoluteLayoutDefinePane extends AbstractDataModify<WAbsoluteLayout> {
public class FRAbsoluteLayoutDefinePane extends AbstractFRLayoutDefinePane<WAbsoluteLayout> {
protected UIComboBox comboBox;
public FRAbsoluteLayoutDefinePane(XCreator xCreator) {

4
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -26,7 +26,6 @@ import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor;
import com.fr.design.mainframe.widget.accessibles.AccessibleWLayoutBorderStyleEditor;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.design.widget.ui.designer.AbstractDataModify;
import com.fr.design.widget.ui.designer.component.PaddingBoundPane;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.Widget;
@ -48,7 +47,7 @@ import java.awt.Dimension;
/**
* Created by ibm on 2017/8/2.
*/
public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
public class FRFitLayoutDefinePane extends AbstractFRLayoutDefinePane<WFitLayout> {
private static final int ADAPT_LABEL_MAX_WIDTH = 80;
private XWFitLayout xWFitLayout;
private WFitLayout wFitLayout;
@ -208,6 +207,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
}
xwAbsoluteBodyLayout.add(component);
}
copyLayoutAttr(wFitLayout, wAbsoluteBodyLayout);
xWFitLayout.setBackupParent(xwAbsoluteBodyLayout);
FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner();
formDesigner.getSelectionModel().setSelectedCreators(

14
designer-realize/src/main/java/com/fr/design/condition/WHPane.java

@ -10,7 +10,10 @@ import com.fr.stable.Constants;
import com.fr.stable.unit.*;
import javax.swing.*;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.math.BigDecimal;
import java.text.ParseException;
/**
* @author richie
@ -30,6 +33,17 @@ public abstract class WHPane extends ConditionAttrSingleConditionPane<HighlightA
GUICoreUtils.setColumnForSpinner(spinner, 5);
this.spinner.setValue(new Integer(0));
this.locString = locString;
final JFormattedTextField textField = ((JSpinner.NumberEditor) this.spinner.getEditor()).getTextField();
textField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
try {
textField.commitEdit();
} catch (ParseException ignore) {
}
}
});
}
@Override

Loading…
Cancel
Save