diff --git a/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java b/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java index b02ef38f41..b7ead75f74 100644 --- a/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java +++ b/designer/src/com/fr/design/widget/ui/ButtonGroupDictPane.java @@ -1,63 +1,80 @@ -package com.fr.design.widget.ui; - - -import java.awt.*; -import java.awt.event.ActionEvent; -import com.fr.design.gui.ispinner.UIBasicSpinner; -import java.awt.event.ActionListener; - -import com.fr.design.gui.ilable.UILabel; -import javax.swing.JPanel; -import javax.swing.SpinnerNumberModel; - -import com.fr.design.gui.icheckbox.UICheckBox; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.form.ui.ButtonGroup; -import com.fr.general.Inter; - - -public class ButtonGroupDictPane extends JPanel { - private UIBasicSpinner columnSpinner; - private UICheckBox adaptiveCheckbox; - private UILabel columnLabel; - - public ButtonGroupDictPane() { - this.initComponents(); - } - - /** - * - */ - public void initComponents() { - this.setLayout(new FlowLayout(0)); - JPanel pane = new JPanel(new FlowLayout()); - adaptiveCheckbox = new UICheckBox(Inter.getLocText("Adaptive"), true); - adaptiveCheckbox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); - columnLabel.setVisible(!adaptiveCheckbox.isSelected()); - } - }); - - this.columnLabel = new UILabel(Inter.getLocText("Button-Group-Display-Columns")); - columnSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, Integer.MAX_VALUE, 1)); - pane.add(adaptiveCheckbox); - pane.add(columnLabel); - pane.add(columnSpinner); - - this.add(pane); - } - - public void populate(ButtonGroup buttonGroup) { - adaptiveCheckbox.setSelected(buttonGroup.isAdaptive()); - columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); - columnLabel.setVisible(!adaptiveCheckbox.isSelected()); - columnSpinner.setValue(buttonGroup.getColumnsInRow()); - } - - public void update(ButtonGroup buttonGroup) { - buttonGroup.setAdaptive(adaptiveCheckbox.isSelected()); - buttonGroup.setColumnsInRow((Integer)(columnSpinner.getValue())); - } - +package com.fr.design.widget.ui; + + +import java.awt.*; +import java.awt.event.ActionEvent; + +import com.fr.data.Dictionary; +import com.fr.design.gui.ispinner.UIBasicSpinner; +import java.awt.event.ActionListener; + +import com.fr.design.gui.ilable.UILabel; + +import javax.swing.*; + +import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; +import com.fr.design.mainframe.widget.accessibles.AccessibleDictionaryEditor; +import com.fr.form.ui.ButtonGroup; +import com.fr.general.Inter; + + +public class ButtonGroupDictPane extends JPanel { + private UIBasicSpinner columnSpinner; + private UICheckBox adaptiveCheckbox; + private UILabel columnLabel; + private AccessibleDictionaryEditor dictPane; + + + public ButtonGroupDictPane() { + this.initComponents(); + } + + /** + * + */ + public void initComponents() { + dictPane = new AccessibleDictionaryEditor(); + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + adaptiveCheckbox = new UICheckBox(Inter.getLocText("Adaptive"), true); + adaptiveCheckbox.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); + columnLabel.setVisible(!adaptiveCheckbox.isSelected()); + } + }); + this.columnLabel = new UILabel(Inter.getLocText("Button-Group-Display-Columns") + ":"); + columnSpinner = new UIBasicSpinner(new SpinnerNumberModel(0, 0, Integer.MAX_VALUE, 1)); + + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + double rowSize[] = {p, p}; + double columnSize[] = {p, p, f}; + Component[][] n_components = { + {new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane, null}, + {adaptiveCheckbox, columnLabel, columnSpinner} + }; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(n_components, rowSize, columnSize, 16, 8); + panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + this.add(panel); + + + } + + public void populate(ButtonGroup buttonGroup) { + dictPane.setValue(buttonGroup.getDictionary()); + adaptiveCheckbox.setSelected(buttonGroup.isAdaptive()); + columnSpinner.setVisible(!adaptiveCheckbox.isSelected()); + columnLabel.setVisible(!adaptiveCheckbox.isSelected()); + columnSpinner.setValue(buttonGroup.getColumnsInRow()); + } + + public void update(ButtonGroup buttonGroup) { + buttonGroup.setDictionary((Dictionary) this.dictPane.getValue()); + buttonGroup.setAdaptive(adaptiveCheckbox.isSelected()); + buttonGroup.setColumnsInRow((Integer)(columnSpinner.getValue())); + } + } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/CheckBoxDictPane.java b/designer/src/com/fr/design/widget/ui/CheckBoxDictPane.java index 3648f504df..4889855e47 100644 --- a/designer/src/com/fr/design/widget/ui/CheckBoxDictPane.java +++ b/designer/src/com/fr/design/widget/ui/CheckBoxDictPane.java @@ -1,6 +1,6 @@ package com.fr.design.widget.ui; -import java.awt.BorderLayout; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -11,6 +11,7 @@ import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.DictionaryComboBox; import com.fr.design.gui.icombobox.DictionaryConstants; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.CheckBoxGroup; import com.fr.form.ui.ComboCheckBox; import com.fr.general.Inter; @@ -27,31 +28,29 @@ public class CheckBoxDictPane extends JPanel { private JPanel endPane; public CheckBoxDictPane() { - JPanel returnTypePane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + JPanel returnTypePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); returnTypePane.add(new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type") + ":"), BorderLayout.WEST); returnTypeComboBox = new UIComboBox(new String[]{Inter.getLocText("Widget-Array"), Inter.getLocText("String")}); returnTypePane.add(returnTypeComboBox, BorderLayout.CENTER); - this.add(returnTypePane); - + delimiterPane =FRGUIPaneFactory.createBorderLayout_S_Pane(); UILabel label = new UILabel(Inter.getLocText("Form-Delimiter") + ":"); delimiterPane.add(label, BorderLayout.WEST); delimiterPane.add(delimiterComboBox = new DictionaryComboBox(DictionaryConstants.delimiters, DictionaryConstants.delimiterDisplays), BorderLayout.CENTER); delimiterComboBox.setEditable(true); - this.add(delimiterPane); - + startPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); startPane.add(new UILabel(Inter.getLocText("ComboCheckBox-Start_Symbol") + ":"), BorderLayout.WEST); startPane.add(startComboBox = new DictionaryComboBox(DictionaryConstants.symbols, DictionaryConstants.symbolDisplays), BorderLayout.CENTER); startComboBox.setEditable(true); - this.add(startPane); - + endPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); endPane.add(new UILabel(Inter.getLocText("ComboCheckBox-End_Symbol") + ":"), BorderLayout.WEST); endPane.add(endComboBox = new DictionaryComboBox(DictionaryConstants.symbols, DictionaryConstants.symbolDisplays), BorderLayout.CENTER); endComboBox.setEditable(true); - this.add(endPane); - + JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{returnTypePane, delimiterPane, startPane, endComboBox}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); + this.add(jPanel); returnTypeComboBox.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { checkVisible(); diff --git a/designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java b/designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java index 3d8344e3c1..0c4a32f2c8 100644 --- a/designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/CheckBoxGroupDefinePane.java @@ -1,7 +1,6 @@ package com.fr.design.widget.ui; -import java.awt.BorderLayout; -import java.awt.FlowLayout; +import java.awt.*; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -9,9 +8,13 @@ import javax.swing.JPanel; import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; import com.fr.design.gui.icheckbox.UICheckBox; +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.mainframe.widget.accessibles.AccessibleDictionaryEditor; import com.fr.design.present.dict.DictionaryPane; +import com.fr.design.widget.ui.designer.component.FormWidgetValuePane; import com.fr.form.ui.CheckBoxGroup; import com.fr.general.Inter; @@ -31,7 +34,6 @@ public class CheckBoxGroupDefinePane extends FieldEditorDefinePane { - protected DictionaryPane dictPane; + protected AccessibleDictionaryEditor dictPane; public ComboBoxDefinePane() { this.initComponents(); @@ -16,20 +23,22 @@ public class ComboBoxDefinePane extends CustomWritableRepeatEditorPane @Override protected void initComponents() { super.initComponents(); - dictPane = new DictionaryPane(); } protected JPanel setForthContentPane () { - return null; + dictPane = new AccessibleDictionaryEditor(); + JPanel jPanel = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane}}, TableLayoutHelper.FILL_LASTCOLUMN, 18, 7); + jPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); + return jPanel; } protected void populateSubCustomWritableRepeatEditorBean(ComboBox e) { - this.dictPane.populateBean(e.getDictionary()); + this.dictPane.setValue(e.getDictionary()); } protected ComboBox updateSubCustomWritableRepeatEditorBean() { ComboBox combo = new ComboBox(); - combo.setDictionary(this.dictPane.updateBean()); + combo.setDictionary((Dictionary) this.dictPane.getValue()); return combo; } @@ -41,6 +50,6 @@ public class ComboBoxDefinePane extends CustomWritableRepeatEditorPane @Override public DataCreatorUI dataUI() { - return dictPane; + return null; } } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java b/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java index 9f5ed270df..33f73584fe 100644 --- a/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ComboCheckBoxDefinePane.java @@ -1,47 +1,56 @@ package com.fr.design.widget.ui; +import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; import com.fr.design.gui.icheckbox.UICheckBox; +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.mainframe.widget.accessibles.AccessibleDictionaryEditor; import com.fr.design.present.dict.DictionaryPane; import com.fr.form.ui.ComboCheckBox; import com.fr.general.Inter; +import com.fr.third.fr.pdf.layout.border.Border; import javax.swing.*; import java.awt.*; public class ComboCheckBoxDefinePane extends CustomWritableRepeatEditorPane { private CheckBoxDictPane checkBoxDictPane; - private DictionaryPane dictPane; + private AccessibleDictionaryEditor dictPane; private UICheckBox supportTagCheckBox; public ComboCheckBoxDefinePane() { super.initComponents(); - dictPane = new DictionaryPane(); } @Override protected JPanel setForthContentPane() { - JPanel attrPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); - attrPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); - JPanel contenter = FRGUIPaneFactory.createBorderLayout_L_Pane(); - contenter.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + dictPane = new AccessibleDictionaryEditor(); + checkBoxDictPane = new CheckBoxDictPane(); + supportTagCheckBox = new UICheckBox(Inter.getLocText("Form-SupportTag"), true); + JPanel advancePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + Component[][] components = new Component[][]{ + new Component[]{supportTagCheckBox, null }, + new Component[]{new UILabel(Inter.getLocText("FR-Designer_DS-Dictionary")), dictPane }, + new Component[]{checkBoxDictPane, null }, - checkBoxDictPane = new CheckBoxDictPane(); - attrPane.add(contenter); - //是否以标签形式显示 - JPanel tagPane = FRGUIPaneFactory.createMediumHGapFlowInnerContainer_M_Pane(); - supportTagCheckBox = new UICheckBox(Inter.getLocText("Form-SupportTag"), true); - tagPane.add(supportTagCheckBox); - contenter.add(tagPane, BorderLayout.NORTH); - - contenter.add(checkBoxDictPane, BorderLayout.WEST); - return attrPane; + }; + double[] rowSize = {p, p, p, p}; + double[] columnSize = {p, f}; + int[][] rowCount = {{1, 1},{1, 1},{1,1},{1,1}}; + JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 7); + panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); + advancePane.add(panel); + return advancePane; } @Override protected void populateSubCustomWritableRepeatEditorBean(ComboCheckBox e) { - this.dictPane.populateBean(e.getDictionary()); + this.dictPane.setValue(e.getDictionary()); this.checkBoxDictPane.populate(e); this.supportTagCheckBox.setSelected(e.isSupportTag()); } @@ -50,14 +59,14 @@ public class ComboCheckBoxDefinePane extends CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; private static final int CUSTOM_DATA_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30; private static final int CUSTOM_DATA_CHECK_BOX_HEIGHT = 30; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(CUSTOM_DATA_CHECK_BOX_WIDTH, CUSTOM_DATA_CHECK_BOX_HEIGHT)); JPanel otherContentPane = this.setForthContentPane(); if (otherContentPane != null) { contentPane.add(otherContentPane,BorderLayout.CENTER); } return contentPane; } public JPanel setValidatePane(){ JPanel otherContentPane = super.setValidatePane(); otherContentPane.add(GUICoreUtils.createFlowPane(new JComponent[]{customDataCheckBox}, FlowLayout.LEFT, 5)); return otherContentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file +package com.fr.design.widget.ui; import com.fr.base.GraphHelper; import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.form.ui.CustomWriteAbleRepeatEditor; import com.fr.general.Inter; import javax.swing.*; import java.awt.*; /** * Author : Shockway * Date: 13-9-18 * Time: 下午2:17 */ public abstract class CustomWritableRepeatEditorPane extends WritableRepeatEditorPane { private UICheckBox customDataCheckBox; private static final int CUSTOM_DATA_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("Form-Allow_CustomData") + 30; private static final int CUSTOM_DATA_CHECK_BOX_HEIGHT = 30; public CustomWritableRepeatEditorPane() { this.initComponents(); } @Override protected JPanel setThirdContentPane() { JPanel contentPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.customDataCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_CustomData"), false); this.customDataCheckBox.setPreferredSize( new Dimension(CUSTOM_DATA_CHECK_BOX_WIDTH, CUSTOM_DATA_CHECK_BOX_HEIGHT)); JPanel otherContentPane = this.setForthContentPane(); return otherContentPane; } public JPanel setValidatePane(){ JPanel otherContentPane = super.setValidatePane(); otherContentPane.add(GUICoreUtils.createFlowPane(new JComponent[]{customDataCheckBox}, FlowLayout.LEFT, 5)); return otherContentPane; } protected abstract JPanel setForthContentPane(); protected void populateSubWritableRepeatEditorBean(T e) { this.customDataCheckBox.setSelected(e.isCustomData()); populateSubCustomWritableRepeatEditorBean(e); } protected abstract void populateSubCustomWritableRepeatEditorBean(T e); protected T updateSubWritableRepeatEditorBean() { T e = updateSubCustomWritableRepeatEditorBean(); e.setCustomData(this.customDataCheckBox.isSelected()); return e; } protected abstract T updateSubCustomWritableRepeatEditorBean(); } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java index 43405fa915..582c0e2abe 100644 --- a/designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/DirectWriteEditorDefinePane.java @@ -1,7 +1,10 @@ package com.fr.design.widget.ui; import com.fr.design.gui.icheckbox.UICheckBox; +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.utils.gui.GUICoreUtils; import com.fr.form.ui.DirectWriteEditor; import com.fr.general.Inter; @@ -12,7 +15,7 @@ import java.awt.*; //richer:需要提供能否直接编辑的控件设置面板——下拉框、复选框、时间、日期、下拉树 public abstract class DirectWriteEditorDefinePane extends FieldEditorDefinePane { public UICheckBox directWriteCheckBox; - private WaterMarkDictPane waterMarkDictPane; + protected WaterMarkDictPane waterMarkDictPane; public DirectWriteEditorDefinePane() { this.initComponents(); @@ -21,16 +24,17 @@ public abstract class DirectWriteEditorDefinePane e @Override protected JPanel setFirstContentPane() { - JPanel contentPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); - contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + JPanel contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + contentPane.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0)); directWriteCheckBox = new UICheckBox(Inter.getLocText("Form-Allow_Edit"), false); + directWriteCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); directWriteCheckBox.setPreferredSize(new Dimension(100, 30)); waterMarkDictPane = new WaterMarkDictPane(); - contentPane.add(waterMarkDictPane); + contentPane.add(waterMarkDictPane, BorderLayout.NORTH); JPanel otherContentPane = this.setSecondContentPane(); if (otherContentPane != null) { - contentPane.add(otherContentPane); + contentPane.add(otherContentPane, BorderLayout.CENTER); } return contentPane; } diff --git a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java index 1f23e18ddd..01d946be91 100644 --- a/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java +++ b/designer/src/com/fr/design/widget/ui/ListEditorDefinePane.java @@ -2,16 +2,21 @@ package com.fr.design.widget.ui; import javax.swing.JPanel; +import com.fr.data.Dictionary; import com.fr.design.data.DataCreatorUI; import com.fr.design.gui.icheckbox.UICheckBox; +import com.fr.design.gui.ilable.UILabel; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.mainframe.widget.accessibles.AccessibleDictionaryEditor; import com.fr.design.present.dict.DictionaryPane; import com.fr.form.ui.ListEditor; import com.fr.general.Inter; +import java.awt.*; + public class ListEditorDefinePane extends WriteUnableRepeatEditorPane { private UICheckBox needHeadCheckBox; - private DictionaryPane dictPane; + private AccessibleDictionaryEditor dictPane; public ListEditorDefinePane() { this.initComponents(); @@ -20,9 +25,14 @@ public class ListEditorDefinePane extends WriteUnableRepeatEditorPane { - private DictionaryPane dictPane; - - private ButtonGroupDictPane buttonGroupDictPane; - - public RadioGroupDefinePane() { - this.initComponents(); - } - - @Override - protected void initComponents() { - super.initComponents(); - - dictPane = new DictionaryPane(); - } - - @Override - protected JPanel setFirstContentPane() { - - JPanel centerPane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane(); - buttonGroupDictPane = new ButtonGroupDictPane(); - buttonGroupDictPane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - centerPane.add(buttonGroupDictPane); - return centerPane; - } - - @Override - protected RadioGroup updateSubFieldEditorBean() { - RadioGroup ob = new RadioGroup(); - - ob.setDictionary(this.dictPane.updateBean()); - this.buttonGroupDictPane.update(ob); - - return ob; - } - - @Override - protected String title4PopupWindow() { - return "radiogroup"; - } - - @Override - protected void populateSubFieldEditorBean(RadioGroup ob) { - this.dictPane.populateBean(ob.getDictionary()); - this.buttonGroupDictPane.populate(ob); - } - - @Override - public DataCreatorUI dataUI() { - return dictPane; - } +package com.fr.design.widget.ui; + +import javax.swing.JPanel; +import com.fr.design.data.DataCreatorUI; +import com.fr.form.ui.RadioGroup; + +public class RadioGroupDefinePane extends FieldEditorDefinePane { + + private ButtonGroupDictPane buttonGroupDictPane; + + public RadioGroupDefinePane() { + this.initComponents(); + } + + @Override + protected void initComponents() { + super.initComponents(); + + } + + @Override + protected JPanel setFirstContentPane() { + buttonGroupDictPane = new ButtonGroupDictPane(); + return buttonGroupDictPane; + } + + @Override + protected RadioGroup updateSubFieldEditorBean() { + RadioGroup ob = new RadioGroup(); + + this.buttonGroupDictPane.update(ob); + + return ob; + } + + @Override + protected String title4PopupWindow() { + return "radiogroup"; + } + + @Override + protected void populateSubFieldEditorBean(RadioGroup ob) { + this.buttonGroupDictPane.populate(ob); + } + + @Override + public DataCreatorUI dataUI() { + return null; + } } \ No newline at end of file diff --git a/designer/src/com/fr/design/widget/ui/WritableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/WritableRepeatEditorPane.java index f27b308571..8bb502d18c 100644 --- a/designer/src/com/fr/design/widget/ui/WritableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/WritableRepeatEditorPane.java @@ -15,7 +15,7 @@ public abstract class WritableRepeatEditorPane @Override protected JPanel setSecondContentPane() { - JPanel contentPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0(); + JPanel contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); contentPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); JPanel otherContentPane = this.setThirdContentPane(); if (otherContentPane != null) { diff --git a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java index 33b8e3f889..c84b761884 100644 --- a/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java +++ b/designer/src/com/fr/design/widget/ui/WriteUnableRepeatEditorPane.java @@ -1,12 +1,15 @@ package com.fr.design.widget.ui; -import java.awt.BorderLayout; +import java.awt.*; import javax.swing.BorderFactory; import javax.swing.JPanel; import com.fr.design.gui.icheckbox.UICheckBox; +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.form.ui.WriteUnableRepeatEditor; import com.fr.general.Inter; @@ -21,15 +24,40 @@ public abstract class WriteUnableRepeatEditorPane { - private DictionaryPane dictPane; public RadioGroupDefinePane(XCreator xCreator) { @@ -18,16 +17,12 @@ public class RadioGroupDefinePane extends ButtonGroupDefinePane { @Override protected void initComponents() { super.initComponents(); - - dictPane = new DictionaryPane(); } @Override protected RadioGroup updateSubButtonGroupBean() { RadioGroup ob = (RadioGroup)creator.toData(); - ob.setDictionary(this.dictPane.updateBean()); - return ob; } @@ -38,11 +33,10 @@ public class RadioGroupDefinePane extends ButtonGroupDefinePane { @Override protected void populateSubButtonGroupBean(RadioGroup ob) { - this.dictPane.populateBean(ob.getDictionary()); } @Override public DataCreatorUI dataUI() { - return dictPane; + return null; } } \ No newline at end of file