Class UI
java.lang.Object
ch.autumo.ui.utils.UI
GUI/MVC Utility class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHyperlink listener for HTML dialog views. -
Method Summary
Modifier and TypeMethodDescriptionstatic BaseControllergetBaseController(Pane view) Get base controller from view.static ImageimageWithoutFileBlocking(Path imageFile) Get image.static BaseControllerSetup a view with a controller.static BaseControllerSetup a view with a controller.static voidShow about pane.static voidShow about pane.static voidShow about pane.static voidShow about pane with license button.static voidshowAboutWithLicense(BaseApp app, String iconFile) Show about pane with license button.static Optional<ButtonType> showConfirmationDialog(BaseApp app, String question) Show confirmation dialog.static voidshowEncoder(BaseApp app) Show encoder pane (using the internal security key for encryption).static voidshowEncoder(BaseApp app, boolean internalEncryption) Show encoder pane.static voidshowEncoder(BaseApp app, boolean internalEncryption, String title) Show encoder pane.static voidShow error pane.static voidShow error pane.static voidShow error pane.static voidshowErrorAndWait(BaseApp app, String msg, String title) Show error pane.static voidshowErrorAndWait(BaseApp app, Throwable ex, String title) Show error pane.static voidShow exception dialog.static voidshowExceptionDialogExtended(Throwable ex, String reason) Show exception dialog.static Optional<ButtonType> showFineConfirmationDialog(BaseApp app, String question) Show fine confirmation dialog.static voidshowFineErrorDialog(BaseApp app, String text) Show fine error dialog.static voidshowFineInformationDialog(BaseApp app, String text) Show fine information dialog.static Optional<ButtonType> showFineWarningConfirmationDialog(BaseApp app, String question) Show fine confirmation dialog.static voidshowFineWarningDialog(BaseApp app, String text) Show fine warning dialog.static voidShow HTML pane.static voidshowInformationDialog(BaseApp app, String text) Show information dialog.static DefaultCodeEditorControllershowJsonFormatter(BaseApp app) Configuration › JSON Formatter: show the JSON formatter window.static DefaultCodeEditorControllershowJsonFormatter(BaseApp app, String title) Show the JSON formatter window.static voidshowLicense(BaseApp app) Show License.static DefaultInfoControllerShow a default pane in an own stage.static DefaultInfoControllerShow a default pane in an own stage.static DefaultInfoControllerShow a default pane in an own stage.static DefaultInfoControllerShow a default pane in an own stage.static DefaultInfoControllershowPane(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile, String footerText) Show a default pane in an own stage.static DefaultInfoControllershowPane(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile, String footerText, String styleResourcePath) Show a default pane in an own stage.static DefaultInfoControllershowPaneAndWait(BaseApp app, Stage stage, Action action, String title) Show a default pane in an own stage.static DefaultInfoControllershowPaneAndWait(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile) Show a default pane in an own stage.static DefaultInfoControllershowPaneAndWait(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile, String footerText) Show a default pane in an own stage.static DefaultInfoControllershowPaneAndWait(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile, String footerText, String styleResourcePath) Show a default pane in an own stage.static RegistrationControllerShow registration in an own stage.static RegistrationControllershowRegistrationPane(BaseApp app, ch.autumo.commons.application.LicensedApplication licApp, String title) Show registration in an own stage.static DefaultInfoControllershowRemovePane(BaseApp app) Show remove pane in an own stage.static DefaultInfoControllershowRemovePane(BaseApp app, String title) Show remove pane in an own stage.static DefaultInfoControllershowUpdatePane(BaseApp app) Show update pane in an own stage.static DefaultInfoControllershowUpdatePane(BaseApp app, String title) Show update pane in an own stage.static voidshowWarningDialog(BaseApp app, String text) Show warning dialog.static voidshowWarningDialog(BaseApp app, String text, int width, int height) Show warning dialog.
-
Method Details
-
setup
public static BaseController setup(BaseApp app, String baseResourcePath, Pane view, String fxmlName) Setup a view with a controller. Tries to fetch the controller from the view!- Parameters:
app- the applicationbaseResourcePath- base resource pathview- viewfxmlName- FXML file name- Returns:
- controller
-
setup
public static BaseController setup(BaseApp app, String baseResourcePath, Object controller, Pane view, String fxmlName) Setup a view with a controller.- Parameters:
app- the applicationbaseResourcePath- base resource pathcontroller- controllerview- viewfxmlName- FXML file name- Returns:
- controller
-
getBaseController
Get base controller from view.- Parameters:
view- view- Returns:
- base controller
-
imageWithoutFileBlocking
-
showFineWarningConfirmationDialog
Show fine confirmation dialog.- Parameters:
app- the applicationquestion- the question text, plain or HTML- Returns:
- chosen option
-
showFineConfirmationDialog
Show fine confirmation dialog.- Parameters:
app- the applicationquestion- the question text, plain or HTML- Returns:
- chosen option
-
showFineInformationDialog
-
showFineWarningDialog
-
showFineErrorDialog
-
showConfirmationDialog
Show confirmation dialog.- Parameters:
app- the applicationquestion- the question- Returns:
- chosen option
-
showInformationDialog
-
showWarningDialog
-
showWarningDialog
-
showExceptionDialog
Show exception dialog.- Parameters:
ex- exception
-
showExceptionDialogExtended
-
showError
-
showError
-
showError
-
showErrorAndWait
-
showErrorAndWait
-
showEncoder
Show encoder pane (using the internal security key for encryption).- Parameters:
app- the application
-
showEncoder
Show encoder pane.- Parameters:
app- the applicationinternalEncryption-trueif you want to use the internal security keySecureApplication.getInternalSecurityKey()and not theSecureApplication.getUniqueSecurityKey()
-
showEncoder
Show encoder pane.- Parameters:
app- the applicationinternalEncryption-trueif you want to use the internal security keySecureApplication.getInternalSecurityKey()and not theSecureApplication.getUniqueSecurityKey()title- title or null
-
showJsonFormatter
Configuration › JSON Formatter: show the JSON formatter window.- Parameters:
app- the application- Returns:
- the pane controller
-
showJsonFormatter
Show the JSON formatter window. The window is set up exactly like every other pane: the view is created with its standard constructor,setup(BaseApp, String, Pane, String)loads the FXML onto it (which also binds the controller) and title, icon, footer buttons and the note text are set on the controller before the stage is shown.- Parameters:
app- the applicationtitle- the window title, ornullfor the translated default- Returns:
- the pane controller
-
showAbout
-
showAbout
-
showAbout
-
showAboutWithLicense
Show about pane with license button.- Parameters:
app- the application
-
showAboutWithLicense
-
showHTML
-
showLicense
-
showPane
Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfaction- the action to execute on the panetitle- title- Returns:
- controller view controller
-
showPane
Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfstage- the stage or null (an new one will be created)action- the action to execute on the panetitle- title- Returns:
- controller view controller
-
showPaneAndWait
public static DefaultInfoController showPaneAndWait(BaseApp app, Stage stage, Action action, String title) Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfstage- the stage or null (an new one will be created)action- the action to execute on the panetitle- title- Returns:
- controller view controller
-
showPane
public static DefaultInfoController showPane(BaseApp app, Stage stage, Action action, String fxmlName, String title) Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfstage- the stage or null (an new one will be created)action- the action to execute on the panefxmlName- FXML view file nametitle- title- Returns:
- controller view controller
-
showPane
public static DefaultInfoController showPane(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile) Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfstage- the stage or null (an new one will be created)action- the action to execute on the panefxmlName- FXML view file nametitle- titleiconFile- icon file name (a resource in autumo-ui library)- Returns:
- controller view controller
-
showPaneAndWait
public static DefaultInfoController showPaneAndWait(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile) Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfstage- the stage or null (an new one will be created)action- the action to execute on the panefxmlName- FXML view file nametitle- titleiconFile- icon file name (a resource in autumo-ui library)- Returns:
- controller view controller
-
showPane
public static DefaultInfoController showPane(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile, String footerText) Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfstage- the stage or null (an new one will be created)action- the action to execute on the panefxmlName- FXML view file nametitle- titleiconFile- icon file name (a resource in autumo-ui library)footerText- footer text or null- Returns:
- controller view controller
-
showPaneAndWait
public static DefaultInfoController showPaneAndWait(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile, String footerText) Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfstage- the stage or null (an new one will be created)action- the action to execute on the panefxmlName- FXML view file nametitle- titleiconFile- icon file name (a resource in autumo-ui library)footerText- footer text or null- Returns:
- controller view controller
-
showPane
public static DefaultInfoController showPane(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile, String footerText, String styleResourcePath) Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfstage- the stage or null (an new one will be created)action- the action to execute on the panefxmlName- FXML view file nametitle- titleiconFile- icon file name (a resource in autumo-ui library) or absolute icon file name path to resourcefooterText- footer text or nullstyleResourcePath- relative style ('style/style.css') file name or fully qualified resource path- Returns:
- controller view controller
-
showPaneAndWait
public static DefaultInfoController showPaneAndWait(BaseApp app, Stage stage, Action action, String fxmlName, String title, String iconFile, String footerText, String styleResourcePath) Show a default pane in an own stage.- Parameters:
app- the application used, if not already set by the action itselfstage- the stage or null (an new one will be created)action- the action to execute on the panefxmlName- FXML view file nametitle- titleiconFile- icon file name (a resource in autumo-ui library) or absolute icon file name path to resourcefooterText- footer text or nullstyleResourcePath- relative style ('style/style.css') file name or fully qualified resource path- Returns:
- controller view controller
-
showRegistrationPane
Show registration in an own stage.- Parameters:
app- the application used, if not already set by the action itself- Returns:
- controller view controller
-
showRegistrationPane
public static RegistrationController showRegistrationPane(BaseApp app, ch.autumo.commons.application.LicensedApplication licApp, String title) Show registration in an own stage.- Parameters:
app- the application usedlicApp- the licensed application used, in most cases the same asapptitle- title- Returns:
- controller view controller
-
showRemovePane
Show remove pane in an own stage.- Parameters:
app- the application used- Returns:
- controller view controller
-
showRemovePane
Show remove pane in an own stage.- Parameters:
app- the application usedtitle- title- Returns:
- controller view controller
-
showUpdatePane
Show update pane in an own stage.- Parameters:
app- the application used- Returns:
- controller view controller
-
showUpdatePane
Show update pane in an own stage.- Parameters:
app- the application usedtitle- title- Returns:
- controller view controller
-