public class ChartParameters extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HEIGHT |
static int |
DEFAULT_WIDTH |
static int |
MAX_HEIGHT |
static int |
MAX_WIDTH |
static String |
PARAM_BACKGROUND_COLOR |
static String |
PARAM_HEIGHT |
static String |
PARAM_LOCALE |
static String |
PARAM_WIDTH |
Constructor and Description |
---|
ChartParameters(Map<String,String> params)
Creates a ChartParameter based on a list of parameters
|
ChartParameters(String queryString)
Creates a Chartparameter based on a query string with a format key1=value1&key2=value2...
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Get the chart height
|
Locale |
getLocale()
Get the Locale
|
String |
getValue(String key)
Shortcut to getValue with no decoding and no default value
|
String |
getValue(String key,
String defaultValue,
boolean decode)
Returns the [decoded or not] value of a param from its key or the default value
if id does not exist
|
String[] |
getValues(String key,
String delimiter)
Returns an array of a param values, given its key and the values delimiter
|
String[] |
getValues(String key,
String delimiter,
boolean decode)
Returns an array of a param values, given its key and the values delimiter
Values can be decoded or not
|
int |
getWidth()
Get the chart width
|
public static final String PARAM_WIDTH
public static final String PARAM_BACKGROUND_COLOR
public static final String PARAM_HEIGHT
public static final int MAX_WIDTH
public static final String PARAM_LOCALE
public static final int MAX_HEIGHT
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public ChartParameters(Map<String,String> params)
params
- the list of parameterspublic ChartParameters(String queryString)
queryString
- stringpublic String getValue(String key)
key
- the param ketpublic String getValue(String key, String defaultValue, boolean decode)
key
- the param ketdefaultValue
- the default value if not existdecode
- whther the value should be decodedpublic String[] getValues(String key, String delimiter)
key
- the param keydelimiter
- the values delimiterpublic String[] getValues(String key, String delimiter, boolean decode)
key
- the param keydelimiter
- the values delimiterdecode
- whether to decode valuespublic int getWidth()
public int getHeight()
Copyright © 2009-2013 SonarSource. All Rights Reserved.