com.sygem.swing.colorchooser
Interface SwatchData

All Known Implementing Classes:
CMYKSwatchData, RGBSwatchData, XWindowSwatchData

public interface SwatchData

Simple Interface detailing the methods required to implement a set of Swatches.

Title: AdvancedColorChooser
Description: A sophisticated Color Chooser dialog
Copyright: Copyright (c) 2004
Company: SyGem Software

Version:
1.0
See Also:
AdvancedColorChooser.addSwatchData(com.sygem.swing.colorchooser.SwatchData)

Method Summary
 java.awt.Dimension getDimension()
          Returns the number of Swatches this data set contains.
 java.lang.String[] getNames()
          Returns the names of each color in the Swatch list.
 int[] getRawValues()
          Returns the raw RGB data for each color - as RGB triplets.
 java.lang.String getTitle()
          Returns the title of this Swatch data set.
 

Method Detail

getDimension

public java.awt.Dimension getDimension()
Returns the number of Swatches this data set contains. This actually determines the layout of the Swatches. For example, a Dimension of (10,10) would layout the swatches in a 10 by 10 grid.

Returns:
A Dimension object

getNames

public java.lang.String[] getNames()
Returns the names of each color in the Swatch list. The returned array MUST be the same length as the number of colors in the Swatch list. If no color names are available, this method should return null.

Returns:
A String[] containing the color names, or null

getRawValues

public int[] getRawValues()
Returns the raw RGB data for each color - as RGB triplets.

Returns:
An int[] containing the raw color data

getTitle

public java.lang.String getTitle()
Returns the title of this Swatch data set.

Returns:
The Swatch's title


Copyright © 2004 SyGem Software. All Rights Reserved.