Class JFXUtil

java.lang.Object
com.ntak.pearlzip.ui.util.JFXUtil

public class JFXUtil extends Object
Utility methods used by Pearl Zip to perform common JavaFX UI routines.
Author:
Aashutos Kakshepati
  • Constructor Details

    • JFXUtil

      public JFXUtil()
  • Method Details

    • raiseAlert

      public static Optional<javafx.scene.control.ButtonType> raiseAlert(javafx.scene.control.Alert.AlertType type, String title, String header, String body, javafx.stage.Window stage)
    • raiseAlert

      public static Optional<javafx.scene.control.ButtonType> raiseAlert(javafx.scene.control.Alert.AlertType type, String title, String header, String body, Exception exception, javafx.stage.Window stage, javafx.scene.control.ButtonType... buttons)
    • changeButtonPicText

      public static void changeButtonPicText(javafx.scene.control.ButtonBase button, String imgResource, String labelText)
    • highlightCellIfMatch

      public static void highlightCellIfMatch(javafx.scene.control.TableCell cell, FileInfo row, FileInfo ref, javafx.scene.layout.BackgroundFill backgroundColor)
    • getActiveStage

      public static Optional<javafx.stage.Stage> getActiveStage()
    • getMainStageInstances

      public static List<javafx.stage.Stage> getMainStageInstances()
    • getMainStageByArchivePath

      public static Optional<javafx.stage.Stage> getMainStageByArchivePath(String archivePath)
    • refreshFileView

      public static void refreshFileView(javafx.scene.control.TableView<FileInfo> fileInfoTableView, FXArchiveInfo fxArchiveInfo, int depth, String prefix)
    • isFileInArchiveLevel

      public static Predicate<FileInfo> isFileInArchiveLevel(FXArchiveInfo fxArchiveInfo)
    • executeBackgroundProcess

      public static void executeBackgroundProcess(long sessionId, javafx.stage.Stage parent, CaughtRunnable process, Consumer<javafx.stage.Stage> callback)
    • executeBackgroundProcess

      public static void executeBackgroundProcess(long sessionId, javafx.stage.Stage parent, CaughtRunnable process, Consumer<Throwable> handler, Consumer<javafx.stage.Stage> callback)
    • loadPreOpenDialog

      public static void loadPreOpenDialog(javafx.stage.Stage stage, javafx.scene.Node root)
    • lookupArchiveInfo

      public static Optional<FXArchiveInfo> lookupArchiveInfo(String archiveName)
    • runLater

      public static void runLater(Runnable runnable)
    • loadLicenseDetails

      public static FrmLicenseDetailsController loadLicenseDetails(String licensePath, String content, boolean withAcceptDecline) throws IOException
      Throws:
      IOException
    • checkWebEngineScrollToBottom

      public static void checkWebEngineScrollToBottom(javafx.scene.web.WebEngine engine, Consumer<Boolean> callback)
    • getTableCellForColumnRow

      public static <S> Optional<javafx.scene.control.TableCell<S,?>> getTableCellForColumnRow(javafx.scene.control.TableView<S> table, int rowIndex, String columnName)
    • showNotifications

      public static void showNotifications()
    • checkNewVersionAvailable

      public static boolean checkNewVersionAvailable()
    • getNotifications

      public static List<NotificationEntry> getNotifications(String... filters)
    • initialiseBootstrapProperties

      public static Properties initialiseBootstrapProperties() throws IOException
      Throws:
      IOException
    • toastMessage

      public static void toastMessage(com.jfoenix.controls.JFXSnackbar toast, String message)
    • setSafeModeTitles

      public static void setSafeModeTitles(boolean isSafeMode, javafx.stage.Stage stage)
    • initialiseTheme

      public static void initialiseTheme(Path themesPath, String themeName)