nl.cloudfarming.client.area.field
Class PartFieldPalette

java.lang.Object
  extended by nl.cloudfarming.client.geoviewer.StatePalette
      extended by 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
 
Method Summary
 Class forClass()
           
static Color getColorForRace(Race race)
          Gets a color to represent a Crop Race.
 Color getColorForState(org.netbeans.api.visual.model.ObjectState state, LayerObject layerObject)
           
 List getPaletteOptions()
           
 String getSensorName()
           
 
Methods inherited from class nl.cloudfarming.client.geoviewer.StatePalette
getColorForValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartFieldPalette

public PartFieldPalette()
Add a bunch of predefined colors to hour list

Method Detail

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.