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
ChartService s 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
ChartService s 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, update
getProvider, getProviderServices, getServiceParameters, init
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addObserver, deleteObserver, deleteObservers
public OverlayChart()
public OverlayChart(OverlayChartProperties chartProps)
public Manager getManager()
Service
Manager
which manages this server.getManager
in interface Service
Manager
protected ProviderManager getProviderManager()
AbstractService
ProviderManager
.getProviderManager
in class AbstractService
protected JFreeChart getInternalChart()
getInternalChart
in class AbstractChart
protected JFreeChart getInternalChart(int i)
public void scaleFonts(double ratio)
ChartService
scaleFonts
in interface ChartService
scaleFonts
in class AbstractChart
public void setAxisVisibles(boolean visible)
setAxisVisibles
in interface ChartService
setAxisVisibles
in class AbstractChart
public void draw(Graphics2D g, Rectangle r)
ChartService
draw
in interface ChartService
public LegendTitle createLegend(ChartService cs, Graphics2D g, Rectangle r, org.jfree.chart.ChartRenderingInfo info)
public List<ChartSerieEntity> getSeries()
public List<ChartAxis> getDomainAxis()
ChartService
getDomainAxis
in interface ChartService
getDomainAxis
in class AbstractChart
ChartAxis
) that compounds the chartpublic List<ValueAxis> getRangeAxis()
ChartService
ValueAxis
of a ChartServicegetRangeAxis
in interface ChartService
getRangeAxis
in class AbstractChart
ValueAxis
) that compounds the chartpublic void setDataSource(FeatureStore store)
public void setDataSource()
public void setChartDataSet(ChartDataSet data)
ChartService
setChartDataSet
in interface ChartService
setChartDataSet
in class AbstractChart
public ChartDataSet getChartDataSet()
ChartService
getChartDataSet
in interface ChartService
getChartDataSet
in class AbstractChart
ChartDataSet
public List<ChartService> getChartServices()
GroupedCharts
ChartService
s grouped on itgetChartServices
in interface GroupedCharts
ChartService
spublic void setChartServices(List<ChartService> chartServ)
public ChartRenderer getRenderer()
ChartService
getRenderer
in interface ChartService
getRenderer
in class AbstractChart
public boolean hasDomainAxis()
ChartService
ChartAxis
)hasDomainAxis
in interface ChartService
public boolean hasRangeAxis()
ChartService
ValueAxis
)hasRangeAxis
in interface ChartService
public GroupedChartsProperties getGroupedChartsProperties()
getGroupedChartsProperties
in interface GroupedCharts
public void update(Observable observable, Object notification)
Observer
Observable
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 Observer
s 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)
GroupedCharts
ChartService
on the groupaddChartService
in interface GroupedCharts
public void updateChartService(int index, ChartService service)
GroupedCharts
ChartService
updateChartService
in interface GroupedCharts
index
- index of the ChartService
editedservice
- ChartService
edited to replace the old versionpublic void deleteChartService(ChartService service)
GroupedCharts
ChartService
of the groupdeleteChartService
in interface GroupedCharts
public void deleteAllChartServices()
GroupedCharts
ChartService
s of the groupdeleteAllChartServices
in interface GroupedCharts
protected void updateChartService()
updateChartService
in class AbstractChart
public LegendItemCollection getLegendItemCollection()
getLegendItemCollection
in class AbstractChart
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractChart
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
loadFromState
in class AbstractChart
PersistenceException
public GroupedCharts copy()
copy
in interface GroupedCharts
public void setFontScaled(Font myScale)
setFontScaled
in interface ChartService
setFontScaled
in class AbstractChart
public Font getFontScaled()
public void refreshCharts()
refreshCharts
in interface GroupedCharts
public void redrawCharts()
redrawCharts
in interface GroupedCharts
public void notifyChange(GroupedCharts charts)
notifyChange
in interface GroupedCharts
public void exportAsPDF(String file, int width, int height)
exportAsPDF
in interface GroupedCharts
public void saveChartToPDF(JFreeChart chart, String fileName, int width, int height)