Class PaletteSuitability

Object
PaletteSuitability

public class PaletteSuitability extends Object
Contains the suitability information for a single palette with several colour schemes.
Author:
Cory Horner, Refractions Research Inc.
  • Field Details

    • QUALITY_GOOD

      public static final int QUALITY_GOOD
      Suitability = GOOD
      See Also:
    • QUALITY_UNKNOWN

      public static final int QUALITY_UNKNOWN
      Suitability = UNKNOWN
      See Also:
    • QUALITY_DOUBTFUL

      public static final int QUALITY_DOUBTFUL
      Suitability = DOUBTFUL
      See Also:
    • QUALITY_BAD

      public static final int QUALITY_BAD
      Suitability = BAD
      See Also:
    • VIEWER_COLORBLIND

      public static final int VIEWER_COLORBLIND
      ViewerType = Suitable for the colorblind?
      See Also:
    • VIEWER_PHOTOCOPY

      public static final int VIEWER_PHOTOCOPY
      ViewerType = Suitable for photocopiers?
      See Also:
    • VIEWER_PROJECTOR

      public static final int VIEWER_PROJECTOR
      ViewerType = Suitable for overhead projectors (lcd)?
      See Also:
    • VIEWER_LCD

      public static final int VIEWER_LCD
      ViewerType = Suitable for LCD monitors?
      See Also:
    • VIEWER_CRT

      public static final int VIEWER_CRT
      ViewerType = Suitable for CRT monitors?
      See Also:
    • VIEWER_PRINT

      public static final int VIEWER_PRINT
      ViewerType = Suitable for colour printing?
      See Also:
  • Constructor Details

    • PaletteSuitability

      public PaletteSuitability()
  • Method Details

    • getSuitability

      public int[] getSuitability(int numClasses)
      Indexed getter for property paletteSuitability. For this palette, this returns an array containing the integer values for all 6 suitabilities.
      Parameters:
      numClasses - The number of colors to determine the suitability for
      Returns:
      int array; index = PaletteSuitability.VIEWER_COLORBLIND, VIEWER_PHOTOCOPY, VIEWER_PROJECTOR, VIEWER_LCD, VIEWER_CRT, or VIEWER_PRINT; values = PaletteSuitability.QUALITY_GOOD, QUALITY_UNKNOWN, QUALITY_DOUBTFUL, or QUALITY_BAD.
    • getSuitability

      public int getSuitability(int numClasses, int viewerType)
      Indexed getter for the property paletteSuitability. For the selected palette and viewerType, this returns the integer value of the
      Parameters:
      numClasses - number of colours in this palette
      viewerType - PaletteSuitability.VIEWER_COLORBLIND, VIEWER_PHOTOCOPY, VIEWER_PROJECTOR, VIEWER_LCD, VIEWER_CRT, or VIEWER_PRINT.
      Returns:
      PaletteSuitability.QUALITY_GOOD, QUALITY_UNKNOWN, QUALITY_DOUBTFUL, or QUALITY_BAD.
    • setSuitability

      public void setSuitability(int numClasses, String[] suitability) throws IOException
      Parameters:
      numClasses - Index of the property.
      suitability - New value of the property atindex.
      Throws:
      IOException
    • getMaxColors

      public int getMaxColors()