|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectDefaultValueDataset
org.pentaho.platform.uifoundation.chart.WidgetDefinition
org.pentaho.platform.uifoundation.chart.DialWidgetDefinition
public class DialWidgetDefinition
This class represents the definition of a dashboard dial. It holds:
org.pentaho.core.ui.component.JFreeChartEngine
Example Dial
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
DialWidgetDefinition(Document document,
double value,
int width,
int height,
IPentahoSession session)
TODO: PROBLEM HERE! See the note on the constructor above. |
|
DialWidgetDefinition(double value,
double minimum,
double maximum,
boolean rangeLimited)
|
|
DialWidgetDefinition(IPentahoResultSet data,
boolean byRow,
Node chartAttributes,
int width,
int height,
IPentahoSession session)
TODO PROBLEM HERE! If you use this constructor, the XML schema for the chart attributes is different than if you use the constructor with the arguments public DialWidgetDefinition( Document document, double value, int width, int height, IPentahoSession session). |
|
| Method Summary | |
|---|---|
void |
addInterval(MeterInterval interval)
Add an interval (MeterInterval) to the dial definition. |
void |
addSubTitle(String subTitle)
|
void |
addSubTitles(List subTitleNodes)
|
static void |
createDial(DialWidgetDefinition widgetDefinition,
Node dialNode,
int width,
int height,
IPentahoSession session)
Create a dial definition object from an XML document |
void |
deriveMinMax(double value)
|
Paint |
getBorderPaint()
|
Image |
getChartBackgroundImage()
|
Paint |
getChartBackgroundPaint()
|
DialShape |
getDialShape()
Return the shape to be used for the dial. |
int |
getHeight()
|
List |
getIntervals()
Return a list of the intervals for the dial. |
Font |
getLegendFont()
Return the java.awt.Font to be used to display the legend items |
static Log |
getLogger()
|
Paint |
getNeedlePaint()
Return the java.awt.Paint used to paint the needle of the dial image |
Paint[] |
getPaintSequence()
|
Image |
getPlotBackgroundImage()
|
Paint |
getPlotBackgroundPaint()
Return the java.awt.Paint object to be used to paint the backound of the dial. |
List |
getSubtitles()
|
Paint |
getTickPaint()
|
int |
getTickSize()
|
String |
getTitle()
|
Font |
getTitleFont()
Return the java.awt.Font to be used to display the dial title |
RectangleEdge |
getTitlePosition()
|
String |
getUnits()
|
Font |
getValueFont()
|
Paint |
getValuePaint()
|
int |
getWidth()
|
boolean |
isBorderVisible()
|
boolean |
isDisplayLabels()
|
boolean |
isLegendBorderVisible()
Return the boolen that states if the legend border is visible |
boolean |
isLegendIncluded()
|
boolean |
isThreeD()
|
void |
setChartBackgroundPaint(Paint chartBackgroundPaint)
|
void |
setDialShape(DialShape dialShape)
Sets the shape to be used for the dial. |
void |
setLegendBorderVisible(Node legendBorderVisibleNode)
|
void |
setLegendFont(Font legendFont)
Set java.awt.Font to be used to display the legend items |
void |
setNeedlePaint(Paint needlePaint)
Sets the java.awt.Paint object to be used to paint the needle of the dial image. |
void |
setPlotBackgroundPaint(Paint plotBackgroundPaint)
Return the java.awt.Paint object to be used to paint the backound of the dial. |
void |
setTickPaint(Paint tickPaint)
|
void |
setTickSize(int tickSize)
|
void |
setTitleFont(Font tFont)
|
void |
setUnits(String units)
|
void |
setValue(double value)
Sets the value to be displayed on the dial image |
void |
setValueFont(Font valueFont)
|
void |
setValuePaint(Paint valuePaint)
|
| Methods inherited from class org.pentaho.platform.uifoundation.chart.WidgetDefinition |
|---|
getMaximum, getMinimum, getNoDataMessage, setMaximum, setMinimum |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.pentaho.platform.uifoundation.chart.ChartDefinition |
|---|
getNoDataMessage |
| Constructor Detail |
|---|
public DialWidgetDefinition(double value,
double minimum,
double maximum,
boolean rangeLimited)
public DialWidgetDefinition(IPentahoResultSet data,
boolean byRow,
Node chartAttributes,
int width,
int height,
IPentahoSession session)
data - byRow - chartAttributes - width - height - session -
public DialWidgetDefinition(Document document,
double value,
int width,
int height,
IPentahoSession session)
document - value - width - height - session - | Method Detail |
|---|
public static Log getLogger()
public static void createDial(DialWidgetDefinition widgetDefinition,
Node dialNode,
int width,
int height,
IPentahoSession session)
doc - definition XML documentpublic void setUnits(String units)
public String getUnits()
public void deriveMinMax(double value)
public void addInterval(MeterInterval interval)
Intervals have a text
color. In this image the lowest interval text color is set to red. This
affects the outer rim, the interval value text
interval - A MeterInterval that defines an interval (range) on the dialpublic void setValue(double value)
value - The value to be displayedpublic Paint getPlotBackgroundPaint()
getPlotBackgroundPaint in interface ChartDefinitionpublic void setPlotBackgroundPaint(Paint plotBackgroundPaint)
public Paint getNeedlePaint()
public void setNeedlePaint(Paint needlePaint)
needlePaint - The Paint to use for ths needle of this dialpublic DialShape getDialShape()
public Font getTitleFont()
getTitleFont in interface ChartDefinitionpublic void setTitleFont(Font tFont)
public void setDialShape(DialShape dialShape)
![]() |
![]() |
![]() |
dialShape - The shape for this dialpublic List getIntervals()
public Paint[] getPaintSequence()
getPaintSequence in interface ChartDefinitionpublic Image getPlotBackgroundImage()
getPlotBackgroundImage in interface ChartDefinitionpublic List getSubtitles()
getSubtitles in interface ChartDefinitionpublic void addSubTitles(List subTitleNodes)
public void addSubTitle(String subTitle)
public Paint getChartBackgroundPaint()
getChartBackgroundPaint in interface ChartDefinitionpublic Image getChartBackgroundImage()
getChartBackgroundImage in interface ChartDefinitionpublic boolean isBorderVisible()
isBorderVisible in interface ChartDefinitionpublic Paint getBorderPaint()
getBorderPaint in interface ChartDefinitionpublic RectangleEdge getTitlePosition()
getTitlePosition in interface ChartDefinitionpublic void setChartBackgroundPaint(Paint chartBackgroundPaint)
chartBackgroundPaint - The chartBackgroundPaint to set.public int getHeight()
getHeight in interface ChartDefinitionpublic int getWidth()
getWidth in interface ChartDefinitionpublic String getTitle()
getTitle in interface ChartDefinitionpublic boolean isLegendIncluded()
isLegendIncluded in interface ChartDefinitionpublic boolean isThreeD()
isThreeD in interface ChartDefinitionpublic Paint getValuePaint()
public Paint getTickPaint()
public int getTickSize()
public void setValuePaint(Paint valuePaint)
public void setTickPaint(Paint tickPaint)
public void setTickSize(int tickSize)
public Font getValueFont()
getValueFont in class WidgetDefinitionpublic void setValueFont(Font valueFont)
public boolean isDisplayLabels()
isDisplayLabels in interface ChartDefinitionpublic Font getLegendFont()
getLegendFont in interface ChartDefinitionpublic void setLegendFont(Font legendFont)
Font - The java.awt.Font for the legend itemspublic void setLegendBorderVisible(Node legendBorderVisibleNode)
public boolean isLegendBorderVisible()
isLegendBorderVisible in interface ChartDefinition
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||