Module is.codion.swing.framework.ui
Package is.codion.swing.framework.ui
Class EditorComponents.CreateComponents
java.lang.Object
is.codion.swing.framework.ui.EditorComponents.CreateComponents
- Enclosing interface:
EditorComponents
Creates
SwingEntityEditor based components-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classA factory for list builders for list based attributes. -
Method Summary
Modifier and TypeMethodDescriptionbigDecimalField(Attribute<BigDecimal> attribute) Creates a builder for big decimal fields.bigIntegerField(Attribute<BigInteger> attribute) Creates a builder for big integer fields.booleanComboBox(Attribute<Boolean> attribute) Creates a builder for boolean combo boxes.Creates a builder for check boxes for non-nullable attributes.<T,C extends JComboBox<T>, B extends ComboBoxBuilder<C, T, B>>
ComboBoxBuilder<C, T, B> comboBox(Attribute<T> attribute, ComboBoxModel<T> comboBoxModel) Creates a builder for combo boxes.<T,C extends JComboBox<T>, B extends ComboBoxBuilder<C, T, B>>
ComboBoxBuilder<C, T, B> Creates a builder for a combo box, containing the values of the given column.comboBox(ForeignKey foreignKey) Creates a builder for foreign key combo boxes.comboBoxPanel(ForeignKey foreignKey, Supplier<EntityEditPanel> editPanel) Creates a builder for a foreign key combo box panel with optional buttons for adding and editing items.doubleField(Attribute<Double> attribute) Creates a builder for double fields.doubleSpinner(Attribute<Double> attribute) Creates a builder for a spinner<T extends Enum<T>,C extends JComboBox<T>, B extends ComboBoxBuilder<C, T, B>>
ComboBoxBuilder<C, T, B> enumComboBox(Column<T> column) Creates a builder for an enum based combo box.inputPanel(Attribute<?> attribute) Creates a panel containing a label and the component associated with the given attribute.integerField(Attribute<Integer> attribute) Creates a builder for integer fields.integerSpinner(Attribute<Integer> attribute) Creates a builder for a spinner<T> ItemComboBoxBuilder<T> itemComboBox(Attribute<T> attribute) Creates a builder for value item list combo boxes.<T> ItemSpinnerBuilder<T> itemSpinner(Attribute<T> attribute) Creates a builder for a list spinner<T> LabelBuilder<T> Creates a builder for labels.list(FilterListModel<T> listModel) Creates a list builder factory<T> ListSpinnerBuilder<T> listSpinner(Attribute<T> attribute, SpinnerListModel spinnerListModel) Creates a builder for a list spinnerCreates a builder for long fields.maskedTextField(Attribute<String> attribute) Creates a builder for formatted text fields.nullableCheckBox(Attribute<Boolean> attribute) Creates a builder for nullable check boxes.searchField(ForeignKey foreignKey) Creates a builder for foreign key search fields.searchFieldPanel(ForeignKey foreignKey, Supplier<EntityEditPanel> editPanel) Creates a builder for a foreign key search field panel with optional buttons for adding and editing items.Creates a builder for a slider<T extends Temporal>
TemporalField.Builder<T> temporalField(Attribute<T> attribute) Creates a builder for temporal fields.<T extends Temporal>
TemporalFieldPanel.Builder<T> temporalFieldPanel(Attribute<T> attribute) Creates a builder for temporal field panels.Creates a builder for text areas.<T,C extends JTextField, B extends TextFieldBuilder<C, T, B>>
TextFieldBuilder<C, T, B> Creates a builder for text fields.<B extends TextFieldBuilder<JTextField,Entity, B>>
TextFieldBuilder<JTextField, Entity, B> textField(ForeignKey foreignKey) Creates a builder for a read-only, non-focusable foreign key text field.textFieldPanel(Attribute<String> attribute) Creates a builder for text field panels.
-
Method Details
-
textArea
Creates a builder for text areas.- Parameters:
attribute- the attribute for which to build a text area- Returns:
- a text area builder
-
textFieldPanel
Creates a builder for text field panels.- Parameters:
attribute- the attribute for which to build a text field panel- Returns:
- a text field panel builder
-
temporalFieldPanel
public <T extends Temporal> TemporalFieldPanel.Builder<T> temporalFieldPanel(Attribute<T> attribute) Creates a builder for temporal field panels.- Type Parameters:
T- the temporal type- Parameters:
attribute- the attribute for which to build a temporal field panel- Returns:
- a text area builder
-
textField
public <T,C extends JTextField, TextFieldBuilder<C,B extends TextFieldBuilder<C, T, B>> T, textFieldB> (Attribute<T> attribute) Creates a builder for text fields.- Type Parameters:
T- the value typeC- the text field typeB- the builder type- Parameters:
attribute- the attribute for which to build a text field- Returns:
- a text field builder
-
temporalField
Creates a builder for temporal fields.- Type Parameters:
T- the temporal type- Parameters:
attribute- the attribute for which to build a temporal field- Returns:
- an offset date time field builder
-
slider
Creates a builder for a slider- Parameters:
attribute- the attribute- Returns:
- a slider builder
-
integerSpinner
Creates a builder for a spinner- Parameters:
attribute- the attribute- Returns:
- a spinner builder
-
doubleSpinner
Creates a builder for a spinner- Parameters:
attribute- the attribute- Returns:
- a spinner builder
-
listSpinner
public <T> ListSpinnerBuilder<T> listSpinner(Attribute<T> attribute, SpinnerListModel spinnerListModel) Creates a builder for a list spinner- Type Parameters:
T- the value type- Parameters:
attribute- the attributespinnerListModel- the spinner model- Returns:
- a spinner builder
-
itemSpinner
Creates a builder for a list spinner- Type Parameters:
T- the value type- Parameters:
attribute- the attribute- Returns:
- a spinner builder
-
integerField
Creates a builder for integer fields.- Parameters:
attribute- the attribute for which to build a text field- Returns:
- an integer field builder
-
longField
Creates a builder for long fields.- Parameters:
attribute- the attribute for which to build a text field- Returns:
- a long field builder
-
bigIntegerField
Creates a builder for big integer fields.- Parameters:
attribute- the attribute for which to build a text field- Returns:
- a big integer field builder
-
doubleField
Creates a builder for double fields.- Parameters:
attribute- the attribute for which to build a text field- Returns:
- a double field builder
-
bigDecimalField
Creates a builder for big decimal fields.- Parameters:
attribute- the attribute for which to build a text field- Returns:
- a big decimal field builder
-
maskedTextField
Creates a builder for formatted text fields.- Parameters:
attribute- the attribute for which to build a formatted text field- Returns:
- a formatted text field builder
-
checkBox
Creates a builder for check boxes for non-nullable attributes.- Parameters:
attribute- the attribute for which to build a check-box- Returns:
- a check-box builder
-
nullableCheckBox
Creates a builder for nullable check boxes.- Parameters:
attribute- the attribute for which to build a check-box- Returns:
- a check-box builder
-
booleanComboBox
Creates a builder for boolean combo boxes.- Parameters:
attribute- the attribute for which to build boolean combo box- Returns:
- a boolean combo box builder
-
comboBox
public <T,C extends JComboBox<T>, ComboBoxBuilder<C,B extends ComboBoxBuilder<C, T, B>> T, comboBoxB> (Attribute<T> attribute, ComboBoxModel<T> comboBoxModel) Creates a builder for combo boxes.- Type Parameters:
T- the value typeC- the component typeB- the builder type- Parameters:
attribute- the attribute for which to build combo boxcomboBoxModel- the combo box model- Returns:
- a combo box builder
-
itemComboBox
Creates a builder for value item list combo boxes.- Type Parameters:
T- the value type- Parameters:
attribute- the attribute for which to build a value list combo box- Returns:
- a value item list combo box builder
-
label
Creates a builder for labels.- Type Parameters:
T- the value type- Parameters:
attribute- the attribute for which to build a label- Returns:
- a label builder
-
comboBox
public <T,C extends JComboBox<T>, ComboBoxBuilder<C,B extends ComboBoxBuilder<C, T, B>> T, comboBoxB> (Column<T> column) Creates a builder for a combo box, containing the values of the given column.- Type Parameters:
T- the value typeC- the component typeB- the builder type- Parameters:
column- the column for which to build a combo box- Returns:
- a combo box builder
-
enumComboBox
public <T extends Enum<T>,C extends JComboBox<T>, ComboBoxBuilder<C,B extends ComboBoxBuilder<C, T, B>> T, enumComboBoxB> (Column<T> column) Creates a builder for an enum based combo box.- Type Parameters:
T- the value typeC- the component typeB- the builder type- Parameters:
column- the column for which to build a combo box- Returns:
- a combo box builder
-
comboBox
Creates a builder for foreign key combo boxes.- Parameters:
foreignKey- the foreign key for which to build a combo box- Returns:
- a foreign key combo box builder
-
comboBoxPanel
public EntityComboBoxPanel.Builder comboBoxPanel(ForeignKey foreignKey, Supplier<EntityEditPanel> editPanel) Creates a builder for a foreign key combo box panel with optional buttons for adding and editing items.- Parameters:
foreignKey- the foreign keyeditPanel- supplies the edit panel to use for the add and/or edit buttons- Returns:
- a foreign key combo box panel builder
-
searchField
Creates a builder for foreign key search fields.- Parameters:
foreignKey- the foreign key for which to build a search field- Returns:
- a foreign key search field builder
-
searchFieldPanel
public EntitySearchFieldPanel.SingleSelectionBuilder searchFieldPanel(ForeignKey foreignKey, Supplier<EntityEditPanel> editPanel) Creates a builder for a foreign key search field panel with optional buttons for adding and editing items.- Parameters:
foreignKey- the foreign keyeditPanel- the edit panel supplier to use for the add and/or edit buttons- Returns:
- a foreign key combo box panel builder
-
textField
public <B extends TextFieldBuilder<JTextField,Entity, TextFieldBuilder<JTextField,B>> Entity, textFieldB> (ForeignKey foreignKey) Creates a builder for a read-only, non-focusable foreign key text field.- Type Parameters:
B- the builder type- Parameters:
foreignKey- the foreign key for which to build a text field- Returns:
- a foreign key text field builder
-
list
public <T> EditorComponents.CreateComponents.FilterListBuilderFactory<T> list(FilterListModel<T> listModel) Creates a list builder factory- Type Parameters:
T- the value type- Parameters:
listModel- the list model to base the list on- Returns:
- a list builder factory
-
inputPanel
Creates a panel containing a label and the component associated with the given attribute. The label text is the caption defined forattribute. The default layout of the resulting panel is with the label on top and inputComponent below.- Parameters:
attribute- the attribute from which definition to retrieve the label caption- Returns:
- a panel containing a label and a component
- Throws:
IllegalArgumentException- in case no component has been associated with the given attribute
-