org.geotools.brewer.color
Class PaletteSuitability

java.lang.Object
  extended byorg.geotools.brewer.color.PaletteSuitability

public class PaletteSuitability
extends java.lang.Object

Contains the suitability information for a single palette with several colour schemes.

Author:
Cory Horner, Refractions Research Inc.

Field Summary
static int QUALITY_BAD
          Suitability = BAD
static int QUALITY_DOUBTFUL
          Suitability = DOUBTFUL
static int QUALITY_GOOD
          Suitability = GOOD
static int QUALITY_UNKNOWN
          Suitability = UNKNOWN
static 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
PaletteSuitability()
           
 
Method Summary
 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, java.lang.String[] suitability)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

PaletteSuitability

public PaletteSuitability()
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 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,
                           java.lang.String[] suitability)
                    throws java.io.IOException
Parameters:
numClasses - Index of the property.
suitability - New value of the property atindex.
Throws:
java.io.IOException

getMaxColors

public int getMaxColors()


Copyright © GeoTools. All Rights Reserved.