|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.charts.ChartParameters
public class ChartParameters
The class to hold parameters to configure a chart
Field Summary | |
---|---|
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 Summary | |
---|---|
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... |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public ChartParameters(Map<String,String> params)
params
- the list of parameterspublic ChartParameters(String queryString)
queryString
- stringMethod Detail |
---|
public String getValue(String key)
key
- the param ket
public String getValue(String key, String defaultValue, boolean decode)
key
- the param ketdefaultValue
- the default value if not existdecode
- whther the value should be decoded
public String[] getValues(String key, String delimiter)
key
- the param keydelimiter
- the values delimiter
public String[] getValues(String key, String delimiter, boolean decode)
key
- the param keydelimiter
- the values delimiterdecode
- whether to decode values
public int getWidth()
public int getHeight()
public Locale getLocale()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |