| org.pentaho.plugin.jfreechart.WidgetDefinition org.pentaho.plugin.jfreechart.DialWidgetDefinition
DialWidgetDefinition | public class DialWidgetDefinition extends WidgetDefinition implements ChartDefinition(Code) | | This class represents the definition of a dashboard dial. It holds:
- The value to be displayed on the dial
- Minimum value of the dial
- Maximum value of the dial
- A list of intervals with the dial. Each interval specifies a minimum,
maximum and information about how the interval should be painted.
- Painting information
- Background paint
- Dial paint
- Needle paint
This class does not generate an image of the dial, it just defines the
properties of the dial. Dial definitions are stored in xml documents in
the solution folders with *.dial.xml extensions. These definition files store
XML representations of all the settings here. Typically the value to be
displayed is provided at runtime by a query or business rule, but the value
can also read from the definition file. The definitions are read by
org.pentaho.core.ui.component.DashboardWidgetComponent objects, which create
instances of this object and set the properties defined here. The
DashboardWidgetComponent objects pass this, now populated, object to
The dial image is generated by
org.pentaho.core.ui.component.JFreeChartEngine
Example Dial
|
Constructor Summary | |
public | DialWidgetDefinition(double value, double minimum, double maximum, boolean rangeLimited) | public | 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). | public | DialWidgetDefinition(Document document, double value, int width, int height, IPentahoSession session) TODO: PROBLEM HERE! See the note on the constructor above. |
DialWidgetDefinition | public DialWidgetDefinition(double value, double minimum, double maximum, boolean rangeLimited)(Code) | | |
DialWidgetDefinition | public DialWidgetDefinition(IPentahoResultSet data, boolean byRow, Node chartAttributes, int width, int height, IPentahoSession session)(Code) | | 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). This constructor expects the
chart attribute nodes to be children of the node, whereas the latter constructor expects the attributes to be children of a node.
This does not help us with our parity situation, and should be deprecated and reconciled.
Parameters: data - Parameters: byRow - Parameters: chartAttributes - Parameters: width - Parameters: height - Parameters: session - |
DialWidgetDefinition | public DialWidgetDefinition(Document document, double value, int width, int height, IPentahoSession session)(Code) | | TODO: PROBLEM HERE! See the note on the constructor above.
Parameters: document - Parameters: value - Parameters: width - Parameters: height - Parameters: session - |
addInterval | public void addInterval(MeterInterval interval)(Code) | | Add an interval (MeterInterval) to the dial definition. The interval
defines a range and how it should be painted. The dial images here
have three intervals. The lowest interval has a minimum of 0 and a
maximum of 30. Intervals have a color. In this image the lowest
interval color is set to red. 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
Parameters: interval - A MeterInterval that defines an interval (range) on the dial |
addSubTitles | public void addSubTitles(List subTitleNodes)(Code) | | |
createDial | public static void createDial(DialWidgetDefinition widgetDefinition, Node dialNode, int width, int height, IPentahoSession session)(Code) | | Create a dial definition object from an XML document
Parameters: doc - definition XML document Dial definition object |
deriveMinMax | public void deriveMinMax(double value)(Code) | | |
getChartBackgroundImage | public Image getChartBackgroundImage()(Code) | | |
getChartBackgroundPaint | public Paint getChartBackgroundPaint()(Code) | | |
getDialShape | public DialShape getDialShape()(Code) | | Return the shape to be used for the dial.
DialShape The DialShape for this dial |
getHeight | public int getHeight()(Code) | | |
getIntervals | public List getIntervals()(Code) | | Return a list of the intervals for the dial. Each object in the list is a
MeterInterval object.
List The list of MeterInterval objects for this dial |
getLegendFont | public Font getLegendFont()(Code) | | Return the java.awt.Font to be used to display the legend items
Font The font for the legend items |
getLogger | public static Log getLogger()(Code) | | |
getNeedlePaint | public Paint getNeedlePaint()(Code) | | Return the java.awt.Paint used to paint the needle of the dial image
The Paint to use for the needle of this dial |
getPaintSequence | public Paint[] getPaintSequence()(Code) | | |
getPlotBackgroundImage | public Image getPlotBackgroundImage()(Code) | | |
getPlotBackgroundPaint | public Paint getPlotBackgroundPaint()(Code) | | Return the java.awt.Paint object to be used to paint the backound of the
dial.
The Paint to be used |
getTickSize | public int getTickSize()(Code) | | |
getTitleFont | public Font getTitleFont()(Code) | | Return the java.awt.Font to be used to display the dial title
Font The Font for the title of this dial |
getTitlePosition | public RectangleEdge getTitlePosition()(Code) | | |
getWidth | public int getWidth()(Code) | | |
isBorderVisible | public boolean isBorderVisible()(Code) | | |
isDisplayLabels | public boolean isDisplayLabels()(Code) | | |
isLegendBorderVisible | public boolean isLegendBorderVisible()(Code) | | Return the boolen that states if the legend border is visible
boolean Is the legend border visible |
isLegendIncluded | public boolean isLegendIncluded()(Code) | | |
isThreeD | public boolean isThreeD()(Code) | | |
setChartBackgroundPaint | public void setChartBackgroundPaint(Paint chartBackgroundPaint)(Code) | | Parameters: chartBackgroundPaint - The chartBackgroundPaint to set. |
setDialShape | public void setDialShape(DialShape dialShape)(Code) | | Sets the shape to be used for the dial. This affects the area of dial
outside the range that the needle covers.
Parameters: dialShape - The shape for this dial |
setLegendBorderVisible | public void setLegendBorderVisible(Node legendBorderVisibleNode)(Code) | | |
setLegendBorderVisible | public void setLegendBorderVisible(boolean legendBorderVisible)(Code) | | boolean legendBorderVisibleSet the visibility of the legend border. |
setLegendFont | public void setLegendFont(Font legendFont)(Code) | | Set java.awt.Font to be used to display the legend items
Parameters: Font - The java.awt.Font for the legend items |
setLegendFont | public void setLegendFont(Node legendFontNode)(Code) | | |
setNeedlePaint | public void setNeedlePaint(Paint needlePaint)(Code) | | Sets the java.awt.Paint object to be used to paint the needle of the dial
image. In this image the needle paint has been set to red.
Parameters: needlePaint - The Paint to use for ths needle of this dial |
setPlotBackgroundPaint | public void setPlotBackgroundPaint(Paint plotBackgroundPaint)(Code) | | Return the java.awt.Paint object to be used to paint the backound of the
dial. In this image the background paint has been set to red
The Paint to used for the background of the image |
setTickPaint | public void setTickPaint(Paint tickPaint)(Code) | | |
setTickSize | public void setTickSize(int tickSize)(Code) | | |
setTitleFont | public void setTitleFont(Font tFont)(Code) | | |
setValue | public void setValue(double value)(Code) | | Sets the value to be displayed on the dial image
Parameters: value - The value to be displayed |
setValueFont | public void setValueFont(Font valueFont)(Code) | | |
setValuePaint | public void setValuePaint(Paint valuePaint)(Code) | | |
|
|