com.googlecode.charts4j
Class USAState

java.lang.Object
  extended by com.googlecode.charts4j.USAState
All Implemented Interfaces:
PoliticalBoundary

public class USAState
extends Object

A state in the USA. Herein you can find all the US States.

Author:
Julien Chastang (julien.c.chastang at gmail dot com)
See Also:
PoliticalBoundary, Country, MapChart

Nested Class Summary
static class USAState.Code
          USA state name code.
static class USAState.Name
          USA State name.
 
Constructor Summary
USAState(USAState.Code code, int color)
          Construct this implementation of PoliticalBoundary.
USAState(USAState.Name name, int color)
          Construct this implementation of PoliticalBoundary.
 
Method Summary
 String getCode()
          Get the political boundary code (e.g "US", "NY").
 int getColor()
          Get the color associated with this political boundary area.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

USAState

public USAState(USAState.Name name,
                int color)
Construct this implementation of PoliticalBoundary.

Parameters:
name - Supply a country name.
color - Define an integer from 0 to 100 that will be positioned along the color gradient. The integer you provide here will be interpolated with the color gradient that you defined in MapChart.setColorGradient(Color defaultColor, Color... colorGradient)

USAState

public USAState(USAState.Code code,
                int color)
Construct this implementation of PoliticalBoundary.

Parameters:
code - Supply a country name.
color - Define an integer from 0 to 100 that will be positioned along the color gradient. The integer you provide here will be interpolated with the color gradient that you defined in MapChart.setColorGradient(Color defaultColor, Color... colorGradient)
Method Detail

getCode

public String getCode()
Get the political boundary code (e.g "US", "NY").

Specified by:
getCode in interface PoliticalBoundary
Returns:
The political boundary code.

getColor

public int getColor()
Get the color associated with this political boundary area.

Specified by:
getColor in interface PoliticalBoundary
Returns:
Return the color of the political boundary area.