Class GridPane

    • Constructor Detail

      • GridPane

        public GridPane()
        Creates a new grid pane.
      • GridPane

        public GridPane​(int columnCount)
        Creates a new grid pane with the specified column count.
        Parameters:
        columnCount - Number of columns for this grid.
    • Method Detail

      • setSkin

        protected void setSkin​(Skin skin)
        Description copied from class: Component
        Sets the skin, replacing any previous skin.
        Overrides:
        setSkin in class Component
        Parameters:
        skin - The new skin.
      • getColumnCount

        public int getColumnCount()
        Returns:
        The number of columns in the grid pane.
      • setColumnCount

        public void setColumnCount​(int columnCount)
        Sets the number of columns in the grid pane.
        Parameters:
        columnCount - The new number of columns in the grid.
      • getRowAt

        public int getRowAt​(int y)
        Returns the index of the row at a given location.
        Parameters:
        y - The y-coordinate of the row to identify.
        Returns:
        The row index, or -1 if there is no row at the given y-coordinate.
      • getRowBounds

        public Bounds getRowBounds​(int row)
        Returns the bounds of a given row.
        Parameters:
        row - The row index.
        Returns:
        The bounds for the given row.
      • getColumnAt

        public int getColumnAt​(int x)
        Returns the index of the column at a given location.
        Parameters:
        x - The x-coordinate of the column to identify.
        Returns:
        The column index, or -1 if there is no column at the given x-coordinate.
      • getColumnBounds

        public Bounds getColumnBounds​(int column)
        Returns the bounds of a given column.
        Parameters:
        column - The column index.
        Returns:
        The bounds of the given column.
      • getCellComponent

        public Component getCellComponent​(int rowIndex,
                                          int columnIndex)
        Gets the component at the specified cell in this grid pane.
        Parameters:
        rowIndex - The row index of the cell.
        columnIndex - The column index of the cell.
        Returns:
        The component in the specified cell, or null if the cell is empty.
      • remove

        public Sequence<Component> remove​(int index,
                                          int count)
        Overrides the base method to check whether or not a cell component is being removed, and fires the appropriate event in that case.
        Specified by:
        remove in interface Sequence<Component>
        Overrides:
        remove in class Container
        Parameters:
        index - The index at which components were removed.
        count - The number of components removed.
        Returns:
        The sequence of components that were removed.