Class PaneTools

java.lang.Object
qupath.lib.gui.tools.PaneTools

@Deprecated public class PaneTools extends Object
Deprecated.
since v0.5.0; GridPaneUtils contains many of the features.
Assorted static functions to help when working with a JavaFX panes.
Author:
Pete Bankhead
  • Constructor Details

    • PaneTools

      public PaneTools()
      Deprecated.
  • Method Details

    • addGridRow

      public static void addGridRow(GridPane pane, int row, int col, String tooltipText, Node... nodes)
      Deprecated.
      Add a row of nodes. The rowspan is always 1. The colspan is 1 by default, unless a Node is added multiple times consecutively in which case it is the sum of the number of times the node is added.
      Parameters:
      pane -
      row -
      col -
      tooltipText -
      nodes -
    • setHGrowPriority

      public static void setHGrowPriority(Priority priority, Node... nodes)
      Deprecated.
      Set the GridPane.setHgrow(Node, Priority) property for specified nodes.
      Parameters:
      priority -
      nodes -
    • setVGrowPriority

      public static void setVGrowPriority(Priority priority, Node... nodes)
      Deprecated.
      Set the GridPane.setVgrow(Node, Priority) property for specified nodes.
      Parameters:
      priority -
      nodes -
    • setMaxWidth

      public static void setMaxWidth(double width, Region... regions)
      Deprecated.
      Set the max width property for the specified regions. This can be especially useful when setting the width to Double.MAX_VALUE, indicating that the region may be enlarged as required.
      Parameters:
      width -
      regions -
    • setMaxHeight

      public static void setMaxHeight(double height, Region... regions)
      Deprecated.
      Set the max height property for the specified regions. This can be especially useful when setting the height to Double.MAX_VALUE, indicating that the region may be enlarged as required.
      Parameters:
      height -
      regions -
    • setMinWidth

      public static void setMinWidth(double width, Region... regions)
      Deprecated.
      Set the min width property for the specified regions. This can be especially useful when setting the width to Region.USE_PREF_SIZE, indicating that the region should not be shrunk beyond its preferred size.
      Parameters:
      width -
      regions -
    • setMinHeight

      public static void setMinHeight(double height, Region... regions)
      Deprecated.
      Set the min height property for the specified regions. This can be especially useful when setting the height to Region.USE_PREF_SIZE, indicating that the region should not be shrunk beyond its preferred size.
      Parameters:
      height -
      regions -
    • setFillWidth

      public static void setFillWidth(Boolean doFill, Node... nodes)
      Deprecated.
      Set the GridPane.setFillWidth(Node, Boolean) property for specified nodes.
      Parameters:
      doFill -
      nodes -
    • setToExpandGridPaneWidth

      public static void setToExpandGridPaneWidth(Node... nodes)
      Deprecated.
      Set constraints and max width values (where possible) so that the specified nodes fill all available horizontal space in a GridPane.
      Parameters:
      nodes -
    • setToExpandGridPaneHeight

      public static void setToExpandGridPaneHeight(Node... nodes)
      Deprecated.
      Set constraints and max width values (where possible) so that the specified nodes fill all available vertical space in a GridPane.
      Parameters:
      nodes -
    • setFillHeight

      public static void setFillHeight(Boolean doFill, Node... nodes)
      Deprecated.
      Set the GridPane.setFillHeight(Node, Boolean) property for specified nodes.
      Parameters:
      doFill -
      nodes -
    • createRowGrid

      public static GridPane createRowGrid(Node... nodes)
      Deprecated.
      Create a GridPane containing rows that resize similarly to Swing's GridLayout().
      Parameters:
      nodes -
      Returns:
    • createRowGridControls

      public static GridPane createRowGridControls(Node... nodes)
      Deprecated.
      Create a GridPane containing columns that resize similarly to Swing's GridLayout(), while also resizing contained objects to have the corresponding widths.
      Parameters:
      nodes -
      Returns:
    • createColumnGridControls

      public static GridPane createColumnGridControls(Node... nodes)
      Deprecated.
      Create a GridPane containing columns that resize similarly to Swing's GridLayout(), where controls have their widths bound to their parent.
      Parameters:
      nodes -
      Returns:
    • createColumnGrid

      public static GridPane createColumnGrid(Node... nodes)
      Deprecated.
      Create a GridPane containing columns that resize similarly to Swing's GridLayout().
      Parameters:
      nodes -
      Returns:
    • createColumnGrid

      public static GridPane createColumnGrid(int nCols)
      Deprecated.
      Create a GridPane containing columns that resize similarly to Swing's GridLayout().
      Parameters:
      nCols -
      Returns:
    • getContents

      public static Collection<Node> getContents(Parent parent, Collection<Node> collection, boolean doRecursive)
      Deprecated.
      Get the nodes that are included within a Parent, optionally adding other nodes recursively. Without the recursive search, this is similar to Parent.getChildrenUnmodifiable() in most cases, except that a separate collection is used. However in some cases getItems() must be used instead. Currently this applies only to SplitPane but this may be used elsewhere if appropriate.
      Parameters:
      parent -
      collection -
      doRecursive -
      Returns:
    • getContentsOfType

      public static <T extends Node> Collection<T> getContentsOfType(Parent parent, Class<T> cls, boolean doRecursive)
      Deprecated.
      Get the nodes of type T that are contained within a Parent, optionally adding other nodes recursively. This can be helpful, for example, to extract all the Buttons or Regions within a pane in order to set some property of all of them.
      Type Parameters:
      T -
      Parameters:
      parent -
      cls -
      doRecursive -
      Returns:
      See Also:
    • simplifyTitledPane

      public static void simplifyTitledPane(TitledPane pane, boolean boldTitle)
      Deprecated.
      Simplify the appearance of a TitledPane using CSS. This is useful if using a TitledPane to define expanded options, which should be displayed unobtrusively.
      Parameters:
      pane - the pane to simplify
      boldTitle - if true, the title should be displayed in bold