nl.cloudfarming.client.area.field
Class PartFieldPalette
java.lang.Object
nl.cloudfarming.client.geoviewer.StatePalette
nl.cloudfarming.client.area.field.PartFieldPalette
- All Implemented Interfaces:
- Palette
public class PartFieldPalette
- extends StatePalette
Color palette for partField
Provides colors for the PartField object
- Author:
- Timon Veenstra
|
Constructor Summary |
PartFieldPalette()
Add a bunch of predefined colors to hour list |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PartFieldPalette
public PartFieldPalette()
- Add a bunch of predefined colors to hour list
getColorForState
public Color getColorForState(org.netbeans.api.visual.model.ObjectState state,
LayerObject layerObject)
- Specified by:
getColorForState in interface Palette- Specified by:
getColorForState in class StatePalette
getSensorName
public String getSensorName()
forClass
public Class forClass()
getPaletteOptions
public List getPaletteOptions()
getColorForRace
public static Color getColorForRace(Race race)
- Gets a color to represent a Crop Race.
First it will get the color from a predefined list of 9 colors.
if this list is exhausted a random color will be returned.
the random color can never be the same as the predefined colors
- Parameters:
race - the race for which the color is selected.
- Returns:
- Unique Color
Copyright © 2011. All Rights Reserved.