public class ChartTag
extends javax.servlet.jsp.tagext.TagSupport
Modifier and Type | Field and Description |
---|---|
protected ChartTagBeautifier |
beautifier |
protected int |
color |
protected int |
colorFirst |
protected int |
colorRotate |
protected java.lang.String[] |
colors |
static java.lang.String[] |
COLORS |
protected int |
countValue |
protected ObjectIntTreeMap |
dataMap |
protected java.lang.String |
display |
static java.lang.String |
DISPLAY_HCHART |
static java.lang.String |
DISPLAY_TABLECHART |
static java.lang.String |
DISPLAY_VCHART |
protected int |
fixHLegWidth |
protected int |
height |
protected boolean |
isPercent |
protected java.util.Comparator |
lgdCmpt |
protected java.util.Locale |
locale |
protected int |
max |
protected int |
maxValue |
protected boolean |
maxValueSet |
protected boolean |
mixedChart |
protected boolean |
printChart |
protected boolean |
printCSS |
static java.lang.String |
REVISION |
protected java.lang.String |
sort |
static java.lang.String |
SORT_GREATER |
static java.lang.String |
SORT_LOWER |
static java.lang.String |
SORT_NONE |
protected java.lang.String |
title |
protected java.lang.String |
unit |
protected int |
width |
Constructor and Description |
---|
ChartTag() |
Modifier and Type | Method and Description |
---|---|
protected void |
clean() |
protected int |
countItems()
Count the number of elements to display depending of the element map
|
protected void |
countMaxValue()
Get the max value of the map
|
int |
doEndTag() |
int |
doStartTag() |
protected void |
printChartElement(java.lang.StringBuffer sb,
java.lang.String legend,
int value,
int color,
int spanLegend,
boolean separator)
Print one element of the Chart
|
protected void |
printCSS(java.lang.StringBuffer sb,
int items)
Print the CSS Style to display correctly chart.
|
protected void |
printHLegendRatio(java.lang.StringBuffer sb)
Print Legend 0% - 100% of the Chart
|
protected void |
printLegentChart(java.lang.StringBuffer sb,
java.util.List legendList)
Print Legend Square of the chart
|
protected java.util.List |
printMixedChart(java.lang.StringBuffer sb,
ObjectIntTreeMap items)
Print all items of mixed charts chart
|
protected java.util.List |
printNotMixedChart(java.lang.StringBuffer sb,
ObjectIntTreeMap items)
Print all items of not mixed charts chart
|
protected java.util.List |
printSingleChart(java.lang.StringBuffer sb,
ObjectIntTreeMap items,
int color)
Print all items in a chart
|
protected void |
printTitle(java.lang.StringBuffer sb) |
protected void |
printVChartLegendList(java.lang.StringBuffer sb,
java.util.List legendList) |
protected void |
printVLegendRatio(java.lang.StringBuffer sb)
Print Legend 0% - 100% of the Chart
|
void |
setBeautifier(ChartTagBeautifier beautifier) |
void |
setColor(int color) |
void |
setColorFirst(int colorFirst) |
void |
setColorRotate(int colorRotate) |
void |
setColors(java.lang.String[] colors) |
void |
setDataMap(ObjectIntTreeMap dataMap) |
void |
setDisplay(java.lang.String display) |
void |
setFixHLengthWidth(int fixHLegWidth) |
void |
setHeight(int height) |
void |
setIsPercent(boolean isPercent) |
void |
setLegendComparator(java.util.Comparator legendComparator) |
void |
setLocale(java.util.Locale locale) |
void |
setMax(int max) |
void |
setMaxValue(int maxValue) |
void |
setMixedChart(boolean mixedChart) |
void |
setPrintChart(boolean printChart) |
void |
setPrintCSS(boolean printCSS) |
void |
setSort(java.lang.String sort) |
void |
setTitle(java.lang.String title) |
void |
setUnit(java.lang.String unit) |
void |
setWidth(int width) |
public static final java.lang.String REVISION
public static java.lang.String[] COLORS
public static final java.lang.String DISPLAY_VCHART
public static final java.lang.String DISPLAY_HCHART
public static final java.lang.String DISPLAY_TABLECHART
public static final java.lang.String SORT_NONE
public static final java.lang.String SORT_GREATER
public static final java.lang.String SORT_LOWER
protected boolean printCSS
protected boolean printChart
protected boolean mixedChart
protected boolean isPercent
protected java.lang.String display
protected int color
protected int colorFirst
protected int colorRotate
protected java.lang.String[] colors
protected java.lang.String title
protected ObjectIntTreeMap dataMap
protected int height
protected int width
protected int maxValue
protected boolean maxValueSet
protected int countValue
protected java.lang.String sort
protected int max
protected int fixHLegWidth
protected ChartTagBeautifier beautifier
protected java.util.Comparator lgdCmpt
protected java.util.Locale locale
protected java.lang.String unit
public void setSort(java.lang.String sort)
public void setMax(int max)
public void setMixedChart(boolean mixedChart)
public void setDataMap(ObjectIntTreeMap dataMap)
public void setPrintChart(boolean printChart)
public void setPrintCSS(boolean printCSS)
public void setIsPercent(boolean isPercent)
public void setColor(int color)
public void setColors(java.lang.String[] colors)
public void setColorFirst(int colorFirst)
public void setColorRotate(int colorRotate)
public void setTitle(java.lang.String title)
public void setDisplay(java.lang.String display)
public void setUnit(java.lang.String unit)
public void setHeight(int height)
public void setWidth(int width)
public void setMaxValue(int maxValue)
public void setFixHLengthWidth(int fixHLegWidth)
public void setBeautifier(ChartTagBeautifier beautifier)
public void setLegendComparator(java.util.Comparator legendComparator)
public void setLocale(java.util.Locale locale)
protected void clean()
protected int countItems()
protected void countMaxValue()
protected void printCSS(java.lang.StringBuffer sb, int items)
sb
- the buffer to print intoitems
- the number of chart color to displayprotected java.util.List printSingleChart(java.lang.StringBuffer sb, ObjectIntTreeMap items, int color)
sb
- the buffer to print intoitems
- a Map of Items String/int[0]protected java.util.List printNotMixedChart(java.lang.StringBuffer sb, ObjectIntTreeMap items)
sb
- the buffer to print intoitems
- a Map of Items String/int[0]protected java.util.List printMixedChart(java.lang.StringBuffer sb, ObjectIntTreeMap items)
sb
- the buffer to print intoitems
- a Map of Items String/int[0]protected void printChartElement(java.lang.StringBuffer sb, java.lang.String legend, int value, int color, int spanLegend, boolean separator)
sb
- the buffer to printlegend
- the legend to displayvalue
- the value to display in %color
- the color setspanLegend
- separator
- protected void printHLegendRatio(java.lang.StringBuffer sb)
sb
- the buffer to printprotected void printVLegendRatio(java.lang.StringBuffer sb)
sb
- the buffer to printprotected void printLegentChart(java.lang.StringBuffer sb, java.util.List legendList)
sb
- the buffer to printprotected void printTitle(java.lang.StringBuffer sb)
protected void printVChartLegendList(java.lang.StringBuffer sb, java.util.List legendList)
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
public int doEndTag()
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
Copyright © 2001-2010 Jalios SA. All Rights Reserved.