public abstract class AbstractPlot extends java.lang.Object implements IPlot
IPlot
. This class does not manage the data source, categories, or
dependent series. It also does not handle drawing the plot.DEFAULT_CATEGORY
Constructor and Description |
---|
AbstractPlot() |
Modifier and Type | Method and Description |
---|---|
boolean |
addPlotListener(IPlotListener listener)
Adds the specified listener to the plot to receive updates.
|
java.lang.String |
createAdditionalPage(org.eclipse.ui.part.MultiPageEditorPart parent,
org.eclipse.ui.IFileEditorInput file,
int pageNum)
Directs the service to draw one of its additional pages and add it to the
MultiPageEditorPart.
|
org.eclipse.swt.widgets.Composite |
draw(org.eclipse.swt.widgets.Composite parent)
This operation draws the canvas contents onto the given parent Composite.
|
java.util.List<java.lang.String> |
getCategories()
Gets all of the categories currently associated with this plot.
|
java.util.ArrayList<org.eclipse.jface.action.Action> |
getCustomActions()
Get the list of Actions available to this plot.
|
java.net.URI |
getDataSource()
This operation returns the data source that is plotted/drawn by this
IPlot.
|
java.util.List<ISeries> |
getDependentSeries(java.lang.String category)
Gets all of the dependent series specified for this IPlot, as a list, for
the specified category.
|
ISeries |
getIndependentSeries()
Gets the independent series for the plot.
|
int |
getNumAdditionalPages()
Gets the number of pages this service will display in the plot editor in
addition to the main canvas.
|
int |
getNumberOfAxes()
This operation returns the number of axes of the plot.
|
java.lang.String |
getPlotTitle()
Gets the title of the plot to be displayed in whatever visualization
service is rendering this plot
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
This operation returns properties of this IPlot that can be safely
modified and/or tuned by the client.
|
IRenderElementHolder |
getRenderElementHolder(Geometry geometry)
Get the list of render elements used to display the given geometry in
this canvas.
|
java.lang.String |
getSourceHost()
This operation retrieves the hostname for this IPlot's data source.
|
boolean |
isSourceRemote()
This operation signifies whether or not the IPlot's host is local or
remote.
|
void |
redraw()
This operation directs the IPlot to redraw its contents.
|
boolean |
removePlotListener(IPlotListener listener)
Removes the specified listener from receiving plot update events.
|
void |
save(org.eclipse.core.runtime.IProgressMonitor monitor)
Save the contents of the plot to the source file.
|
void |
saveAs()
Open a dialog to save the plot's contents.
|
boolean |
setDataSource(java.net.URI uri)
Sets the URI for this plot.
|
void |
setIndependentSeries(ISeries series)
Sets the series that will be on the independent axis for this plot.
|
void |
setPlotTitle(java.lang.String title)
Sets the title of the plot to the specified string.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> props)
This operation updates the properties of the plot based on client-side
modifications.
|
public boolean addPlotListener(IPlotListener listener)
listener
- The listener to add. null
cannot be added.public IRenderElementHolder getRenderElementHolder(Geometry geometry)
IVizCanvas
getRenderElementHolder
in interface IVizCanvas
geometry
- The geometry whose corresponding IRenderElements are sought.public org.eclipse.swt.widgets.Composite draw(org.eclipse.swt.widgets.Composite parent) throws java.lang.Exception
IVizCanvas
draw
in interface IVizCanvas
java.lang.Exception
public java.util.List<java.lang.String> getCategories()
IPlot
getCategories
in interface IPlot
public java.util.ArrayList<org.eclipse.jface.action.Action> getCustomActions()
IPlot
getCustomActions
in interface IPlot
public java.net.URI getDataSource()
IVizCanvas
getDataSource
in interface IVizCanvas
public java.util.List<ISeries> getDependentSeries(java.lang.String category)
IPlot
getDependentSeries
in interface IPlot
public ISeries getIndependentSeries()
IPlot
getIndependentSeries
in interface IPlot
public int getNumberOfAxes()
IVizCanvas
getNumberOfAxes
in interface IVizCanvas
public java.lang.String getPlotTitle()
IPlot
getPlotTitle
in interface IPlot
public java.util.Map<java.lang.String,java.lang.String> getProperties()
IVizCanvas
getProperties
in interface IVizCanvas
public java.lang.String getSourceHost()
IVizCanvas
getSourceHost
in interface IVizCanvas
public boolean isSourceRemote()
IVizCanvas
isSourceRemote
in interface IVizCanvas
public void redraw()
IVizCanvas
redraw
in interface IVizCanvas
public boolean removePlotListener(IPlotListener listener)
listener
- The listener to remove.public boolean setDataSource(java.net.URI uri) throws java.lang.Exception
uri
- The new data source URI.java.lang.Exception
- If there was an error setting the data source.public void setIndependentSeries(ISeries series)
IPlot
setIndependentSeries
in interface IPlot
series
- The independent series, used to plot the other independent
seriespublic void setPlotTitle(java.lang.String title)
IPlot
setPlotTitle
in interface IPlot
title
- The new title for this plotpublic void setProperties(java.util.Map<java.lang.String,java.lang.String> props) throws java.lang.Exception
IVizCanvas
setProperties
in interface IVizCanvas
props
- The updated propertiesjava.lang.Exception
- This exception indicates that the IPlot could not update its
properties or redraw itself.public java.lang.String createAdditionalPage(org.eclipse.ui.part.MultiPageEditorPart parent, org.eclipse.ui.IFileEditorInput file, int pageNum)
IPlot
createAdditionalPage
in interface IPlot
parent
- The part which the page will be added to.file
- The file to use as input for the page.pageNum
- The id of the page to be drawn.public int getNumAdditionalPages()
IPlot
getNumAdditionalPages
in interface IPlot
public void save(org.eclipse.core.runtime.IProgressMonitor monitor)
IPlot