java.lang.Object
com.dua3.utility.fx.controls.Controls
Utility class for creating and managing UI controls.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Backgroundbackground(com.dua3.utility.data.Color color) static ButtonBuilder<Button> button()CreateButtonBuilderinstance for standard buttons.static CheckBoxButtonBuildercheckbox()CreateButtonBuilderinstance for checkboxes.static CheckBoxButtonBuildercheckbox(boolean selected) CreateButtonBuilderinstance for checkboxes.static CheckMenuItemcheckMenuItem(@Nullable String text, @Nullable Node graphic, Consumer<Boolean> action, boolean selected) Create newCheckMenuItem.static CheckMenuItemcheckMenuItem(@Nullable String text, @Nullable Node graphic, Property<Boolean> selected) Create newCheckMenuItem.static CheckMenuItemcheckMenuItem(@Nullable String text, @Nullable Node graphic, Property<Boolean> selected, boolean enabled) Create newCheckMenuItem.static CheckMenuItemcheckMenuItem(@Nullable String text, @Nullable Node graphic, Property<Boolean> selected, ObservableBooleanValue enabled) Create newCheckMenuItem.static CheckMenuItemcheckMenuItem(String text, Consumer<Boolean> action, boolean selected) Create newCheckMenuItem.static CheckMenuItemcheckMenuItem(String text, Property<Boolean> selected) Create newCheckMenuItem.static CheckMenuItemcheckMenuItem(String text, Property<Boolean> selected, boolean enabled) Create newCheckMenuItem.static CheckMenuItemcheckMenuItem(String text, Property<Boolean> selected, ObservableBooleanValue enabled) Create newCheckMenuItem.static FileInputBuilderfileInput(FileDialogMode mode) Creates a new FileInputBuilder instance with the given mode.static NodeGet graphic for an icon by icon name.static NodeGet graphic for an icon by icon name.static NodeGet graphic for an icon by icon name.static NodeGet graphic for an icon by icon name.static com.dua3.utility.fx.icons.IconGet icon by name.static LabelBuilderCreates and returns a new instance of LabelBuilder.static LabelBuilderlabel(ObservableValue<String> text) Creates and returns a new instance of LabelBuilder.static voidmakeResizable(Region region, int resizeMargin, Position... borders) Make a region resizable by dragging its edge.static voidmakeResizable(Region region, Position... borders) Make a region resizable by dragging its edge.static MenuCreate newMenu.static MenuCreate newMenu.static MenuItemCreate newMenuItem.static MenuItemCreate newMenuItem.static MenuItemmenuItem(@Nullable String text, @Nullable Node graphic, Runnable action, ObservableBooleanValue enabled) Create newMenuItem.static MenuItemCreate newMenuItem.static MenuItemCreate newMenuItem.static MenuItemmenuItem(String text, Runnable action, ObservableBooleanValue enabled) Create newMenuItem.static LabelrigidLabel(String text) Create a fixed minimum width label with the given text to prevent an ellipsis being displayed.static LabelrigidLabel(String text, Node node) Create a fixed minimum width label with the given text to prevent an ellipsis being display.static Nodeseparator(Orientation orientation) CreateSeparator.static SliderBuilderslider()CreateSliderBuilderinstance.static SliderBuilderslider(SliderWithButtons.Mode mode, BiFunction<Double, Double, String> formatter) CreateSliderBuilderinstance.static TextBuilderCreates and returns a new instance of TextBuilder.static TextBuildertext(ObservableValue<String> text) Creates and returns a new instance of TextBuilder.static TextFieldBuilderGet TextFieldBuilder for creating a TextField.static ToggleButtonBuilderCreateButtonBuilderinstance for toggle buttons.static ToggleButtonBuildertoggleButton(boolean selected) CreateButtonBuilderinstance for toggle buttons.static NodetooltipIcon(String name, int size, com.dua3.utility.data.Color color, String tooltipText) Create an Icon with a tooltip.static NodetooltipIcon(String name, int size, Paint paint, String tooltipText) Create an Icon with a tooltip.
-
Methodendetails
-
button
CreateButtonBuilderinstance for standard buttons.- Gibt zurück:
- new ButtonBuilder
-
toggleButton
CreateButtonBuilderinstance for toggle buttons.- Gibt zurück:
- new ButtonBuilder
-
toggleButton
CreateButtonBuilderinstance for toggle buttons.- Parameter:
selected- the initial selection state of the button- Gibt zurück:
- new ButtonBuilder
-
checkbox
CreateButtonBuilderinstance for checkboxes.- Gibt zurück:
- new ButtonBuilder
-
checkbox
CreateButtonBuilderinstance for checkboxes.- Parameter:
selected- the initial selection state of the button- Gibt zurück:
- new ButtonBuilder
-
fileInput
Creates a new FileInputBuilder instance with the given mode.- Parameter:
mode- theFileDialogModeof the file dialog- Gibt zurück:
- a new FileInputBuilder instance
-
slider
CreateSliderBuilderinstance.- Gibt zurück:
- new SliderBuilder
-
slider
public static SliderBuilder slider(SliderWithButtons.Mode mode, BiFunction<Double, Double, String> formatter) CreateSliderBuilderinstance.- Parameter:
mode- theSliderWithButtons.Modeformatter- the formatter that generates the label text; first argument is current value and second is max value- Gibt zurück:
- new SliderBuilder
-
separator
CreateSeparator.- Parameter:
orientation- the separator orientation- Gibt zurück:
- new
Separator
-
graphic
Get graphic for an icon by icon name.- Parameter:
name- the icon name- Gibt zurück:
- a node for the graphic
- Löst aus:
IllegalStateException- if no icon with a matching name is found- Siehe auch:
-
icon
Get icon by name.- Parameter:
name- the icon name- Gibt zurück:
- icon
- Löst aus:
IllegalStateException- if no icon with a matching name is found- Siehe auch:
-
rigidLabel
Create a fixed minimum width label with the given text to prevent an ellipsis being displayed.- Parameter:
text- the text to display on the label- Gibt zurück:
- a new Label instance with fixed miimum width
- Siehe auch:
-
rigidLabel
Create a fixed minimum width label with the given text to prevent an ellipsis being display.- Parameter:
text- the text to display on the labelnode- the node to display on the label- Gibt zurück:
- a new Label instance with fixed miimum width
- Siehe auch:
-
graphic
Get graphic for an icon by icon name.- Parameter:
name- the icon namesize- the requested size- Gibt zurück:
- a node for the graphic
- Löst aus:
IllegalStateException- if no icon with a matching name is found- Siehe auch:
-
graphic
Get graphic for an icon by icon name.- Parameter:
name- the icon namesize- the requested sizepaint- thePaintto use- Gibt zurück:
- a node for the graphic
- Löst aus:
IllegalStateException- if no icon with a matching name is found- Siehe auch:
-
graphic
Get graphic for an icon by icon name.- Parameter:
name- the icon namesize- the requested sizecolor- theColorto use- Gibt zurück:
- a node for the graphic
- Löst aus:
IllegalStateException- if no icon with a matching name is found- Siehe auch:
-
tooltipIcon
Create an Icon with a tooltip.- Parameter:
name- the icon namesize- the requested sizepaint- thePaintto usetooltipText- the text to display as tooltip- Gibt zurück:
- a node for the graphic
- Löst aus:
IllegalStateException- if no icon with a matching name is found- Siehe auch:
-
tooltipIcon
public static Node tooltipIcon(String name, int size, com.dua3.utility.data.Color color, String tooltipText) Create an Icon with a tooltip.- Parameter:
name- the icon namesize- the requested sizecolor- theColorto usetooltipText- the text to display as tooltip- Gibt zurück:
- a node for the graphic
- Löst aus:
IllegalStateException- if no icon with a matching name is found- Siehe auch:
-
textField
Get TextFieldBuilder for creating a TextField.- Gibt zurück:
- TextFieldBuilder instance
-
makeResizable
Make a region resizable by dragging its edge.- Parameter:
region- the regionborders- the borders to make draggable
-
makeResizable
Make a region resizable by dragging its edge.- Parameter:
region- the regionresizeMargin- size of the draggable marginborders- the borders to make draggable
-
checkMenuItem
Create newCheckMenuItem.- Parameter:
text- the text to showaction- the action to perform when the menu item is invoked- Gibt zurück:
- new menu item
-
checkMenuItem
public static CheckMenuItem checkMenuItem(@Nullable String text, @Nullable Node graphic, Consumer<Boolean> action, boolean selected) Create newCheckMenuItem.- Parameter:
text- the text to showgraphic- the graphic to show before the textaction- the action to perform when the menu item is invoked- Gibt zurück:
- new menu item
-
checkMenuItem
Create newCheckMenuItem.- Parameter:
text- the text to showselected- the property controlling the selected state- Gibt zurück:
- new menu item
-
checkMenuItem
public static CheckMenuItem checkMenuItem(@Nullable String text, @Nullable Node graphic, Property<Boolean> selected) Create newCheckMenuItem.- Parameter:
text- the text to showgraphic- the graphic to show before the textselected- the property controlling the selected state- Gibt zurück:
- new menu item
-
checkMenuItem
public static CheckMenuItem checkMenuItem(String text, Property<Boolean> selected, ObservableBooleanValue enabled) Create newCheckMenuItem.- Parameter:
text- the text to showselected- the property controlling the selected stateenabled- the property controlling the enabled state- Gibt zurück:
- new menu item
-
checkMenuItem
Create newCheckMenuItem.NOTE: the
enabledstate is permanent. Use this method only for menus where the menu state will not be changed, for example, in context menus. If the state is dynamic, use the overload taking anObservableBooleanValueinstead.- Parameter:
text- the text to showselected- the property controlling the selected stateenabled- the enabled state- Gibt zurück:
- new menu item
-
checkMenuItem
public static CheckMenuItem checkMenuItem(@Nullable String text, @Nullable Node graphic, Property<Boolean> selected, ObservableBooleanValue enabled) Create newCheckMenuItem.- Parameter:
text- the text to showgraphic- the graphic to show before the textselected- the property controlling the selected stateenabled- the property controlling the enabled state- Gibt zurück:
- new menu item
-
checkMenuItem
public static CheckMenuItem checkMenuItem(@Nullable String text, @Nullable Node graphic, Property<Boolean> selected, boolean enabled) Create newCheckMenuItem.NOTE: the
enabledstate is permanent. Use this method only for menus where the menu state will not be changed, for example, in context menus. If the state is dynamic, use the overload taking anObservableBooleanValueinstead.- Parameter:
text- the text to showgraphic- the graphic to show before the textselected- the property controlling the selected stateenabled- the enabled state- Gibt zurück:
- new menu item
-
text
Creates and returns a new instance of TextBuilder.- Gibt zurück:
- a new instance of TextBuilder.
-
text
Creates and returns a new instance of TextBuilder.- Gibt zurück:
- a new instance of TextBuilder.
-
label
Creates and returns a new instance of LabelBuilder.- Gibt zurück:
- a new instance of LabelBuilder.
-
label
Creates and returns a new instance of LabelBuilder.- Gibt zurück:
- a new instance of LabelBuilder.
-
background
-