Release Notes |
This document describes the main changes that have been made to JViews Charts since version 8.0.
Incompatibilities
Charts Symbols Palette
Interactors Source Code
Stacked Charts
Stacked Charts with Negative Values
Radar Charts
Labels of Category Scales
Performance: Batching of Events
Performance: CSS Styling
Performance: Labels
Performance: Repainting
Interactor Precedence
Interactions
Printing
PDF Generation
Sorting a Data Set
Legend Items API
Marker API
Model Sorting API
Model Adapters API
Internationalization
Eclipse/RCP Support
Applet Support
Other Changes in Charts Classes
Other Changes in DHTML JavaServer Faces Components
Other Changes in Utility Classes
Example Changes
IlvChart
was sometimes the chart itself and sometimes its associated lock: synchronized (chart)
and
synchronized (chart.getLock())
. Now it is always the associated lock. Please change all occurrences
of synchronized (chart)
to
synchronized (chart.getLock())
.
startBatched
,
endBatched
,
isBatched
)
had the effect to combine several data set events at the data set already. Now, instances of
DataSetListener
receive these events separately, preceded by an event of type
BATCH_BEGIN
and followed by an event of type
BATCH_END
.
Please review all your implementations of
DataSetListener
to make sure that they support the
BATCH_BEGIN
and
BATCH_END
event types. Simply ignoring these events is sufficient, although more elaborate treatment might be useful for performance reasons.
IlvChartServletSupport
now take "json" not "html" as format. Additional capabilities must now be streamed as JSON not JavaScript.
interactors
for details.
setStackedByIndex(true)
.
ilog.views.chart.renderer.IlvBarChartRenderer
isStackedByIndex()
:
Indicates whether the stacking is based on data set indices rather than on X values.
setStackedByIndex(boolean)
:
Specifies whether the stacking is based on data set indices rather than on X values.
ilog.views.chart.renderer.IlvPolylineChartRenderer
isStackedByIndex()
:
Indicates whether the stacking is based on data set indices rather than on X values.
setStackedByIndex(boolean)
:
Specifies whether the stacking is based on data set indices rather than on X values.
setDiverging
for details.
ilog.views.chart.IlvChartRenderer
STACKED_DIVERGING_BAR
:
Stacked diverging bar chart renderer type.
ilog.views.chart.renderer.IlvBarChartRenderer
isDiverging()
:
Returns true if negative values are stacked separately from positive values.
setDiverging(boolean)
:
Specifies whether negative values are stacked separately from positive values.
ilog.views.chart.renderer.IlvBarChartRenderer
getBarShape()
:
Returns the shape of the bars.
setBarShape(int)
:
Sets the shape of the bars.
ilog.views.chart.renderer.IlvSingleBarRenderer
getBarShape()
:
Returns the shape of the bars.
setBarShape(int)
:
Sets the shape of the bars.
SHAPE_EXACT
:
In this mode, every bar has an exact projected rectangle shape.
SHAPE_POLYGON
:
In this mode, every bar has a polygonal shape that approximates the exact projected shape.
SHAPE_QUADRILATERAL
:
In this mode, every bar has a quadrilateral (4-gon) shape.
ilog.views.chart.IlvCategoryStepsDefinition
isLabelBetweenCategory()
:
Indicates whether the labels are positioned between categories.
setLabelBetweenCategory(boolean)
:
Specifies whether the labels are positioned between categories.
In JViews 8.0 batching of changes at the data set level
(see startBatched
,
endBatched
,
isBatched
)
had the effect to combine several data set events at the data set already. Now, instances of
DataSetListener
receive these events separately, preceded by an event of type
BATCH_BEGIN
and followed by an event of type
BATCH_END
.
Please review all your implementations of
DataSetListener
to make sure that they support the
BATCH_BEGIN
and
BATCH_END
event types. There are three ways of doing so; they differ in the resulting performance:
IlvBatchingDataSetListener
.
ilog.views.chart.event.IlvBatchingDataSetListener
This class is a data set listener that wraps a data set listener and performs batching of events.
ilog.views.chart.event.DataSetContentsEvent
BATCH_BEGIN
:
Type of event sent when a series of events starts.
BATCH_END
:
Type of event sent when a series of events is terminated.
ilog.views.chart.data.IlvFilterDataSet
noteBatchBegin()
:
Reacts on a BATCH_BEGIN
event from the underlying data set.
noteBatchEnd()
:
Reacts on a BATCH_END
event from the underlying data set.
ilog.views.chart.IlvLabelRenderer
isCaching()
:
Returns true
if this label renderer caches previous text layouts and bounds, for speed.
setCaching(boolean)
:
Determines whether this label renderer caches previous text layouts and bounds, for speed.
Expensive drawing here means that the time to redraw the entire panel can be large, due to a large number of data points or annotations, or rendering with high graphic quality (anti-aliasing, gradients, text or similar).
Frequent update here means around 10 updates per second or more.
In this situation, the slowness can come from the default Swing RepaintManager
.
By default, it will combine the regions to be updated, preferring an update
of a large rectangle to two separate updates of small rectangles. While this
is a useful heuristic in a GUI that redraws itself quickly, it can be a
performance bottleneck in combination with JViews.
JViews provides a substitute RepaintManager
in the class
IlvExpensiveDrawingRepaintManager
.
It can greatly reduce the time needed for a redraw, by applying more advanced
heuristics regarding which area to redraw.
ilog.views.util.swing.IlvExpensiveDrawingRepaintManager
A repaint manager optimized for expensive drawing.
ilog.views.chart.IlvChartInteractor
setPriority(int)
:
Sets the priority of this interactor.
getDisplayItems(IlvChartDataPicker)
:
Returns the display items containing the specified point.
ilog.views.chart.IlvChartRenderer
getDisplayItems(Iterator, IlvChartDataPicker)
:
Returns the display items containing the specified point.
ilog.views.chart.IlvChartPrintContext
getBackground()
:
Returns the background color to use, instead of the default background color.
ilog.views.chart.print.IlvChartPrintableDocument
getBackground()
:
Returns the background color override.
setBackground(Color)
:
Sets the background color override.
paintToFO(Document, boolean, Color)
:
Generates an XSL-FO element representing this chart.
ilog.views.chart.data.IlvXSortedDataSet
This class encapsulates a data set and sorts its data points so that the X values are in ascending order.
IlvLegendItem
.
ilog.views.chart.IlvLegendItem
drawLabel(Graphics, Point2D)
:
Draws the label part of the item.
drawSymbol(Graphics, Rectangle)
:
Draws the symbol part of the item.
getLabelDimension()
:
Returns the dimension of the label part of the item.
ilog.views.chart.IlvIconLegendItem
drawSymbol(Graphics, Rectangle)
:
Draws the symbol part of this item.
ilog.views.chart.IlvRendererLegendItem
drawSymbol(Graphics, Rectangle)
:
Draws the symbol part of this item.
updateLabel()
:
Updates the label before drawing this item.
IlvMarker
to the class
IlvMarkerFactory
.
ilog.views.chart.graphic.IlvMarkerFactory
IlvTreeTableDataSource
can now be represented by a model independent object.
ilog.views.chart.datax.adapter.sort.IlvComparatorFactory
This interface allows you to create a
Comparator
for the objects in a given object model.
ilog.views.chart.datax.adapter.sort.IlvConstantComparatorFactory
This class represents a comparison that does not depend on the model being sorted.
ilog.views.chart.datax.adapter.sort.IlvLexicographicComparatorFactory
This class represents a comparison based on multiple comparison criteria, also known as "lexicographic" sorting.
ilog.views.chart.datax.adapter.sort.IlvColumnValueComparatorFactory
This class represents a comparison between model objects that is based on the values of the object in a given column.
ilog.views.chart.data.IlvTreeTableDataSource
getSortCriterionFactory()
:
Returns the sort criterion used to order the model objects, as a model-independent factory.
setSortCriterionFactory(IlvComparatorFactory)
:
Changes the sort criterion used to order the model objects.
ilog.views.chart.datax.adapter.IlvDataSourceToFlatTableModel
class can now create table columns containing the labels of the data sets.
ilog.views.chart.datax.adapter.IlvDataSourceToFlatTableModel
IlvDataSourceToFlatTableModel(IlvDataSource, boolean)
:
Creates a model backed by a given IlvDataSource
.
getUnderlyingDataSource()
:
Returns the underlying data source.
isIncludingLabels()
:
Returns true
if the labels are included as table columns.
ilog.views.chart.data.xml.IlvXMLDataWriter
IlvXMLDataWriter(Locale)
:
Creates a new IlvXMLDataWriter
.
getLocale()
:
Returns the locale used to convert dates to a textual representation.
setLocale(Locale)
:
Sets the locale used to convert dates to a textual representation.
JViews applications may need to use resources coming from different, unrelated
plugins. You can register the class loaders of these plugins in the class
IlvClassLoaderUtil
,
to ensure JViews will find them, despite the fact they are not all reachable
from a single class loader.
ilog.views.util.IlvClassLoaderUtil
This class contains utility functions for registering class loaders and for looking up classes and resources.
IlvResourceUtil
class.
This class allows you to configure applets so that they no longer attempt to load resources
unsuccessfully over the net for locale bundles that do not exist. This speeds up the startup
time of applets that run in browsers with a different locale than the locales provided by the applet.
ilog.views.util.IlvResourceUtil
Utilities for resource bundles.
isAutoDataRange
has been added.
getSpecifiedDataMax()
:
Returns the specified maximum value of data along this axis.
getSpecifiedDataMin()
:
Returns the specified minimum value of data along this axis.
getSpecifiedVisibleMax()
:
Returns the specified maximum value along this axis.
getSpecifiedVisibleMin()
:
Returns the specified minimum value along this axis.
isAutoDataRange()
:
Returns true
if the data range is computed and updated automatically.
ilog.views.chart.IlvChart.Area
revalidateLayout()
:
Revalidates the layout of this component.
ilog.views.chart.IlvChartDecoration
beforeDraw
, then draw
, then
afterDraw
. This produces better results when
some of the decorations overlap.
afterDraw(Graphics)
:
Invoked after the draw
method of all the drawables that have the same drawing order.
beforeDraw(Graphics)
:
Invoked before the draw
method of all the drawables that have the same drawing order.
ilog.views.chart.graphic.IlvDataIndicator
afterDraw(Graphics)
:
Draws the border of the indicator into the specified Graphics
context.
beforeDraw(Graphics)
:
Draws the background of the indicator into the specified Graphics
context.
getDrawStyle()
:
Returns the rendering style actually used for this indicator.
ilog.views.chart.IlvChartInteractor
getAWTEventMask()
:
Returns the event mask.
setChart(IlvChart)
:
Called when this interactor is attached to a chart or detached from its current chart.
toDisplay(IlvDoublePoint)
:
Returns the display coordinates corresponding to the specified data value.
ilog.views.chart.IlvChartRenderer
getVirtualDataSet(IlvDataSet)
:
Returns the virtual data set that is actually used, internally in the renderer, for rendering the specified data set.
ilog.views.chart.IlvDoublePoints
swapXYValues()
:
Swaps the x-values array and the y-values array.
ilog.views.chart.IlvLabelRenderer
getBounds(JComponent, double, double, String, Rectangle2D)
:
Returns the label bounds, according to the given position.
paintLabel(JComponent, Graphics, String, double, double)
:
Paints the label at the given position.
paintLabel(JComponent, Color, Graphics, String, double, double)
:
Paints the label at the given position.
ilog.views.chart.IlvCategoryStepsDefinition
getLabelDataSet()
:
Returns the data set that is used for computing labels.
getLabelDataSetIndex()
:
Returns the specified index of the labels data set in the chart's data source.
setLabelDataSetIndex(int)
:
Sets the index of the labels data set in the chart's data source.
ilog.views.chart.data.IlvAbstractDataSet
IlvAbstractDataSet
that have overridden computeLimits
now have a way to
invalidate the range cache.
invalidateLimits()
:
Invalidates the entire x range and y range cache.
invalidateLimits(int, int)
:
Invalidates the x range cache and y range cache from index firstIdx to index lastIdx (inclusive).
ilog.views.chart.data.IlvDataPoints
add(int, double[], double[], int[], int)
:
Inserts the specified values at the specified index.
ilog.views.chart.data.IlvDefaultDataSet
IlvDefaultDataSet(String, boolean)
:
Creates a new data set with the default initial capacity for data point storage.
getDataLabels()
:
Returns the data point labels.
getXValues()
:
Returns the x values of all data points in a freshly allocated array.
setXValues(double[])
:
Changes the x values of all data points.
getYValues()
:
Returns the y values of all data points in a freshly allocated array.
setYValues(double[])
:
Changes the y values of all data points.
setXData(int, double)
:
Modifies the x value of the data point at the specified index.
setYData(int, double)
:
Modifies the y value of the data point at the specified index.
ilog.views.chart.data.IlvDefaultDataSource
getDataSetAtPosition(int)
:
Returns the data set at a specified target position.
setDataSetAtPosition(int, IlvDataSet)
:
Sets the data set at a specified target position.
ilog.views.chart.data.IlvSwingTableDataSource
formatDataLabel(String)
:
Returns the data label to be used for a table cell value.
ilog.views.chart.data.lod.IlvDataTile
getindex()
:
Returns the ID of the tile.
ilog.views.chart.data.lod.IlvLODDataSet
getDataBetween(int, int)
:
Returns the data points between the two specified indices.
ilog.views.chart.renderer.IlvPieChartRenderer
strokeOn
bean property has been added. It propagates
down to every
IlvSinglePieRenderer
child renderer.
isStrokeOn()
:
Indicates whether the outline of the slices is drawn.
setStrokeOn(boolean)
:
Specifies whether the outline of the slices is drawn.
ilog.views.chart.renderer.IlvTreemapChartRenderer
getResolvedPrimaryDirection()
:
Returns the primary direction of arrangement of the rectangles, resolving locale dependent directions.
getResolvedSecondaryDirection()
:
Returns the secondary direction of arrangement of the rectangles, resolving locale dependent directions.
ilog.views.chart.faces.dhtml.component.IlvChartDHTMLView
getBeforeSessionExpirationHandler()
:
Returns the JavaScript code that will be called when the session is about to expire.
setBeforeSessionExpirationHandler(String)
:
Sets the JavaScript code that will be called when the session is about to expire.
ilog.views.chart.servlet.IlvChartServletSupport
getAdditionalCapabilities(IlvChart, IlvServletRequestParameters)
:
Allows you to put additional capabilities to the capability request.
getAdditionalOverviewCapabilities(IlvChart, IlvServletRequestParameters)
:
Allows you to put additional capabilities to the overview capability request.
JSON_CAP_FORMAT
:
The JSON capabilities format value for
CAP_FORMAT_PARAM
.
ilog.views.chart.servlet.IlvIMapArea
IlvIMapArea(Shape, IlvIMapAttributes)
:
Initializes an area with the specified shape and attributes.
IlvIMapArea(Shape, double, double, IlvIMapAttributes)
:
Initializes an area with the specified shape and attributes.
createTag(Shape, IlvIMapAttributes)
:
Returns the tag corresponding to a map area of an arbitrary shape.
createTag(Shape, double, double, IlvIMapAttributes)
:
Returns the tag corresponding to a map area of an arbitrary shape.
ilog.views.util.IlvRuntimeException
IlvRuntimeException
is a simpleRuntimeException
extension that allows a checked exception to be wrapped and rethrown as an unchecked exception.
ilog.views.util.collections.IlvBreadthFirstIterator
IlvBreadthFirstIterator
is an abstract class that provides traversal over a generic tree structure of objects in breadth first order.
ilog.views.util.data.IlvCSVTableModel
This class represents a table model as returned by the
IlvCSVReader
.
ilog.views.util.swing.IlvEventUtil
Utilities for event masks.
ilog.views.util.swing.IlvJSplitPane
This class is a variant of the Swing
JSplitPane
for which thesetDividerLocation
call has an effect even if called early, before the component is validated.
ilog.views.util.swing.layout.IlvGridFlowLayout
IlvGridFlowLayout
is an extension ofGridLayout
that lays out the components of a container in a rectangular grid.
ilog.views.chart.swing.IlvDoubleSlider
getIntervalToolTipText(double, double)
:
Returns the tooltip text corresponding to the interval (both thumbs).
getLowerBoundToolTipText(double)
:
Returns the tooltip text corresponding to the lower bound (left thumb).
getUpperBoundToolTipText(double)
:
Returns the tooltip text corresponding to the upper bound (right thumb).
ilog.views.util.styling.IlvMutableStyleSheet
removeAllRules()
:
Removes all rules.
ilog.views.util.swing.IlvSwingUtil
createMultiLineToolTipText(String[], int)
:
Creates an HTML text string that will render lines as a multiline tooltip.
escapeForHTMLAttribute(String, boolean)
:
Converts a string to HTML syntax, for including in an HTML attribute.
escapeForHTMLElement(String, boolean)
:
Converts a string to HTML syntax, for including in an HTML element.
invokeAndWaitForIdle(Runnable)
:
This method executes runnable.run() synchronously on the AWT event dispatching thread.
ilog.views.util.swing.SwingFactories
javax.swing.JTextField
that
validates the editing also on focus lost.
createTextField(String)
:
Returns a subclass of javax.swing.JTextField
that validates the editing also on focus lost.
createTextField(Document, String, int)
:
Returns a subclass of javax.swing.JTextField
that validates the editing also on focus lost.
interactors
has been added. It shows the use of the built-in interactors. It also
contains full source code, to help you writing your own interactors.