S-PLUS Connect/Java v1.0

com.insightful.gdevice
Class ColorScheme.PDFColorScheme

java.lang.Object
  extended bycom.insightful.gdevice.ColorScheme
      extended bycom.insightful.gdevice.ColorScheme.PDFColorScheme
All Implemented Interfaces:
Serializable
Enclosing class:
ColorScheme

public static class ColorScheme.PDFColorScheme
extends ColorScheme

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.insightful.gdevice.ColorScheme
ColorScheme.PDFColorScheme
 
Field Summary
 
Fields inherited from class com.insightful.gdevice.ColorScheme
m_name, NUMBER_IMAGE_COLORS
 
Constructor Summary
ColorScheme.PDFColorScheme(boolean isGrayscale, int[] colormap, int[] linecolors, int[] textcolors, int[] polygoncolors, int[] imagecolors, int backgroundcolor)
           
ColorScheme.PDFColorScheme(Color[] colormapColors, int[] linecolors, int[] textcolors, int[] polygoncolors, int[] imagecolors, int backgroundcolor)
           
 
Method Summary
 Color getBackgroundColor()
          Returns the background color.
 Color getImageColor(int index)
          Returns the image color of the given index.
 IndexColorModel getImageIndexColorModel()
          Creates a 256-color IndexColorModel representing the image colors.
 Color getLineColor(int index)
          Return color for drawing lines, given color int.
 Color getPaletteColor(int index)
          Returns the palette color of the given index.
 Color getPolygonColor(int index)
          Return color for drawing polygons, given color int.
 Color getTextColor(int index)
          Return color for drawing text, given color int.
 boolean isPDF()
          returns true if this is a pdf-style colorscheme, so we don't use weird image colors for polygon.
 
Methods inherited from class com.insightful.gdevice.ColorScheme
createFromXML, getImageColors, getInts, getName, getPalette, getPaletteColorLabels, getPaletteColors, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorScheme.PDFColorScheme

public ColorScheme.PDFColorScheme(Color[] colormapColors,
                                  int[] linecolors,
                                  int[] textcolors,
                                  int[] polygoncolors,
                                  int[] imagecolors,
                                  int backgroundcolor)

ColorScheme.PDFColorScheme

public ColorScheme.PDFColorScheme(boolean isGrayscale,
                                  int[] colormap,
                                  int[] linecolors,
                                  int[] textcolors,
                                  int[] polygoncolors,
                                  int[] imagecolors,
                                  int backgroundcolor)
Method Detail

getBackgroundColor

public Color getBackgroundColor()
Returns the background color.

Overrides:
getBackgroundColor in class ColorScheme

isPDF

public boolean isPDF()
returns true if this is a pdf-style colorscheme, so we don't use weird image colors for polygon.

Overrides:
isPDF in class ColorScheme

getLineColor

public Color getLineColor(int index)
Return color for drawing lines, given color int.

Overrides:
getLineColor in class ColorScheme

getTextColor

public Color getTextColor(int index)
Return color for drawing text, given color int.

Overrides:
getTextColor in class ColorScheme

getPolygonColor

public Color getPolygonColor(int index)
Return color for drawing polygons, given color int.

Overrides:
getPolygonColor in class ColorScheme

getPaletteColor

public Color getPaletteColor(int index)
Description copied from class: ColorScheme
Returns the palette color of the given index. The index should be between 1 and NUMBER_PALETTE_COLORS. If the index is too small (less than 1), this method returns the background color. If the index is too large, wrap around is performed.

Overrides:
getPaletteColor in class ColorScheme
Parameters:
index - index of the color in the palette.
Returns:
the specified palette color.

getImageColor

public Color getImageColor(int index)
Description copied from class: ColorScheme
Returns the image color of the given index. The index should be between 1 and NUMBER_IMAGE_COLORS. If the index is too small (less than 1), this method returns the first image color. If the index is too large, this method returns the last image color.

Overrides:
getImageColor in class ColorScheme
Parameters:
index - index of the color in the image color array.
Returns:
the specified image color.

getImageIndexColorModel

public IndexColorModel getImageIndexColorModel()
Creates a 256-color IndexColorModel representing the image colors.

Overrides:
getImageIndexColorModel in class ColorScheme
Returns:
the IndexColorModel, or null if its creation throws an exception.

S-PLUS Connect/Java v1.0

Copyright © 2000, 2002 Insightful Corporation
Warning: Classes not documented in the S-PLUS Programmer's Guide may change in future releases.