public class OverlayChart extends AbstractChart implements GroupedCharts, Observer
| Modifier and Type | Class and Description |
|---|---|
static class |
OverlayChart.RegisterPersistence |
chart, chartEditorWrapper, chartManager, chartProperties, chartRenderer, chartRenderingInfo, dataSet, dataSetEmpty, domainAxis, isAChartSymbol, isDirty, isVisible, legend, NO_DATA_MESSAGE, observers, rangeAxis| Constructor and Description |
|---|
OverlayChart() |
OverlayChart(OverlayChartProperties chartProps) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChartService(ChartService service)
Inserts a new
ChartService on the group |
GroupedCharts |
copy() |
LegendTitle |
createLegend(ChartService cs,
Graphics2D g,
Rectangle r,
org.jfree.chart.ChartRenderingInfo info) |
void |
deleteAllChartServices()
Removes all the
ChartServices of the group |
void |
deleteChartService(ChartService service)
Removes a
ChartService of the group |
void |
draw(Graphics2D g,
Rectangle r)
This method draws a ChartService in a specific area.
|
void |
exportAsPDF(String file,
int width,
int height) |
ChartDataSet |
getChartDataSet()
Obtains the ChartService's data that is used on the chart
|
List<ChartService> |
getChartServices()
Get the
ChartServices grouped on it |
List<ChartAxis> |
getDomainAxis()
Useful to get the DomainAxis of a ChartService
|
Font |
getFontScaled() |
GroupedChartsProperties |
getGroupedChartsProperties() |
protected JFreeChart |
getInternalChart() |
protected JFreeChart |
getInternalChart(int i) |
LegendItemCollection |
getLegendItemCollection() |
Manager |
getManager()
Returns a reference to the
Manager which manages this server. |
protected ProviderManager |
getProviderManager()
Returns the reference to the
ProviderManager. |
List<ValueAxis> |
getRangeAxis()
Get the
ValueAxis of a ChartService |
ChartRenderer |
getRenderer()
It gets the renderer used to drawn the chart.
|
List<ChartSerieEntity> |
getSeries() |
boolean |
hasDomainAxis()
Check if it has a DomainAxis (
ChartAxis) |
boolean |
hasRangeAxis()
Check if it has a RangeAxis (
ValueAxis) |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
notifyChange(GroupedCharts charts) |
void |
redrawCharts() |
void |
refreshCharts() |
void |
saveChartToPDF(JFreeChart chart,
String fileName,
int width,
int height) |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
scaleFonts(double ratio)
Method used to scale the fonts to be readable when the chart is resized
|
void |
setAxisVisibles(boolean visible) |
void |
setChartDataSet(ChartDataSet data)
Insert a ChartDataSet to the service
|
void |
setChartServices(List<ChartService> chartServ) |
void |
setDataSource() |
void |
setDataSource(FeatureStore store) |
void |
setFontScaled(Font myScale) |
void |
update(Observable observable,
Object notification)
Called whenever a
Observable object is changed and this
Observer has registered on it to receive notifications. |
protected void |
updateChartService() |
void |
updateChartService(int index,
ChartService service)
Update a contained
ChartService |
addChartRenderer, addDefaultChartRenderer, addObserver, canBeOverlayed, clone, createChartLegendItems, createLegend, createNewChartSerieEntity, deleteObserver, deleteObservers, getCategoriesPaint, getChartEditor, getChartLegend, getChartLegendItems, getChartName, getChartProperties, getChartRenderer, getChartRenderers, getChartRenderingInfo, getChartType, getDefaultChartRenderer, getInnerChart, getNullGroupIgnored, getNumber, getRequiredFieldValue, initializeRenderers, isAChartSymbol, isVisible, loadSavedChartLegendItems, notifyObservers, refreshChart, setBackgroundPaint, setBackgroundPaint, setCategoriesPaint, setChartLegend, setChartProperties, setChartRenderingInfo, setDirty, setDomainAxis, setDomainAxis, setInnerChart, setIsAChartSymbol, setNullGroupIgnored, setRangeAxis, setRangeAxis, setVisible, toCategoryValue, toSerieValue, toXPixelValue, toYPixelValue, updategetProvider, getProviderServices, getServiceParameters, initequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddObserver, deleteObserver, deleteObserverspublic OverlayChart()
public OverlayChart(OverlayChartProperties chartProps)
public Manager getManager()
ServiceManager which manages this server.getManager in interface ServiceManagerprotected ProviderManager getProviderManager()
AbstractServiceProviderManager.getProviderManager in class AbstractServiceprotected JFreeChart getInternalChart()
getInternalChart in class AbstractChartprotected JFreeChart getInternalChart(int i)
public void scaleFonts(double ratio)
ChartServicescaleFonts in interface ChartServicescaleFonts in class AbstractChartpublic void setAxisVisibles(boolean visible)
setAxisVisibles in interface ChartServicesetAxisVisibles in class AbstractChartpublic void draw(Graphics2D g, Rectangle r)
ChartServicedraw in interface ChartServicepublic LegendTitle createLegend(ChartService cs, Graphics2D g, Rectangle r, org.jfree.chart.ChartRenderingInfo info)
public List<ChartSerieEntity> getSeries()
public List<ChartAxis> getDomainAxis()
ChartServicegetDomainAxis in interface ChartServicegetDomainAxis in class AbstractChartChartAxis) that compounds the chartpublic List<ValueAxis> getRangeAxis()
ChartServiceValueAxis of a ChartServicegetRangeAxis in interface ChartServicegetRangeAxis in class AbstractChartValueAxis) that compounds the chartpublic void setDataSource(FeatureStore store)
public void setDataSource()
public void setChartDataSet(ChartDataSet data)
ChartServicesetChartDataSet in interface ChartServicesetChartDataSet in class AbstractChartpublic ChartDataSet getChartDataSet()
ChartServicegetChartDataSet in interface ChartServicegetChartDataSet in class AbstractChartChartDataSetpublic List<ChartService> getChartServices()
GroupedChartsChartServices grouped on itgetChartServices in interface GroupedChartsChartServicespublic void setChartServices(List<ChartService> chartServ)
public ChartRenderer getRenderer()
ChartServicegetRenderer in interface ChartServicegetRenderer in class AbstractChartpublic boolean hasDomainAxis()
ChartServiceChartAxis)hasDomainAxis in interface ChartServicepublic boolean hasRangeAxis()
ChartServiceValueAxis)hasRangeAxis in interface ChartServicepublic GroupedChartsProperties getGroupedChartsProperties()
getGroupedChartsProperties in interface GroupedChartspublic void update(Observable observable, Object notification)
ObserverObservable object is changed and this
Observer has registered on it to receive notifications.
Implementations of this method will be called for each simple notification or, if a complex notification is created, for each of the child notifications.
In the latter case, don't assume any ordering in the notification between
this Observer and other Observers listening to the same
Observable.
In a complex notification scenario, if you want to receive only the
complex notification and not each of the child notifications, just
implement the ComplexObserver and prepare this method
implementation to handle receiving DefaultComplexNotification instances
as well as direct notification objects.
public void addChartService(ChartService service)
GroupedChartsChartService on the groupaddChartService in interface GroupedChartspublic void updateChartService(int index,
ChartService service)
GroupedChartsChartServiceupdateChartService in interface GroupedChartsindex - index of the ChartService editedservice - ChartService edited to replace the old versionpublic void deleteChartService(ChartService service)
GroupedChartsChartService of the groupdeleteChartService in interface GroupedChartspublic void deleteAllChartServices()
GroupedChartsChartServices of the groupdeleteAllChartServices in interface GroupedChartsprotected void updateChartService()
updateChartService in class AbstractChartpublic LegendItemCollection getLegendItemCollection()
getLegendItemCollection in class AbstractChartpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class AbstractChartPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class AbstractChartPersistenceExceptionpublic GroupedCharts copy()
copy in interface GroupedChartspublic void setFontScaled(Font myScale)
setFontScaled in interface ChartServicesetFontScaled in class AbstractChartpublic Font getFontScaled()
public void refreshCharts()
refreshCharts in interface GroupedChartspublic void redrawCharts()
redrawCharts in interface GroupedChartspublic void notifyChange(GroupedCharts charts)
notifyChange in interface GroupedChartspublic void exportAsPDF(String file, int width, int height)
exportAsPDF in interface GroupedChartspublic void saveChartToPDF(JFreeChart chart,
String fileName,
int width,
int height)