Klasse UiBuilder<C extends UiContainer<C>>

java.lang.Object
de.esoco.process.ui.UiBuilder<C>

public class UiBuilder<C extends UiContainer<C>> extends Object
Provides factory methods that build UI components in a container.
  • Konstruktordetails

    • UiBuilder

      public UiBuilder(C container)
      Creates a new instance.
      Parameter:
      container - The container to build the UI in
  • Methodendetails

    • add

      public <T, V extends UiComponent<T, V>> V add(Function<C,? extends V> create)
      Adds an arbitrary component to this container by applying a factory function to this builder's container. This allows to add components which don't have an explicit factory method in the builder API.

      It is recommended to create custom components as subclasses of generic types like UiComposite because otherwise the Java type system may not be able to resolve the correct generic type when using this method.

      Parameter:
      create - The factory function
      Gibt zurück:
      The new component
    • addButton

      public UiButton addButton(String label)
      Adds a clickable button.
      Parameter:
      label - The button label
      Gibt zurück:
      The new component
    • addCalendar

      public UiCalendar addCalendar(Date date)
      Adds a date selector. By default it only provides a calendar date input but an additional time of day selector can be enabled with the method UiDateInputField.withTimeInput().
      Parameter:
      date - The initial date value or NULL for the current date
      Gibt zurück:
      The new component
    • addCard

      public UiCard addCard(UiImageDefinition<?> titleImage)
      Adds a card panel with a title image.
      Parameter:
      titleImage - The card title image
      Gibt zurück:
      The new card
    • addCard

      public UiCard addCard(UiImageDefinition<?> titleImage, String title)
      Adds a card panel with a title image and title text inside the image.
      Parameter:
      titleImage - The title image
      title - The title text
      Gibt zurück:
      The new card
    • addCard

      public UiCard addCard(String title, UiIconSupplier icon)
      Adds a card panel.
      Parameter:
      title - The card title (NULL for none)
      icon - The title icon (NULL for none)
      Gibt zurück:
      The new card
    • addCheckBox

      public UiCheckBox addCheckBox(String label)
      Adds a single check boxes that represents a boolean value.
      Parameter:
      label - The check box label
      Gibt zurück:
      The new component
    • addCheckBoxes

      public UiCheckBoxes<String> addCheckBoxes(String... labels)
      Adds a group of check boxes with string labels.
      Parameter:
      labels - The initial check box labels (may be empty)
      Gibt zurück:
      The new component
    • addCheckBoxes

      public <E extends Enum<E>> UiCheckBoxes<E> addCheckBoxes(Class<E> enumType)
      Adds a group of check boxes with labels derived from an enum. All enum values of the given type will be pre-set as check boxes.
      Parameter:
      enumType - The enum class for the check box labels
      Gibt zurück:
      The new component
    • addComboBox

      public UiComboBox addComboBox(String text)
      Adds a single-line text input field with a drop-down list of value suggestions.
      Parameter:
      text - The text to edit
      Gibt zurück:
      The new component
    • addDataTable

      public <E extends Entity> UiDataTable addDataTable(Collection<HierarchicalDataObject> data, Collection<de.esoco.lib.model.ColumnDefinition> columns)
      Adds a table that displays static data.
      Parameter:
      data - The data objects to display
      columns - The data columns to display
      Gibt zurück:
      The new component
    • addDateField

      public UiDateField addDateField(Date date)
      Adds a date input field with a pop-up date selector. By default it accepts only date input but additional time input can be enabled with UiDateInputField.withTimeInput().
      Parameter:
      date - The initial value or NULL for the current date
      Gibt zurück:
      The new component
    • addDecimalField

      public UiDecimalField addDecimalField(BigDecimal value)
      Adds an input field for decimal values.
      Parameter:
      value - The initial value
      Gibt zurück:
      The new component
    • addDeckPanel

      public UiDeckPanel addDeckPanel()
      Adds a deck panel.
      Gibt zurück:
      The new panel
    • addDockPanel

      public UiDockPanel addDockPanel(de.esoco.lib.property.Orientation orientation)
      Adds a dock panel.
      Parameter:
      orientation - The panel orientation
      Gibt zurück:
      The new panel
    • addDropDown

      public <T> UiDropDown<T> addDropDown(Class<T> datatype)
      Adds a single-line field with a list of selectable elements. If the datatype is an enum all enum values will be pre-set as the list values.
      Parameter:
      datatype - The datatype of the list elements
      Gibt zurück:
      The new component
    • addFileSelect

      public UiFileUpload addFileSelect(String label)
      Adds a file upload component.
      Parameter:
      label - The label text
      Gibt zurück:
      The new component
    • addFragment

      public UiSubFragment addFragment(InteractionFragment fragment, UiLayout layout)
      Adds an arbitrary process interaction fragment to this container. This allows to use fragments in conjunction with process UIs.
      Parameter:
      fragment - iconSupplier The icon supplier
      layout - The layout to embed the fragment in
      Gibt zurück:
      The new component
    • addIcon

      public UiIcon addIcon(UiIconSupplier iconSupplier)
      Adds a non-interactive icon.
      Parameter:
      iconSupplier - The icon supplier
      Gibt zurück:
      The new component
    • addIconButton

      public UiIconButton addIconButton(UiIconSupplier icon)
      Adds a clickable icon button.
      Parameter:
      icon - The button icon
      Gibt zurück:
      The new component
    • addImage

      public UiImage addImage(UiImageDefinition<?> image)
      Adds an image.
      Parameter:
      image - The image definition
      Gibt zurück:
      The new component
    • addIntegerField

      public UiIntegerField addIntegerField(int value)
      Adds an integer input field. To allow only the input of a certain value range with spinner controls UiIntegerField.withBounds(int, int) can be invoked on it.
      Parameter:
      value - The initial value
      Gibt zurück:
      The new component
    • addLabel

      public UiLabel addLabel(String text)
      Adds a non-interactive label.
      Parameter:
      text - The label text
      Gibt zurück:
      The new component
    • addLink

      public UiLink addLink(String label)
      Adds a clickable link.
      Parameter:
      label - The link label
      Gibt zurück:
      The new component
    • addList

      public UiList<String> addList()
      Adds a list of selectable strings.
      Gibt zurück:
      The new component
    • addList

      public <E extends Enum<E>> UiList<E> addList(Class<E> enumType)
      Adds a list of selectable enum values. All enum values of the given type will be pre-set as the list values.
      Parameter:
      enumType - enumClass The enum class of the list values
      Gibt zurück:
      The new component
    • addListPanel

      public UiListPanel addListPanel()
      Adds a list of selectable strings.
      Gibt zurück:
      The new component
    • addMultiSelectionList

      public UiMultiSelectionList<String> addMultiSelectionList()
      Adds a list of strings that allows to select multiple values.
      Gibt zurück:
      The new component
    • addMultiSelectionList

      public <E extends Enum<E>> UiMultiSelectionList<E> addMultiSelectionList(Class<E> enumType)
      Adds a list of enums that allows to select multiple values. All enum values of the given type will be pre-set as the list values.
      Parameter:
      enumType - enumClass The enum for the list values
      Gibt zurück:
      The new component
    • addPanel

      public UiLayoutPanel addPanel(UiLayout layout)
      Adds a panel with a certain layout.
      Parameter:
      layout - The panel layout
      Gibt zurück:
      The new panel
    • addPasswordField

      public UiPasswordField addPasswordField(String text)
      Adds a single-line text input field that hides the input.
      Parameter:
      text - The text to edit
      Gibt zurück:
      The new component
    • addPhoneNumberField

      public UiPhoneNumberField addPhoneNumberField(String phoneNumber)
      Adds a single-line text input field for the input of international phone numbers.
      Parameter:
      phoneNumber - The phone number to edit
      Gibt zurück:
      The new component
    • addProgressBar

      public UiProgressBar addProgressBar()
      Adds a progress bar. The integer value of the bar defines the current progress in relation to the progress bar bounds. These default to 0 and 100 and can be changed with UiProgressBar.withBounds(int, int).
      Gibt zurück:
      The new component
    • addPushButtons

      public UiPushButtons<String> addPushButtons(String... buttonLabels)
      Adds a group of push buttons with string labels.
      Parameter:
      buttonLabels - The initial button labels (may be empty)
      Gibt zurück:
      The new component
    • addPushButtons

      public <E extends Enum<E>> UiPushButtons<E> addPushButtons(Class<E> enumType)
      Adds a group of push buttons with labels derived from an enum. All enum values of the given type will be pre-set as buttons.
      Parameter:
      enumType - The enum class for the button labels
      Gibt zurück:
      The new component
    • addQueryTable

      public <E extends Entity> UiQueryTable<E> addQueryTable(Class<E> entityType)
      Adds a table that performs an entity query.
      Parameter:
      entityType - The entity type to display
      Gibt zurück:
      The new component
    • addRadioButtons

      public UiRadioButtons<String> addRadioButtons(String... buttonLabels)
      Adds a group of radio buttons with string labels.
      Parameter:
      buttonLabels - The initial button labels (may be empty)
      Gibt zurück:
      The new component
    • addRadioButtons

      public <E extends Enum<E>> UiRadioButtons<E> addRadioButtons(Class<E> enumType)
      Adds a group of radio buttons with labels derived from an enum. All enum values of the given type will be pre-set as buttons.
      Parameter:
      enumType - The enum class for the button labels
      Gibt zurück:
      The new component
    • addSplitPanel

      public UiSplitPanel addSplitPanel(de.esoco.lib.property.Orientation orientation)
      Adds a split panel.
      Parameter:
      orientation - The panel orientation
      Gibt zurück:
      The new panel
    • addStackPanel

      public UiStackPanel addStackPanel()
      Adds a stack panel.
      Gibt zurück:
      The new panel
    • addSubProcess

      public UiSubFragment addSubProcess(Class<? extends ProcessDefinition> subProcessClass, UiLayout layout)
      Adds an interactive sub-process to be rendered in a sub-fragment of this container.
      Parameter:
      subProcessClass - The sub-process definition class
      layout - The layout of the sub-process fragment
      Gibt zurück:
      The new component
    • addTabPanel

      public UiTabPanel addTabPanel()
      Adds a tab panel.
      Gibt zurück:
      The new panel
    • addTextArea

      public UiTextArea addTextArea(String text)
      Adds a multi-line text input field.
      Parameter:
      text - The text to edit
      Gibt zurück:
      The new component
    • addTextField

      public UiTextField addTextField(String text)
      Adds a single-line text input field.
      Parameter:
      text - The text to edit
      Gibt zurück:
      The new component
    • addThumbnail

      public UiThumbnail addThumbnail(UiImageDefinition<?> image)
      Adds an image thumbnail that opens a larger image in a popup view when clicked.
      Parameter:
      image - The image definition
      Gibt zurück:
      The new component
    • addThumbnail

      public UiThumbnail addThumbnail(UiImageDefinition<?> thumbImage, UiImageDefinition<?> fullImage)
      Adds an image thumbnail that opens a larger image in a popup view when clicked.
      Parameter:
      thumbImage - The thumbnail image
      fullImage - The larger image
      Gibt zurück:
      The new component
    • addTitle

      public UiTitle addTitle(String text)
      Adds a non-interactive title label.
      Parameter:
      text - The title text
      Gibt zurück:
      The new component
    • addToggleButtons

      public <E extends Enum<E>> UiToggleButtons<E> addToggleButtons(Class<E> enumType)
      Adds a group of radio buttons with labels derived from an enum. All enum values of the given type will be pre-set as buttons.
      Parameter:
      enumType - The enum class for the button labels
      Gibt zurück:
      The new component
    • addToggleButtons

      public UiToggleButtons<String> addToggleButtons(String... buttonLabels)
      Adds a group of radio buttons with string labels.
      Parameter:
      buttonLabels - The initial button labels (may be empty)
      Gibt zurück:
      The new component
    • addWebView

      public UiWebView addWebView(String url)
      Adds a web page display.
      Parameter:
      url - The URL of the page to display
      Gibt zurück:
      The new component
    • getContainer

      public final C getContainer()
      Returns the container that is built by container instance.
      Gibt zurück:
      The container
    • nextRow

      public UiBuilder<C> nextRow()
      Invokes UiLayout.nextRow() and returns this instance to allow fluent invocations like nextRow().addButton(...).
      Gibt zurück:
      This instance for fluent invocations