Class TableViewMultiCellRenderer

    • Constructor Detail

      • TableViewMultiCellRenderer

        public TableViewMultiCellRenderer()
    • Method Detail

      • getWidth

        public int getWidth()
        Description copied from interface: Visual
        Returns the visual's width.
        Specified by:
        getWidth in interface Visual
        Returns:
        Current width of this visual.
      • getHeight

        public int getHeight()
        Description copied from interface: Visual
        Returns the visual's height.
        Specified by:
        getHeight in interface Visual
        Returns:
        Current height of this visual.
      • getBaseline

        public int getBaseline()
        Description copied from interface: Visual
        Returns the visual's baseline.
        Specified by:
        getBaseline in interface Visual
        Returns:
        The baseline relative to the origin of the visual, or -1 if this visual does not have a baseline.
      • paint

        public void paint​(java.awt.Graphics2D graphics)
        Description copied from interface: Visual
        Paints the visual.
        Specified by:
        paint in interface Visual
        Parameters:
        graphics - The graphics context in which to paint the visual.
      • setSize

        public void setSize​(int width,
                            int height)
        Description copied from interface: ConstrainedVisual
        Sets the visual's render size.
        Specified by:
        setSize in interface ConstrainedVisual
        Parameters:
        width - The visual's new width.
        height - The visual's new height.
      • getPreferredWidth

        public int getPreferredWidth​(int heightArgument)
        Description copied from interface: ConstrainedVisual
        Returns the visual's preferred width given the provided height constraint.
        Specified by:
        getPreferredWidth in interface ConstrainedVisual
        Parameters:
        heightArgument - The height by which to constrain the preferred width, or -1 for no constraint.
        Returns:
        The preferred width given the height constraint.
      • getPreferredHeight

        public int getPreferredHeight​(int widthArgument)
        Description copied from interface: ConstrainedVisual
        Returns the visual's preferred height given the provided width constraint.
        Specified by:
        getPreferredHeight in interface ConstrainedVisual
        Parameters:
        widthArgument - The width by which to constrain the preferred height, or -1 for no constraint.
        Returns:
        The preferred height given the width constraint.
      • getBaseline

        public int getBaseline​(int widthArgument,
                               int heightArgument)
        Description copied from interface: ConstrainedVisual
        Returns the baseline for a given width and height.
        Specified by:
        getBaseline in interface ConstrainedVisual
        Parameters:
        widthArgument - Constrained width to compute the baseline for.
        heightArgument - Constrained height to compute the baseline for.
        Returns:
        The baseline relative to the origin of this visual, or -1 if this visual does not have a baseline.
      • getStyles

        public Dictionary<java.lang.String,​java.lang.Object> getStyles()
        Specified by:
        getStyles in interface Renderer
        Returns:
        The renderer's style dictionary.
      • render

        public void render​(java.lang.Object row,
                           int rowIndex,
                           int columnIndex,
                           TableView tableView,
                           java.lang.String columnName,
                           boolean selected,
                           boolean highlighted,
                           boolean disabled)
        Description copied from interface: TableView.CellRenderer
        Prepares the renderer for layout or paint.
        Specified by:
        render in interface TableView.CellRenderer
        Parameters:
        row - The row to render, or null if called to calculate preferred height for skins that assume a fixed renderer height.
        rowIndex - The index of the row being rendered, or -1 if value is null.
        columnIndex - The index of the column being rendered.
        tableView - The host component.
        columnName - The name of the column being rendered.
        selected - If true, the row is selected.
        highlighted - If true, the row is highlighted.
        disabled - If true, the row is disabled.
      • toString

        public java.lang.String toString​(java.lang.Object row,
                                         java.lang.String columnName)
        Description copied from interface: TableView.CellRenderer
        Converts table view cell data to a string representation.
        Specified by:
        toString in interface TableView.CellRenderer
        Parameters:
        row - The row object.
        columnName - The name of the column.
        Returns:
        The cell data's string representation, or null if the data does not have a string representation.

        Note that this method may be called often during keyboard navigation, so implementations should avoid unnecessary string allocations.