|
|
@ -2,13 +2,11 @@ package com.fr.design.widget.ui.designer; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.data.DataCreatorUI; |
|
|
|
import com.fr.design.data.DataCreatorUI; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
|
|
|
|
import com.fr.design.gui.ibutton.UIHeadGroup; |
|
|
|
|
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.present.dict.DictionaryPane; |
|
|
|
import com.fr.design.present.dict.DictionaryPane; |
|
|
|
|
|
|
|
import com.fr.design.widget.component.CheckBoxDictPane; |
|
|
|
import com.fr.design.widget.ui.designer.btn.ButtonGroupDefinePane; |
|
|
|
import com.fr.design.widget.ui.designer.btn.ButtonGroupDefinePane; |
|
|
|
import com.fr.form.ui.CheckBoxGroup; |
|
|
|
import com.fr.form.ui.CheckBoxGroup; |
|
|
|
import com.fr.general.Inter; |
|
|
|
import com.fr.general.Inter; |
|
|
@ -18,7 +16,7 @@ import java.awt.*; |
|
|
|
|
|
|
|
|
|
|
|
public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane<CheckBoxGroup> { |
|
|
|
public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane<CheckBoxGroup> { |
|
|
|
private DictionaryPane dictPane; |
|
|
|
private DictionaryPane dictPane; |
|
|
|
private UIButtonGroup returnType; |
|
|
|
private CheckBoxDictPane checkBoxDictPane; |
|
|
|
private UICheckBox checkbox; |
|
|
|
private UICheckBox checkbox; |
|
|
|
|
|
|
|
|
|
|
|
public CheckBoxGroupDefinePane(XCreator xCreator) { |
|
|
|
public CheckBoxGroupDefinePane(XCreator xCreator) { |
|
|
@ -42,15 +40,12 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane<CheckBoxGroup |
|
|
|
public JPanel createOtherPane(){ |
|
|
|
public JPanel createOtherPane(){ |
|
|
|
checkbox = new UICheckBox(Inter.getLocText(new String[]{"Provide", "Choose_All"})); |
|
|
|
checkbox = new UICheckBox(Inter.getLocText(new String[]{"Provide", "Choose_All"})); |
|
|
|
checkbox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
|
|
|
checkbox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
|
|
|
final String[] tabTitles = new String[]{Inter.getLocText("Widget-Array"), Inter.getLocText("String")}; |
|
|
|
checkBoxDictPane = new CheckBoxDictPane(); |
|
|
|
returnType = new UIButtonGroup(tabTitles); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
double f = TableLayout.FILL; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{checkbox, null }, |
|
|
|
new Component[]{checkbox, null }, |
|
|
|
new Component[]{new UILabel(Inter.getLocText("Widget-Date_Selector_Return_Type")), returnType}, |
|
|
|
new Component[]{checkBoxDictPane, null}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
double[] rowSize = {p, p}; |
|
|
|
double[] rowSize = {p, p}; |
|
|
|
double[] columnSize = {p, f}; |
|
|
|
double[] columnSize = {p, f}; |
|
|
@ -62,7 +57,7 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane<CheckBoxGroup |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void populateSubButtonGroupBean(CheckBoxGroup ob) { |
|
|
|
protected void populateSubButtonGroupBean(CheckBoxGroup ob) { |
|
|
|
returnType.setSelectedIndex(ob.isReturnString() ? 1 : 0); |
|
|
|
this.checkBoxDictPane.populate(ob); |
|
|
|
this.dictPane.populateBean(ob.getDictionary()); |
|
|
|
this.dictPane.populateBean(ob.getDictionary()); |
|
|
|
checkbox.setSelected(ob.isChooseAll()); |
|
|
|
checkbox.setSelected(ob.isChooseAll()); |
|
|
|
} |
|
|
|
} |
|
|
@ -72,7 +67,7 @@ public class CheckBoxGroupDefinePane extends ButtonGroupDefinePane<CheckBoxGroup |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected CheckBoxGroup updateSubButtonGroupBean() { |
|
|
|
protected CheckBoxGroup updateSubButtonGroupBean() { |
|
|
|
CheckBoxGroup ob = (CheckBoxGroup) creator.toData(); |
|
|
|
CheckBoxGroup ob = (CheckBoxGroup) creator.toData(); |
|
|
|
ob.setReturnString(returnType.getSelectedIndex() == 1); |
|
|
|
checkBoxDictPane.update(ob); |
|
|
|
ob.setDictionary(this.dictPane.updateBean()); |
|
|
|
ob.setDictionary(this.dictPane.updateBean()); |
|
|
|
ob.setChooseAll(checkbox.isSelected()); |
|
|
|
ob.setChooseAll(checkbox.isSelected()); |
|
|
|
return ob; |
|
|
|
return ob; |
|
|
|