com.googlecode.charts4j
Class Country

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

public class Country
extends Object

A country on planet earth. Herein you can find all the country codes that are detailed in ISO 3166.

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

Nested Class Summary
static class Country.Code
          Country code.
static class Country.Name
          Country names.
 
Constructor Summary
Country(Country.Code code, int color)
          Construct this implementation of PoliticalBoundary.
Country(Country.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

Country

public Country(Country.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)

Country

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

Parameters:
code - Supply a country code.
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.