Browse Source

控件校验剩余控件整改

master
kerry 9 years ago
parent
commit
2bed1df3f7
  1. 2
      designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java
  2. 4
      designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java
  3. 2
      designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java
  4. 2
      designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java
  5. 2
      designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java
  6. 2
      designer/src/com/fr/design/widget/ui/RadioGroupDefinePane.java
  7. 2
      designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java
  8. 2
      designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java
  9. 2
      designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java
  10. 2
      designer/src/com/fr/design/widget/ui/btn/TreeNodeToogleButtonDefinePane.java
  11. 2
      designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java
  12. 2
      designer_form/src/com/fr/design/designer/creator/XFieldEditor.java
  13. 2
      designer_form/src/com/fr/design/designer/creator/XPassword.java
  14. 2
      designer_form/src/com/fr/design/designer/creator/XTextArea.java
  15. 2
      designer_form/src/com/fr/design/designer/creator/XTextEditor.java
  16. 2
      designer_form/src/com/fr/design/form/util/XCreatorConstants.java

2
designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java

@ -41,7 +41,7 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane<CheckBoxGroup
protected JPanel setFirstContentPane() { protected JPanel setFirstContentPane() {
JPanel attrPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel attrPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
attrPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); attrPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
advancedPane.add(attrPane); advancedPane.add(attrPane);
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
northPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); northPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));

4
designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java

@ -10,9 +10,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPane;
import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.editor.ValueEditorPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.ComboBox;
import com.fr.form.ui.DateEditor; import com.fr.form.ui.DateEditor;
import com.fr.general.ComparatorUtils;
import com.fr.general.DateUtils; import com.fr.general.DateUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.script.Calculator; import com.fr.script.Calculator;
@ -23,8 +21,6 @@ import com.fr.stable.UtilEvalError;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener; import javax.swing.event.DocumentListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;

2
designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java

@ -26,7 +26,7 @@ public abstract class DirectWriteEditorDefinePane<T extends DirectWriteEditor> e
directWriteCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_Edit"), false); directWriteCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_Edit"), false);
directWriteCheckBox.setPreferredSize(new Dimension(100, 30)); directWriteCheckBox.setPreferredSize(new Dimension(100, 30));
getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{directWriteCheckBox}, FlowLayout.LEFT, 5)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{directWriteCheckBox}, FlowLayout.LEFT, 5));
JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
waterMarkDictPane = new WaterMarkDictPane(); waterMarkDictPane = new WaterMarkDictPane();
advancedPane.add(contentPane); advancedPane.add(contentPane);
contentPane.add(waterMarkDictPane); contentPane.add(waterMarkDictPane);

2
designer/src/com/fr/design/widget/ui/IframeEditorDefinePane.java

@ -57,7 +57,7 @@ public class IframeEditorDefinePane extends AbstractDataModify<IframeEditor> {
centerPane.add(GUICoreUtils.createFlowPane(new UILabel(Inter.getLocText("Form-Url") + ":"), srcTextField = new UITextField(16), FlowLayout.LEFT)); centerPane.add(GUICoreUtils.createFlowPane(new UILabel(Inter.getLocText("Form-Url") + ":"), srcTextField = new UITextField(16), FlowLayout.LEFT));
centerPane.add(GUICoreUtils.createFlowPane( new UILabel(Inter.getLocText("Parameter") + ":"), parameterViewPane = new ReportletParameterViewPane(), FlowLayout.LEFT)); centerPane.add(GUICoreUtils.createFlowPane( new UILabel(Inter.getLocText("Parameter") + ":"), parameterViewPane = new ReportletParameterViewPane(), FlowLayout.LEFT));
parameterViewPane.setPreferredSize(new Dimension(540, 235)); parameterViewPane.setPreferredSize(new Dimension(540, 235));
JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
advancedPane.add(contentPane); advancedPane.add(contentPane);
contentPane.add(centerPane); contentPane.add(centerPane);
this.add(advancedPane, BorderLayout.CENTER); this.add(advancedPane, BorderLayout.CENTER);

2
designer/src/com/fr/design/widget/ui/NumberEditorDefinePane.java

@ -157,7 +157,7 @@ public class NumberEditorDefinePane extends FieldEditorDefinePane<NumberEditor>
content.setLayout(FRGUIPaneFactory.createBorderLayout()); content.setLayout(FRGUIPaneFactory.createBorderLayout());
// richer:数字的允许直接编辑没有意义 // richer:数字的允许直接编辑没有意义
JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel northPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
content.add(northPane, BorderLayout.NORTH); content.add(northPane, BorderLayout.NORTH);
waterMarkDictPane = new WaterMarkDictPane(); waterMarkDictPane = new WaterMarkDictPane();

2
designer/src/com/fr/design/widget/ui/RadioGroupDefinePane.java

@ -35,7 +35,7 @@ public class RadioGroupDefinePane extends FieldEditorDefinePane<RadioGroup> {
JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel centerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
buttonGroupDictPane = new ButtonGroupDictPane(); buttonGroupDictPane = new ButtonGroupDictPane();
buttonGroupDictPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0)); buttonGroupDictPane.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));
JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
centerPane.add(buttonGroupDictPane); centerPane.add(buttonGroupDictPane);
advancedPane.add(centerPane); advancedPane.add(centerPane);
attrPane.add(advancedPane, BorderLayout.CENTER); attrPane.add(advancedPane, BorderLayout.CENTER);

2
designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java

@ -48,7 +48,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor>
regPane.addPhoneRegListener(pl); regPane.addPhoneRegListener(pl);
getValidatePane().add(GUICoreUtils.createFlowPane(regPane, FlowLayout.LEFT)); getValidatePane().add(GUICoreUtils.createFlowPane(regPane, FlowLayout.LEFT));
getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{new UILabel(Inter.getLocText(new String[]{"Error", "Tooltips"}) + ":"), getRegErrorMsgTextField()}, FlowLayout.LEFT, 24)); getValidatePane().add(GUICoreUtils.createFlowPane(new JComponent[]{new UILabel(Inter.getLocText(new String[]{"Error", "Tooltips"}) + ":"), getRegErrorMsgTextField()}, FlowLayout.LEFT, 24));
JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
waterMarkDictPane = new WaterMarkDictPane(); waterMarkDictPane = new WaterMarkDictPane();
waterMarkDictPane.addInputKeyListener(new KeyAdapter() { waterMarkDictPane.addInputKeyListener(new KeyAdapter() {
public void keyTyped(KeyEvent e) { public void keyTyped(KeyEvent e) {

2
designer/src/com/fr/design/widget/ui/TreeEditorDefinePane.java

@ -46,7 +46,7 @@ public class TreeEditorDefinePane extends FieldEditorDefinePane<TreeEditor> {
} }
protected JPanel setSecondContentPane() { protected JPanel setSecondContentPane() {
JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
advancedPane.add(contentPane); advancedPane.add(contentPane);
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));

2
designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java

@ -20,7 +20,7 @@ public abstract class WriteUnableRepeatEditorPane<E extends WriteUnableRepeatEdi
@Override @Override
protected JPanel setFirstContentPane() { protected JPanel setFirstContentPane() {
JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane();
advancedPane.add(contentPane); advancedPane.add(contentPane);
contentPane.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0)); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0));

2
designer/src/com/fr/design/widget/ui/btn/TreeNodeToogleButtonDefinePane.java

@ -34,7 +34,7 @@ public class TreeNodeToogleButtonDefinePane<T extends TreeNodeToggleButton> exte
{new UILabel(Inter.getLocText(new String[]{"Form-Button", "Type"}) + ":"), createButtonTypeComboBox()} {new UILabel(Inter.getLocText(new String[]{"Form-Button", "Type"}) + ":"), createButtonTypeComboBox()}
}; };
JPanel northPane = TableLayoutHelper.createTableLayoutPane(n_components, rowSize, columnSize); JPanel northPane = TableLayoutHelper.createTableLayoutPane(n_components, rowSize, columnSize);
JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
advancedPane.add(northPane); advancedPane.add(northPane);
add(advancedPane, BorderLayout.CENTER); add(advancedPane, BorderLayout.CENTER);
} }

2
designer_base/src/com/fr/design/widget/btn/ButtonWithHotkeysDetailPane.java

@ -31,7 +31,7 @@ public abstract class ButtonWithHotkeysDetailPane<T extends Button> extends Butt
} }
private void initComponents() { private void initComponents() {
JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("Advanced")); JPanel advancedPane = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Advanced"));
advancedPane.setPreferredSize(new Dimension(600,300)); advancedPane.setPreferredSize(new Dimension(600,300));
JPanel attrPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel attrPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
attrPane.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 4)); attrPane.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 4));

2
designer_form/src/com/fr/design/designer/creator/XFieldEditor.java

@ -53,7 +53,7 @@ public abstract class XFieldEditor extends XWidgetCreator {
: new CRPropertyDescriptor[]{allowBlank, fontSize}; : new CRPropertyDescriptor[]{allowBlank, fontSize};
} }
public Boolean isDisplayRegField(Boolean displayRegField) { public boolean isDisplayRegField(boolean displayRegField) {
RegExp reg = ((TextEditor) toData()).getRegex(); RegExp reg = ((TextEditor) toData()).getRegex();
if (reg == null || !StringUtils.isNotEmpty(reg.toRegText())) { if (reg == null || !StringUtils.isNotEmpty(reg.toRegText())) {

2
designer_form/src/com/fr/design/designer/creator/XPassword.java

@ -64,7 +64,7 @@ public class XPassword extends XWrapperedFieldEditor {
CRPropertyDescriptor waterMark = new CRPropertyDescriptor("waterMark", this.data.getClass()) CRPropertyDescriptor waterMark = new CRPropertyDescriptor("waterMark", this.data.getClass())
.setI18NName(Inter.getLocText("FR-Designer_WaterMark")) .setI18NName(Inter.getLocText("FR-Designer_WaterMark"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced"); .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced");
Boolean displayRegField = true; boolean displayRegField = true;
displayRegField = isDisplayRegField(displayRegField); displayRegField = isDisplayRegField(displayRegField);
return displayRegField ? (CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, regErrorMessage, waterMark}) : return displayRegField ? (CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, regErrorMessage, waterMark}) :
(CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, waterMark}); (CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, waterMark});

2
designer_form/src/com/fr/design/designer/creator/XTextArea.java

@ -49,7 +49,7 @@ public class XTextArea extends XFieldEditor {
CRPropertyDescriptor waterMark = new CRPropertyDescriptor("waterMark", this.data.getClass()).setI18NName( CRPropertyDescriptor waterMark = new CRPropertyDescriptor("waterMark", this.data.getClass()).setI18NName(
Inter.getLocText("WaterMark")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, Inter.getLocText("WaterMark")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY,
"Advanced"); "Advanced");
Boolean displayRegField = true; boolean displayRegField = true;
displayRegField = isDisplayRegField(displayRegField); displayRegField = isDisplayRegField(displayRegField);
return displayRegField ? (CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, regErrorMessage, waterMark}) : return displayRegField ? (CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, regErrorMessage, waterMark}) :
(CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, waterMark}); (CRPropertyDescriptor[]) ArrayUtils.addAll(sup, new CRPropertyDescriptor[]{regex, waterMark});

2
designer_form/src/com/fr/design/designer/creator/XTextEditor.java

@ -53,7 +53,7 @@ public class XTextEditor extends XWrapperedFieldEditor {
Inter.getLocText("FR-Designer_WaterMark")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, Inter.getLocText("FR-Designer_WaterMark")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY,
"Advanced"); "Advanced");
CRPropertyDescriptor[] sup = (CRPropertyDescriptor[]) ArrayUtils.addAll(new CRPropertyDescriptor[]{widgetValue}, super.supportedDescriptor()); CRPropertyDescriptor[] sup = (CRPropertyDescriptor[]) ArrayUtils.addAll(new CRPropertyDescriptor[]{widgetValue}, super.supportedDescriptor());
Boolean displayRegField = true; boolean displayRegField = true;
displayRegField = isDisplayRegField(displayRegField); displayRegField = isDisplayRegField(displayRegField);
return displayRegField ? (CRPropertyDescriptor[]) ArrayUtils.addAll(sup, return displayRegField ? (CRPropertyDescriptor[]) ArrayUtils.addAll(sup,
new CRPropertyDescriptor[]{regex, regErrorMessage, waterMark}) : new CRPropertyDescriptor[]{regex, regErrorMessage, waterMark}) :

2
designer_form/src/com/fr/design/form/util/XCreatorConstants.java

@ -21,7 +21,7 @@ public class XCreatorConstants {
// 描述属性的分类 // 描述属性的分类
public static final String PROPERTY_CATEGORY = "category"; public static final String PROPERTY_CATEGORY = "category";
public static final String DEFAULT_GROUP_NAME = "Form-Basic_Properties"; public static final String DEFAULT_GROUP_NAME = "Form-Basic_Properties";
public static final String PROPERTY_VALIDATE = "validate"; public static final String PROPERTY_VALIDATE = "FR-Designer_Validate";
public static final Color FORM_BG = new Color(252, 252, 254); public static final Color FORM_BG = new Color(252, 252, 254);
// 拖拽标识块的大小 // 拖拽标识块的大小
public static final int RESIZE_BOX_SIZ = 5; public static final int RESIZE_BOX_SIZ = 5;

Loading…
Cancel
Save