Class ConfusionMatrixCellRenderingCustomizer

    • Field Detail

      • m_Highlight

        protected Color m_Highlight
        the color to use for highlighting.
      • m_ValueBasedBackground

        protected boolean m_ValueBasedBackground
        whether to color background based on value.
      • m_BackgroundColorGenerator

        protected ColorGradientGenerator m_BackgroundColorGenerator
        the color provider to use for the background.
      • m_Colors

        protected transient Map<Integer,​Color> m_Colors
        the color values (starting at 0).
    • Constructor Detail

      • ConfusionMatrixCellRenderingCustomizer

        public ConfusionMatrixCellRenderingCustomizer()
    • Method Detail

      • setHighlight

        public void setHighlight​(Color value)
        Sets the color to use as background for the diagonal cells.
        Parameters:
        value - the color
      • getHighlight

        public Color getHighlight()
        Returns the color to use as background for the diagonal cells.
        Returns:
        the color
      • highlightTipText

        public String highlightTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setValueBasedBackground

        public void setValueBasedBackground​(boolean value)
        Sets whether to color in backgrounds based on their values.
        Parameters:
        value - true if to color in background
      • getValueBasedBackground

        public boolean getValueBasedBackground()
        Returns whether to color in backgrounds based on their values.
        Returns:
        true if to color in background
      • valueBasedBackgroundTipText

        public String valueBasedBackgroundTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setBackgroundColorGenerator

        public void setBackgroundColorGenerator​(ColorGradientGenerator value)
        Sets the color generator for obtaining the colors used for coloring in the background.
        Parameters:
        value - the generator
      • getBackgroundColorGenerator

        public ColorGradientGenerator getBackgroundColorGenerator()
        Returns the color generator for obtaining the colors used for coloring in the background.
        Returns:
        the generator
      • backgroundColorGeneratorTipText

        public String backgroundColorGeneratorTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • getFont

        public Font getFont​(SpreadSheetTable table,
                            boolean isSelected,
                            boolean hasFocus,
                            int row,
                            int column,
                            Cell cell,
                            Font defFont)
        For customizing the font of a cell.
        Specified by:
        getFont in interface CellRenderingCustomizer
        Overrides:
        getFont in class AbstractCellRenderingCustomizer
        Parameters:
        table - the table
        isSelected - whether the cell is selected
        hasFocus - whether the cell is focused
        row - the current row
        column - the current column
        cell - the actual cell
        defFont - the default font
        Returns:
        the font
      • initColors

        protected void initColors()
        Initializes the color lookup table.
      • getHorizontalAlignment

        public int getHorizontalAlignment​(SpreadSheetTable table,
                                          boolean isSelected,
                                          boolean hasFocus,
                                          int row,
                                          int column,
                                          Cell cell,
                                          int defAlign)
        For customizing the horizontal alignment of a cell.
        Specified by:
        getHorizontalAlignment in interface CellRenderingCustomizer
        Overrides:
        getHorizontalAlignment in class AbstractCellRenderingCustomizer
        Parameters:
        table - the table
        isSelected - whether the cell is selected
        hasFocus - whether the cell is focused
        row - the current row
        column - the current column
        cell - the actual cell
        defAlign - the default alignment
        Returns:
        the alignment