Package jisa.gui

Class Grid

    • Field Detail

      • pane

        public javafx.scene.layout.GridPane pane
      • scroll

        public javafx.scene.control.ScrollPane scroll
    • Constructor Detail

      • Grid

        public Grid​(java.lang.String title,
                    int numColumns)
        Creates a Grid element with the given title and number of columns.
        Parameters:
        title - Title
        numColumns - Number of columns
      • Grid

        public Grid​(java.lang.String title)
        Creates a Grid element with the given title and the default number (3) of columns.
        Parameters:
        title - Title
      • Grid

        public Grid​(java.lang.String title,
                    int numCols,
                    Element... children)
        Creates a Grid element with the given title, number of columns and adds the given elements to it as children.
        Parameters:
        title - Title
        numCols - Number of columns
        children - Children to add
      • Grid

        public Grid​(java.lang.String title,
                    Element... children)
        Creates a Grid element with the given title, 3 columns and adds the given elements to it as children.
        Parameters:
        title - Title
        children - Children to add
      • Grid

        public Grid​(int numColumns,
                    Element... children)
      • Grid

        public Grid​(Element... panels)
    • Method Detail

      • scrollToEnd

        public void scrollToEnd()
      • scrollToTop

        public void scrollToTop()
      • scrollTo

        public void scrollTo​(double percentage)
      • add

        public void add​(Element toAdd)
        Adds the given GUI element as a child of this grid, placing it as a panel in the next available space.
        Specified by:
        add in interface Container
        Parameters:
        toAdd - Element to add
      • getBorderedNode

        public javafx.scene.Node getBorderedNode()
        Specified by:
        getBorderedNode in interface Element
      • addPane

        protected void addPane​(javafx.scene.Node toAdd)
      • remove

        public void remove​(Element toRemove)
        Description copied from interface: Container
        Removes the specified elements from this container.
        Specified by:
        remove in interface Container
        Parameters:
        toRemove - Elements to remove
      • slideOutElement

        public void slideOutElement​(Element toRemove)
      • slideInElement

        public void slideInElement​(Element toAdd)
      • clear

        public void clear()
        Description copied from interface: Container
        Removes all elements from this container.
        Specified by:
        clear in interface Container
      • getElements

        public java.util.List<Element> getElements()
        Description copied from interface: Container
        Returns a list of all elements currently inside this container.
        Specified by:
        getElements in interface Container
        Returns:
        List of elements.
      • getNumColumns

        public int getNumColumns()
      • setNumColumns

        public void setNumColumns​(int columns)
      • setGrowth

        public void setGrowth​(boolean horizontal,
                              boolean vertical)
      • setGrowth

        public void setGrowth​(Element element,
                              boolean horizontal,
                              boolean vertical)