|
|
@ -1,7 +1,6 @@ |
|
|
|
package com.fr.design.gui.core; |
|
|
|
package com.fr.design.gui.core; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
import com.fr.base.svg.IconUtils; |
|
|
|
|
|
|
|
import com.fr.form.ui.Button; |
|
|
|
import com.fr.form.ui.Button; |
|
|
|
import com.fr.form.ui.CheckBox; |
|
|
|
import com.fr.form.ui.CheckBox; |
|
|
|
import com.fr.form.ui.CheckBoxGroup; |
|
|
|
import com.fr.form.ui.CheckBoxGroup; |
|
|
@ -26,9 +25,12 @@ import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.WidgetConfig; |
|
|
|
import com.fr.form.ui.WidgetConfig; |
|
|
|
import com.fr.form.ui.WidgetInfoConfig; |
|
|
|
import com.fr.form.ui.WidgetInfoConfig; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.Icon; |
|
|
|
import java.io.Serializable; |
|
|
|
import java.io.Serializable; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import javax.swing.Icon; |
|
|
|
|
|
|
|
|
|
|
|
import static com.fr.design.i18n.Toolkit.i18nText; |
|
|
|
|
|
|
|
|
|
|
|
public abstract class WidgetOption implements Serializable { |
|
|
|
public abstract class WidgetOption implements Serializable { |
|
|
|
|
|
|
|
|
|
|
@ -123,7 +125,7 @@ public abstract class WidgetOption implements Serializable { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static WidgetOption[] getReportWidgetInstance() { |
|
|
|
public static WidgetOption[] getReportWidgetInstance() { |
|
|
|
return new WidgetOption[]{TEXTEDITOR, TEXTAREA, NUMBEREDITOR, PASSWORD, BUTTON, CHECKBOX, RADIOGROUP, CHECKBOXGROUP, COMBOBOX, |
|
|
|
return new WidgetOption[]{TEXTEDITOR, TEXTAREA, NUMBEREDITOR, PASSWORD, BUTTON, CHECKBOX, RADIOGROUP, CHECKBOXGROUP, COMBOBOX, |
|
|
|
COMBOCHECKBOX, DATEEDITOR, MULTI_FILEEDITOR, LIST, IFRAMEDITOR, TREECOMBOBOX, TREE}; |
|
|
|
COMBOCHECKBOX, DATEEDITOR, MULTI_FILEEDITOR, LIST, IFRAMEDITOR, TREECOMBOBOX, TREE}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -144,79 +146,102 @@ public abstract class WidgetOption implements Serializable { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static WidgetOption[] getFormWidgetIntance() { |
|
|
|
public static WidgetOption[] getFormWidgetIntance() { |
|
|
|
return new WidgetOption[]{TEXTEDITOR, LABEL, FREEBUTTON, COMBOBOX, COMBOCHECKBOX, DATEEDITOR, |
|
|
|
return new WidgetOption[]{TEXTEDITOR, LABEL, FREEBUTTON, COMBOBOX, COMBOCHECKBOX, DATEEDITOR, |
|
|
|
NUMBEREDITOR, TREECOMBOBOX, RADIOGROUP, CHECKBOXGROUP, TEXTAREA, PASSWORD, CHECKBOX, TREE, MULTI_FILEEDITOR,PICTURE}; |
|
|
|
NUMBEREDITOR, TREECOMBOBOX, RADIOGROUP, CHECKBOXGROUP, TEXTAREA, PASSWORD, CHECKBOX, TREE, MULTI_FILEEDITOR, PICTURE}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption DATEEDITOR = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Date"), |
|
|
|
public static final WidgetOption DATEEDITOR = WidgetOptionFactory.createByWidgetClass( |
|
|
|
"/com/fr/design/images/buttonicon/widget/date_16", |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Date"), |
|
|
|
|
|
|
|
"date", |
|
|
|
DateEditor.class); |
|
|
|
DateEditor.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption TREE = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_View_Tree"), |
|
|
|
public static final WidgetOption TREE = WidgetOptionFactory.createByWidgetClass( |
|
|
|
"/com/fr/design/images/buttonicon/widget/tree_16", TreeEditor.class); |
|
|
|
i18nText("Fine-Design_Report_View_Tree"), |
|
|
|
|
|
|
|
"tree", |
|
|
|
|
|
|
|
TreeEditor.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption TREECOMBOBOX = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Tree_ComboBox"), "/com/fr/design/images/buttonicon/widget/comboboxtree16", |
|
|
|
public static final WidgetOption TREECOMBOBOX = WidgetOptionFactory.createByWidgetClass( |
|
|
|
|
|
|
|
i18nText("Fine-Design_Report_Tree_ComboBox"), |
|
|
|
|
|
|
|
"comboboxtree", |
|
|
|
TreeComboBoxEditor.class); |
|
|
|
TreeComboBoxEditor.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption CHECKBOXGROUP = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption CHECKBOXGROUP = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Checkbox_Group"), "/com/fr/design/images/buttonicon/widget/checkbox_group_16", CheckBoxGroup.class); |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Checkbox_Group"), |
|
|
|
|
|
|
|
"checkbox_group", |
|
|
|
|
|
|
|
CheckBoxGroup.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption RADIOGROUP = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption RADIOGROUP = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Radio_Group"), "/com/fr/design/images/buttonicon/widget/button_group_16", |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Radio_Group"), |
|
|
|
|
|
|
|
"button_group", |
|
|
|
RadioGroup.class); |
|
|
|
RadioGroup.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption NUMBEREDITOR = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption NUMBEREDITOR = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Number"), "/com/fr/design/images/buttonicon/widget/number_field_16", NumberEditor.class); |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Number"), |
|
|
|
|
|
|
|
"number_field", |
|
|
|
|
|
|
|
NumberEditor.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption LABEL = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption LABEL = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Label"), "/com/fr/design/images/buttonicon/widget/label_16", |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Label"), |
|
|
|
|
|
|
|
"label", |
|
|
|
Label.class); |
|
|
|
Label.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption BUTTON = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption BUTTON = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Button"), BaseUtils.readIcon("/com/fr/web/images/form/resources/button_16.png"), |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Button"), |
|
|
|
|
|
|
|
"button", |
|
|
|
Button.class); |
|
|
|
Button.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption FREEBUTTON = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption FREEBUTTON = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Button"), "/com/fr/design/images/buttonicon/widget/button_16", |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Button"), |
|
|
|
|
|
|
|
"button", |
|
|
|
FreeButton.class); |
|
|
|
FreeButton.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption MULTI_FILEEDITOR = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption MULTI_FILEEDITOR = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_File"), "/com/fr/design/images/buttonicon/widget/files_up", |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_File"), |
|
|
|
|
|
|
|
"files_up", |
|
|
|
MultiFileEditor.class); |
|
|
|
MultiFileEditor.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption COMBOBOX = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption COMBOBOX = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Combo_Box"), "/com/fr/design/images/buttonicon/widget/combo_box_16", |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Combo_Box"), |
|
|
|
|
|
|
|
"combo_box", |
|
|
|
ComboBox.class); |
|
|
|
ComboBox.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption COMBOCHECKBOX = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption COMBOCHECKBOX = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Combo_Checkbox"), "/com/fr/design/images/buttonicon/widget/combo_check_16", |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Combo_Checkbox"), |
|
|
|
|
|
|
|
"combo_check", |
|
|
|
ComboCheckBox.class); |
|
|
|
ComboCheckBox.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption CHECKBOX = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption CHECKBOX = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Checkbox"), "/com/fr/design/images/buttonicon/widget/check_box_16", |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Checkbox"), |
|
|
|
|
|
|
|
"check_box", |
|
|
|
CheckBox.class); |
|
|
|
CheckBox.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption LIST = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption LIST = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_List"), BaseUtils.readIcon("/com/fr/web/images/form/resources/list_16.png"), |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_List"), |
|
|
|
|
|
|
|
BaseUtils.readIcon("/com/fr/web/images/form/resources/list_16.png"), |
|
|
|
ListEditor.class); |
|
|
|
ListEditor.class); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption TEXTEDITOR = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption TEXTEDITOR = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Text") |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Text"), |
|
|
|
, "/com/fr/design/images/buttonicon/widget/text_field_16", |
|
|
|
"text_field", |
|
|
|
TextEditor.class); |
|
|
|
TextEditor.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption TEXTAREA = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption TEXTAREA = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Textarea"), "/com/fr/design/images/buttonicon/widget/text_area_16", |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Textarea"), |
|
|
|
|
|
|
|
"text_area", |
|
|
|
TextArea.class); |
|
|
|
TextArea.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption PASSWORD = WidgetOptionFactory.createByWidgetClass( |
|
|
|
public static final WidgetOption PASSWORD = WidgetOptionFactory.createByWidgetClass( |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Password"), |
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Password"), |
|
|
|
"/com/fr/design/images/buttonicon/widget/password_field_16", Password.class); |
|
|
|
"password_field", Password.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption IFRAMEDITOR = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Form_Iframe"), BaseUtils.readIcon("/com/fr/web/images/form/resources/iframe_16.png"), |
|
|
|
public static final WidgetOption IFRAMEDITOR = WidgetOptionFactory.createByWidgetClass( |
|
|
|
|
|
|
|
i18nText("Fine-Design_Report_Form_Iframe"), |
|
|
|
|
|
|
|
"iframe", |
|
|
|
IframeEditor.class); |
|
|
|
IframeEditor.class); |
|
|
|
|
|
|
|
|
|
|
|
public static final WidgetOption PICTURE = WidgetOptionFactory.createByWidgetClass(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Type_Image"), IconUtils.readIcon("/com/fr/web/images/form/resources/picture_widget_16.png"), |
|
|
|
public static final WidgetOption PICTURE = WidgetOptionFactory.createByWidgetClass( |
|
|
|
|
|
|
|
i18nText("Fine-Design_Basic_Widget_Type_Image"), |
|
|
|
|
|
|
|
"picture", |
|
|
|
PictureWidget.class); |
|
|
|
PictureWidget.class); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|