Package org.geotools.brewer.color
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 Summary
Fields Modifier and Type Field Description static int
QUALITY_BAD
Suitability = BADstatic int
QUALITY_DOUBTFUL
Suitability = DOUBTFULstatic int
QUALITY_GOOD
Suitability = GOODstatic int
QUALITY_UNKNOWN
Suitability = UNKNOWNstatic int
VIEWER_COLORBLIND
ViewerType = Suitable for the colorblind?static int
VIEWER_CRT
ViewerType = Suitable for CRT monitors?static int
VIEWER_LCD
ViewerType = Suitable for LCD monitors?static int
VIEWER_PHOTOCOPY
ViewerType = Suitable for photocopiers?static int
VIEWER_PRINT
ViewerType = Suitable for colour printing?static int
VIEWER_PROJECTOR
ViewerType = Suitable for overhead projectors (lcd)?
-
Constructor Summary
Constructors Constructor Description PaletteSuitability()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxColors()
int[]
getSuitability(int numClasses)
Indexed getter for property paletteSuitability.int
getSuitability(int numClasses, int viewerType)
Indexed getter for the property paletteSuitability.void
setSuitability(int numClasses, String[] suitability)
-
-
-
Field Detail
-
QUALITY_GOOD
public static final int QUALITY_GOOD
Suitability = GOOD- See Also:
- Constant Field Values
-
QUALITY_UNKNOWN
public static final int QUALITY_UNKNOWN
Suitability = UNKNOWN- See Also:
- Constant Field Values
-
QUALITY_DOUBTFUL
public static final int QUALITY_DOUBTFUL
Suitability = DOUBTFUL- See Also:
- Constant Field Values
-
QUALITY_BAD
public static final int QUALITY_BAD
Suitability = BAD- See Also:
- Constant Field Values
-
VIEWER_COLORBLIND
public static final int VIEWER_COLORBLIND
ViewerType = Suitable for the colorblind?- See Also:
- Constant Field Values
-
VIEWER_PHOTOCOPY
public static final int VIEWER_PHOTOCOPY
ViewerType = Suitable for photocopiers?- See Also:
- Constant Field Values
-
VIEWER_PROJECTOR
public static final int VIEWER_PROJECTOR
ViewerType = Suitable for overhead projectors (lcd)?- See Also:
- Constant Field Values
-
VIEWER_LCD
public static final int VIEWER_LCD
ViewerType = Suitable for LCD monitors?- See Also:
- Constant Field Values
-
VIEWER_CRT
public static final int VIEWER_CRT
ViewerType = Suitable for CRT monitors?- See Also:
- Constant Field Values
-
VIEWER_PRINT
public static final int VIEWER_PRINT
ViewerType = Suitable for colour printing?- See Also:
- Constant Field Values
-
-
Method Detail
-
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 paletteviewerType
- 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()
-
-