Package uibooster

Klasse UiBooster

java.lang.Object
uibooster.UiBooster

public class UiBooster extends Object
The UiBooster class it the main entry point to create a new dialog. It provides all implemented dialogs.
  • Konstruktordetails

  • Methodendetails

    • showInfoDialog

      public void showInfoDialog(String infoMessage)
      Shows an info dialog and blocks until the ok button was clicked. '\n' is allowed as newline character for the info message.
      Parameter:
      infoMessage - expects the info message
    • showWarningDialog

      public void showWarningDialog(String warningMessage, String title)
      Shows a warning dialog and blocks until the ok button was clicked. '\n' is allowed as newline character for the warn message.
      Parameter:
      warningMessage - expects the warn message
      title - expects the title for the window
    • showErrorDialog

      public void showErrorDialog(String errorMessage, String title)
      Shows an error dialog and blocks until the ok button was clicked. '\n' is allowed as newline character for the error message.
      Parameter:
      errorMessage - expects the error message
      title - expects the title for the window
    • showTextInputDialog

      public String showTextInputDialog(String message)
      Shows a dialog with text input field.
      Parameter:
      message - expects a message or question for the user.
      Gibt zurück:
      the user input or null on cancel
    • showPasswordDialog

      public String showPasswordDialog(String message, String title)
      Shows a dialog with a password input field.
      Parameter:
      message - expects a message or question for the user.
      title - expects the window title
      Gibt zurück:
      the typed password or null on cancel
    • showConfirmDialog

      public void showConfirmDialog(String message, String title, Runnable onConfirm, Runnable onDecline)
      Shows a confirm dialog and blocks until a decision is selected. '\n' is allowed as newline character for the message.
      Parameter:
      message - expects the message
      title - expects the window title
      onConfirm - expects a behaviour for a conformation
      onDecline - expects a behaviour for a declination
    • showConfirmDialog

      public boolean showConfirmDialog(String message, String title)
      Shows a confirm dialog and blocks until a decision is selected. '\n' is allowed as newline character for the message.
      Parameter:
      message - expects the message
      title - expects the window title
      Gibt zurück:
      true if the dialog was confirmed by user, otherwise false
    • showSelectionDialog

      public String showSelectionDialog(String message, String title, List<String> possibilities)
      Shows an info dialog and blocks until the ok button was clicked. '\n' is allowed as newline character for the info message.
      Parameter:
      message - expects the message
      title - expects the window title
      possibilities - expects a list with possibilities
      Gibt zurück:
      the selection element form possibilities list or null on close
    • showSelectionDialog

      public String showSelectionDialog(String message, String title, String... possibilities)
      Shows an info dialog and blocks until the ok button was clicked. '\n' is allowed as newline character for the info message.
      Parameter:
      message - expects the message
      title - expects the window title
      possibilities - expects a list with possibilities
      Gibt zurück:
      the selection element form possibilities list or null on close
    • showColorPicker

      public Color showColorPicker(String message, String title)
      Shows a simple color picker to select an RGB value.
      Parameter:
      message - optional message above the color picker
      title - expects a window title
      Gibt zurück:
      the selected color, on close it returns null.
    • showColorPicker

      public Color showColorPicker(String message, String title, Color initialColor)
      Shows a simple color picker to select an RGB value with an initial color value
      Parameter:
      message - optional message above the color picker
      title - expects a window title
      initialColor - optional color value which should be already selected on start
      Gibt zurück:
      the selected color, on close it returns null.
    • showColorPickerAndGetRGB

      public Integer showColorPickerAndGetRGB(String message, String title)
      Shows a simple color picker to select an RGB value.
      Parameter:
      message - optional message above the color picker
      title - expects a window title
      Gibt zurück:
      the selected color as int value, on close it returns null.
    • showColorPickerAndGetRGB

      public Integer showColorPickerAndGetRGB(String message, String title, Color initialColor)
      Shows a simple color picker to select an RGB value with an initial color value.
      Parameter:
      message - optional message above the color picker
      title - expects a window title
      initialColor - optional color value which should be already selected on start
      Gibt zurück:
      the selected color as int value, on close it returns null.
    • showFontChooser

      public Font showFontChooser(String message, String title)
      Shows a simple font chooser to select an installed font.
      Parameter:
      message - optional message above the font chooser
      title - expects a window title
      Gibt zurück:
      the selected font, on close it returns null.
    • showFontChooser

      public Font showFontChooser(String message, String title, Font initialFont)
      Shows a simple font chooser to select a font with an initial font value
      Parameter:
      message - optional message above the font chooser
      title - expects a window title
      initialFont - optional font which should be already selected on start
      Gibt zurück:
      the selected font, on close it returns null.
    • showFileSelection

      public File showFileSelection()
      Shows a file selection dialog. Only files are shown and selectable
      Gibt zurück:
      returns the selection file or null on cancel
    • showFileSelectionFromPath

      public File showFileSelectionFromPath(String currentDirectoryPath)
      Shows a file selection dialog starting from a specific directory path. Only files are shown and selectable
      Parameter:
      currentDirectoryPath - full directory path for opening the dialog box in
      Gibt zurück:
      returns the selection file or null on cancel
    • showFileSelection

      public File showFileSelection(String description, String... extensions)
      Shows a file selection dialog. Only files are shown and selectable
      Parameter:
      description - expects a short and readable description for the extensions
      extensions - expects one or more allowed extensions without the dot (f.e. bmp, png, pdf)
      Gibt zurück:
      returns the selection file or null on cancel
    • showFileSelectionFromPath

      public File showFileSelectionFromPath(String currentDirectoryPath, String description, String... extensions)
      Shows a file selection dialog starting from a specific directory path. Only files are shown and selectable
      Parameter:
      currentDirectoryPath - full directory path for opening the dialog box in
      description - expects a short and readable description for the extensions
      extensions - expects one or more allowed extensions without the dot (f.e. bmp, png, pdf)
      Gibt zurück:
      returns the selection file or null on cancel
    • showDirectorySelection

      public File showDirectorySelection()
      Shows a directory selection dialog. Only directories are shown and selectable
      Gibt zurück:
      returns the selection directory or null on cancel
    • showDirectorySelectionFromPath

      public File showDirectorySelectionFromPath(String currentDirectoryPath)
      Shows a directory selection dialog starting from a specific directory path. Only directories are shown and selectable
      Parameter:
      currentDirectoryPath - full directory path for opening the dialog box in
      Gibt zurück:
      returns the selection directory or null on cancel
    • showFileOrDirectorySelection

      public File showFileOrDirectorySelection()
      Shows a selection dialog for files and directories.
      Gibt zurück:
      returns the selection or null on cancel
    • showFileOrDirectorySelectionFromPath

      public File showFileOrDirectorySelectionFromPath(String currentDirectoryPath)
      Shows a selection dialog for files and directories starting from a specific directory path.
      Parameter:
      currentDirectoryPath - full directory path for opening the dialog box in
      Gibt zurück:
      returns the selection or null on cancel
    • showFileOrDirectorySelection

      public File showFileOrDirectorySelection(String description, String... extensions)
      Shows a selection dialog for files and directories.
      Parameter:
      description - expects a short and readable description for the extensions
      extensions - expects one or more allowed extensions without the dot (f.e. bmp, png, pdf)
      Gibt zurück:
      returns the selection or null on cancel
    • showFileOrDirectorySelectionFromPath

      public File showFileOrDirectorySelectionFromPath(String currentDirectoryPath, String description, String... extensions)
      Shows a selection dialog for files and directories starting from a specific directory path.
      Parameter:
      currentDirectoryPath - full directory path for opening the dialog box in
      description - expects a short and readable description for the extensions
      extensions - expects one or more allowed extensions without the dot (f.e. bmp, png, pdf)
      Gibt zurück:
      returns the selection or null on cancel
    • showLogin

      public LoginCredentials showLogin(String message, String title, String usernameLabel, String passwordLabel, String loginButtonLabel, String cancelButtonLabel)
      Shows a login dialog with username and password.
      Gibt zurück:
      returns the login data or null on cancel.
    • showWaitingDialog

      public WaitingDialog showWaitingDialog(String message, String title)
      Shows a waiting dialog with a changeable message. This dialog does not wait for any user input. Its decoupled from the rest of the application.
      Parameter:
      message - optional message to the user
      title - expects a title for the window
      Gibt zurück:
      returns the dialog object to change the message and hide the dialog as needed.
    • showWaitingDialog

      public WaitingDialog showWaitingDialog(String message, String title, boolean decorated)
      Shows a waiting dialog with a changeable message. This dialog does not wait for any user input. Its decoupled from the rest of the application.
      Parameter:
      message - optional message to the user
      title - expects a title for the window
      decorated - hides or shows the window title bar (true = show)
      Gibt zurück:
      returns the dialog object to change the message and hide the dialog as needed.
    • showWaitingDialog

      public WaitingDialog showWaitingDialog(String message, String title, String largeText)
      Shows a waiting dialog with a changeable message and a large (scrollable) message area. This dialog does not wait for any user input. Its decoupled from the rest of the application.
      Parameter:
      message - optional message to the user
      title - expects a title for the window
      largeText - optional large message
      Gibt zurück:
      returns the dialog object to change the message and hide the dialog as needed.
    • showWaitingDialog

      public WaitingDialog showWaitingDialog(String message, String title, String largeText, boolean decorated)
      Shows a waiting dialog with a changeable message. This dialog does not wait for any user input. Its decoupled from the rest of the application.
      Parameter:
      message - optional message to the user
      title - expects a title for the window
      largeText - optional large message
      decorated - hides or shows the window title bar (true = show)
      Gibt zurück:
      returns the dialog object to change the message and hide the dialog as needed.
    • showProgressDialog

      public ProgressDialog showProgressDialog(String message, String title, int min, int max)
      Shows dialog with progressbar and changeable message. The dialog does not wait for any user input. Its decoupled form the rest of the application.
      Parameter:
      message - optional message to the user
      title - expects a title for the window
      min - expects the minimal value for the progress
      max - expects the maximal value for the progress
      Gibt zurück:
      returns the dialog object to change the message and the progress and hide the dialog as needed.
    • showDatePicker

      public Date showDatePicker(String message, String title)
      Shows a date picker dialog to choose a specific date.
      Parameter:
      message - expects a message
      title - expects a title for the window
      Gibt zurück:
      the selected date or null on cancel
    • showTable

      public String[][] showTable(String[][] data, List<String> header, String title)
      Shows a dialog with a table view. It allows to change cell values, add rows and remove rows. The dialogs wait for user input.
      Parameter:
      data - expects the values in rows of columns -> [row_n][column_n]
      header - expects the labels for the columns
      title - expects a title for the window
      Gibt zurück:
      the accepted or changed data or null on cancel.
    • showTable

      public String[][] showTable(String[][] data, String[] header, String title)
      Shows a dialog with a table view. It allows to change cell values, add rows and remove rows. The dialogs wait for user input.
      Parameter:
      data - expects the values in rows of columns -> [row_n][column_n]
      header - expects the labels for the columns
      title - expects a title for the window
      Gibt zurück:
      the accepted or changed data or null on cancel.
    • showTableImmutable

      public String[][] showTableImmutable(String[][] data, List<String> header, String title)
      Shows a dialog with a table view. The table values are not changeable. The dialogs wait for user input.
      Parameter:
      data - expects the values in rows of columns -> [row_n][column_n]
      header - expects the labels for the columns
      title - expects a title for the window
      Gibt zurück:
      the accepted or changed data or null on cancel.
    • showTableImmutable

      public String[][] showTableImmutable(String[][] data, String[] header, String title)
      Shows a dialog with a table view. The table values are not changeable. The dialogs wait for user input.
      Parameter:
      data - expects the values in rows of columns -> [row_n][column_n]
      header - expects the labels for the columns
      title - expects a title for the window
      Gibt zurück:
      the accepted or changed data or null on cancel.
    • showPicture

      public PictureGalleryDialog showPicture(String title, File image)
      Creates a resizable window whichs shows the given image. The image is scaled with the correct ratio. The dialogs blocks the process until it's closed.
      Parameter:
      title - expects a title for the window
      image - expects an image (JPG, PNG and BMP are supported).
      Gibt zurück:
      the object to control the picture gallery dialog
    • showPictures

      public PictureGalleryDialog showPictures(String title, List<File> images)
      Creates a resizable window which shows the given images as a gallery. The images are scaled with the correct ratio. The user can step forward and backwards thru the gallery. The dialogs blocks the process until it's closed.
      Parameter:
      title - expects a title for the window
      images - expects a list of images (JPG, PNG and BMP are supported).
      Gibt zurück:
      the object to control the picture gallery dialog
    • showPictures

      public PictureGalleryDialog showPictures(String title, String[] images)
      Creates a resizable window which shows the given images as a gallery. The images are scaled with the correct ratio. The user can step forward and backwards thru the gallery. The dialogs blocks the process until it's closed.
      Parameter:
      title - expects a title for the window
      images - expects a list of images (JPG, PNG and BMP are supported).
      Gibt zurück:
      the object to control the picture gallery dialog
    • createForm

      public FormBuilder createForm(String title)
      Creates an object for building a form with selections, textfields and textareas. The dialogs blocks the process until it's closed.
      Parameter:
      title - expects a title for the window
      Gibt zurück:
      the object to create and control the form dialog
    • createTrayMenu

      public TrayMenu createTrayMenu(String title, String iconPath)
      Creates an object for building a system tray menu.
      Parameter:
      title - expects a title for the tray symbole
      iconPath - expects a path for the tray icon
      Gibt zurück:
      the object to create and control the system tray
    • createTrayMenu

      public TrayMenu createTrayMenu(String title, String iconPath, Runnable onIconClicked)
      Creates an object for building a system tray menu.
      Parameter:
      title - expects a title for the tray symbole
      iconPath - expects a path for the tray icon
      onIconClicked - expects an action which starts on clicking the tray icon
      Gibt zurück:
      the object to create and control the system tray
    • createNotification

      public void createNotification(String message, String title)
      Creates a notification window with title and message. The appearance and the support depends on the used OS.
      Parameter:
      message - expects a message for the notificaiton
      title - expects a title for the notification
    • showSlider

      public Integer showSlider(String message, String title, int min, int max, int init)
      Shows a dialog with a customizable slider, to ask the user for amounts. The dialogs blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this selection
      title - expects a title for the window
      min - expects the lowest allowed value
      max - expects the highest allowed value
      init - expects the number to start with
      Gibt zurück:
      the selected value or null if the dialog was closed
    • showSlider

      public Integer showSlider(String message, String title, int min, int max, int init, int majorTick, int minorTick)
      Shows a dialog with a customizable slider, to ask the user for amounts. The dialogs blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this selection
      title - expects a title for the window
      min - expects the lowest allowed value
      max - expects the highest allowed value
      init - expects the number to start with
      majorTick - expects the number of steps for the labeled ticks
      minorTick - expects the number of steps for each tick
      Gibt zurück:
      the selected value or null if the dialog was closed
    • showSplashscreen

      public Splashscreen showSplashscreen(String imagePath)
      Shows an undecorated window with a given image as splash screen. PNG files with transparency are supported.
      Parameter:
      imagePath - expects the path to splash screen image
      Gibt zurück:
      a splash screen object to hide or show the screen.
    • showSplashscreen

      public Splashscreen showSplashscreen(String imagePath, int lifeTimeInMillis)
      Shows an undecorated window with a given image as splash screen. PNG files with transparency are supported.
      Parameter:
      imagePath - expects the path to splash screen image
      lifeTimeInMillis - defines the time for showing the splash screen in milli seconds, after that the screen closes automatically
      Gibt zurück:
      a splash screen object to hide or show the screen.
    • showList

      public ListElement showList(String message, String title, ListElement... elements)
      Shows a list with a headline, a message part and an image. The dialogs blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this selection
      title - expects a title for the window
      elements - expects the elements used for the list
      Gibt zurück:
      the selected value or null if the dialog was closed
    • showList

      public ListElement showList(String message, String title, SelectElementListener onSelect, ListElement... elements)
      Shows a list with a headline, a message part and an image. The dialogs blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this selection
      title - expects a title for the window
      onSelect - expects a callback implementation when a elements was selected
      elements - expects the elements used for the list
      Gibt zurück:
      the selected value or null if the dialog was closed
    • showException

      public void showException(String message, String title, Exception exception)
      Shows an exception stack trace in a dialog The dialogs blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning exception
      title - expects a title for the window
      exception - excepts an exception to show the stacktrace
    • showTextArea

      public void showTextArea(String message, String title, String content)
      Shows a scrollable and editable text area with 30 rows and 80 columns in a dialog. The dialogs blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this text
      title - expects a title for the window
      content - expects the content/text for the text area
    • showTextArea

      public void showTextArea(String message, String title, String content, int rows, int columns, boolean editable)
      Shows a scrollable and editable text area with 30 rows and 80 columns in a dialog. The dialogs blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this text
      title - expects a title for the window
      content - expects the content/text for the text area
      rows - expects the number of rows for the text area (height)
      columns - expects the number of columns for the text area (width)
      editable - if true the text area could changed by user, otherwise its immutable
    • showHtmlText

      public void showHtmlText(String message, String title, String htmlContent)
      Shows a scrollable text area which allows HTML 3.2 in a dialog. The dialogs blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this text
      title - expects a title for the window
      htmlContent - expects the content/text for the text area
    • showHtmlText

      public void showHtmlText(String message, String title, String htmlContent, int width, int height)
      Shows a scrollable text area which allows HTML 3.2 in a dialog. The dialogs blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this text
      title - expects a title for the window
      htmlContent - expects the content/text for the text area
      width - expects the width in pixel which the component has to used preferred
      height - expects the height in pixel which the component has to used preferred
    • showMultipleSelection

      public List<String> showMultipleSelection(String message, String title, String... elements)
      Shows a fiterable list with multiple selectable elements in a dialog. The dialog blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this selection
      title - expects a title for the window
      elements - expects a list of selectable elements
      Gibt zurück:
      the selected elements
    • showMultipleSelection

      public List<String> showMultipleSelection(String message, String title, boolean hideFilter, String... elements)
      Shows a fiterable list with multiple selectable elements in a dialog. The dialog blocks the process until it's closed.
      Parameter:
      message - expects a message for the meaning of this selection
      title - expects a title for the window
      hideFilter - if true, the filter text field is hidden
      elements - expects a list of selectable elements
      Gibt zurück:
      the selected elements