java.lang.Object
com.cryptoalgo.oursql.support.ui.UIUtils

public class UIUtils extends Object
Convenience methods for UI operations
  • Constructor Details

    • UIUtils

      public UIUtils()
  • Method Details

    • clipToRadius

      public static void clipToRadius(javafx.scene.layout.Region targetPane, int r)
      Clips a provided pane to a specified corner radius. For those pesky
      Parameters:
      targetPane - Pane to clip
      r - Corner radius of the clipping rectangle
    • loadFXML

      public static <T extends javafx.scene.layout.Pane> T loadFXML(String name) throws IOException
      Load and return a requested FXML.
      Type Parameters:
      T - Type of root pane
      Parameters:
      name - Name of FXML to load, relative to view/ (do not add file extension)
      Returns:
      Loaded root pane from the requested FXML
      Throws:
      IOException - If loading from the requested FXML file failed
    • createUtilityStage

      public static javafx.stage.Stage createUtilityStage(String title, javafx.scene.Node... nodes)
      Create a stage for utility windows. Pre-styled with the model css.
      Parameters:
      title - Title of stage
      nodes - Nodes to add to root VBox
      Returns:
      Created stage (Stage.show() not called)
    • getResourceURL

      public static URL getResourceURL(String res)
      Get non-null URL of a resource.
      Parameters:
      res - Resource string
      Returns:
      URL of requested resource
    • getResourcePath

      public static String getResourcePath(String res)
      Get non-null URL string of a resource. For those APIs that for some reason have a parameter named "url" with the String type.
      Parameters:
      res - Resource string
      Returns:
      External string form of URL of requested resource