Skip to content

πŸš€ Creates fast and easy dialogs for utility tools for Processing

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
license.txt
Notifications You must be signed in to change notification settings

federico-pepe/uibooster-for-processing

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

UiBooster is a lean library to create fast and easy dialogs for utility tools.

This project ports UiBooster 1.7 full functionally to the Processing eco-system as a library to create dialogs for your sketch fast as possible. With a lot of examples you will learn to use this library in less than five minutes.

If you like this project, and you want to keep me awake πŸ€ͺ, than please support me on ko-fi

Buy Me a Coffee at ko-fi.com

Installation

If you want to use this library in your processing sketch you can download it via the integrated Contribution Manager. alt install

Documentation

The following examples show the usage of this library. If you interested in the javadoc documentation look here.

Components

Information dialogs

screenshot info dialog screenshot warn dialog screenshot error dialog

new UiBooster().showInfoDialog("UiBooster is a lean library to ....");
new UiBooster().showWarningDialog("Your computer has a low battery ....", "WARN");
new UiBooster().showErrorDialog("The connection to SQL database is failed.", "ERROR");

Text input dialog

screenshot input dialog

String opinion = new UiBooster().showTextInputDialog("What do you think?");

Confirmation dialog

screenshot confirm dialog

new UiBooster().showConfirmDialog(
                "Do you really want this action?",
                "Are you sure?",
                () -> System.out.println("Action accepted"),
                () -> System.out.println("Action declined"));

Selection dialog

screenshot selection dialog

String selection = new UiBooster().showSelectionDialog(
        "What's your favorite movie?",
        "Favorite Movie?",
        Arrays.asList("Pulp Fiction", "Bambi", "The Godfather", "Hangover"));

Slider dialog

screenshot slider dialog

Integer numberOfHotDogs = new UiBooster().showSlider("How many HotDogs do you want?", "Your order", 
                0, 10, 2, 5, 1);

Colorpicker

screenshot color dialog

Color selectedColor = new UiBooster().showColorPicker("Choose your favorite color", "Color picking");

Datepicker

screenshot datepicker

Date birthday = new UiBooster().showDatePicker("What's your birthday?", "Birthday");

File and directory selection dialogs

screenshot file dialog

UiBooster booster = new UiBooster();
File file = booster.showFileSelection();
File directory = booster.showDirectorySelection();
File fileOrDirectory = booster.showFileOrDirectorySelection();

Login dialog

screenshot login dialog

LoginCredentials credentials = new UiBooster().showLogin(
        "Login",
        "Internal area",
        "Username",
        "Password",
        "Go",
        "Cancel");

Waiting dialog

screenshot waiting dialog

WaitingDialog dialog = new UiBooster().showWaitingDialog("Starting", "Please wait");
dialog.setMessage("Ready");
dialog.close();

screenshot waiting with message dialog

WaitingDialog dialog = new UiBooster().showWaitingDialog("Starting", "Please wait");
dialog.setMessage("Initializing");
dialog.setLargeMessage("Some more information...\nMaybe from log files or other resources. \nBe transparent to the user to understand long processes...");
dialog.close();

Progress dialog

screenshot progress dialog

ProgressDialog dialog = new UiBooster().showProgressDialog("Please wait", "Waiting", 0, 120);
dialog.setProgress(10);
// ...
dialog.setProgress(120);
dialog.setMessage("Ready");
dialog.close();

Table dialog

screenshot table dialog

String[][] modifiedData = new UiBooster().showTable(    // showTableImmutable for immutable tables
        new String[][]{
                {"Jimmy Johnson", "35", "Zombieland"},
                {"Danny Durango", "23", "Hangover"},
                {"Larry Berry", "54", ""}
        },
        Arrays.asList("Name", "Age", "Favorite movie"),
        "Favorite movies");

Gallery dialog

screenshot gallery dialog

new UiBooster().showPictures(
        "My picture",
        Arrays.asList(
            new File("/home/nick/pictures/img-01.jpg"),
            new File("/home/nick/pictures/img-02.jpg")
        )
);

Form dialog

screenshot gallery dialog

UiBooster booster = new UiBooster();
FilledForm form = booster.createForm("Personal information")
            .addText("Whats your first name?")
            .addTextArea("Tell me something about you")
            .addSelection(
                    "Whats your favorite movie?",
                    Arrays.asList("Pulp Fiction", "Bambi", "The Godfather", "Hangover"))
            .addLabel("Choose an action")
            .addButton("half full", () -> booster.showInfoDialog("Optimist"))
            .addButton("half empty", () -> booster.showInfoDialog("Pessimist"))
            .addSlider("How many liters did you drink today?", 0, 5, 1, 5, 1)
            .show();

// use .run() instead of show() to open the form without blocking.

Splash screen

screenshot splash screen

Splashscreen splash = new UiBooster().showSplashscreen("/path/to/your/splash.png");
// do your stuff
splash.hide();

System tray

screenshot gallery dialog

UiBooster booster = new UiBooster();
booster.createTrayMenu("Food", "screenshots/color.jpg")
        .withPopupMenu()
        .addMenu("Hotdogs", () -> booster.showInfoDialog("Sausage in a roll"))
        .addMenu("Fries", () -> booster.showInfoDialog("Fried potatoes"))
        .addMenu("Pizza", () -> booster.showInfoDialog("Dough with tomato sauce"));

Notification

screenshot gallery dialog

new UiBooster().createNotification("It's hot and delicious", "Dinner is ready");

Options

UiBooster booster = new UiBooster(
    new UiBoosterOptions(
        UiBoosterOptions.Theme.DARK_THEME,
        "/path/to/your/custom-window-icon.png"
    )
);

Contribution

Please report issues for bugs or feature requests with ideas for other useful dialogs. If you interested in the development process, take a look to the origin project UiBooster.

Updating UiBooster for Processing

The port of UiBooster works as copy from the original project with some package adjustments. An update script pulls the current UiBooster code and replace it with the code from this library. New features from UiBooster are added as examples, and the README.md has been updated.

This script updates the code. Attention: It removes the existing code!

cd ./update/
bash update-uibooster.sh

About

πŸš€ Creates fast and easy dialogs for utility tools for Processing

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
license.txt

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 73.9%
  • CSS 18.7%
  • HTML 6.1%
  • Shell 1.3%