Module is.codion.swing.common.ui
Interface FilterTableCellEditor.Builder<C extends JComponent,T>
- Type Parameters:
C- the component typeT- the cell type
- Enclosing interface:
FilterTableCellEditor<C extends JComponent,T>
public static interface FilterTableCellEditor.Builder<C extends JComponent,T>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuild()cellEditable(Function<EventObject, Boolean> cellEditable) OverridesclickCountToStart(int)clickCountToStart(int clickCountToStart) Default specified byFilterTableCellEditor.CLICK_COUNT_TO_START.configure(Consumer<FilterTableCellEditor<C, T>> cellEditor) For custom or composite components, this method can be used to configure the component, for example to stop editing, which may not work properly if the component isn't a direct descendant of the typical Swing components (JTextField,JComboBox, etc.).resizeRow(boolean resizeRow) Configures whether this editor should request the row to be resized to accommodate the editor compoent size.shouldSelectCell(Function<EventObject, Boolean> shouldSelectCell) stopCellEditing(Function<@Nullable T, Boolean> stopCellEditing)
-
Method Details
-
cellEditable
OverridesclickCountToStart(int)- Parameters:
cellEditable- a function specifying if a cell is editable- Returns:
- this builder
- See Also:
-
shouldSelectCell
- Parameters:
shouldSelectCell- a function specifying if the editing cell should be selected- Returns:
- this builder
- See Also:
-
stopCellEditing
- Parameters:
stopCellEditing- a function specifying whether cell editing can be stopped, receives the current editor value- Returns:
- this builder
- See Also:
-
clickCountToStart
Default specified byFilterTableCellEditor.CLICK_COUNT_TO_START.Mote that when using
JCheckBoxbased editors setting this to 1 is usually preferred.- Parameters:
clickCountToStart- specifies the number of clicks needed to start editing- Returns:
- this builder
- See Also:
-
resizeRow
Configures whether this editor should request the row to be resized to accommodate the editor compoent size.
Note that this setting is for overriding the default one, set via the global
FilterTable.RESIZE_ROW_TO_FIT_EDITORconfiguration setting orFilterTable.Builder.resizeRowToFitEditor(boolean)for a specific table instance.- Returns:
- this builder
-
configure
For custom or composite components, this method can be used to configure the component, for example to stop editing, which may not work properly if the component isn't a direct descendant of the typical Swing components (JTextField,JComboBox, etc.).- Parameters:
cellEditor- receives the cell editor for configuring- Returns:
- this builder
-
build
FilterTableCellEditor<C,T> build()- Returns:
- a new
FilterTableCellEditorbased on this builder
-