org.freehep.jas.plugin.plotter
Class PlotterPlugin

java.lang.Object
  extended by org.freehep.application.studio.Plugin
      extended by org.freehep.jas.plugin.plotter.PlotterPlugin
All Implemented Interfaces:
XMLPluginIO, PlotFactory, PlotterProvider

public class PlotterPlugin
extends org.freehep.application.studio.Plugin
implements PlotFactory, PlotterProvider, XMLPluginIO

Author:
tonyj

Nested Class Summary
 class PlotterPlugin.PlotterCommands
           
 
Field Summary
 
Fields inherited from interface org.freehep.jas.plugin.xmlio.XMLPluginIO
RESTORE_DATA, RESTORE_DONE, RESTORE_FINALIZE, RESTORE_PAGES, RESTORE_PLOT_DATA_SOURCES, RESTORE_PLOTS_IN_PAGES, RESTORE_TREE_OBJECTS, RESTORE_TREE_STRUCTURE
 
Constructor Summary
PlotterPlugin()
           
 
Method Summary
 boolean canCreatePlotterFor(Class dataType)
          Tests if can create a plotter for the given data type
 boolean canCreatePlotterFor(Class[] dataType)
          Tests if can create a plotter for the given data types
 Plotter create()
          Create a plotter.
 PlotPage createPage(String name)
          Create a page which can be used to display plots.
 Plotter createPlotterFor(Class dataType)
          Returns a plotter which is able to plot the given class of data.
 Plotter createPlotterFor(Class[] dataType)
          Returns a plotter which is able to plot all of the given classes of data.
 PlotPage currentPage()
          Returns the currently selected plot page, or null if no plot page is currently selected.
 void init()
           
 List pages()
          Returns a list of all PlotPage's which are showing.
protected  PlotterAdapterLookup plotterAdapterLookup()
           
 void registerAdapter(PlotterAdapter adapter, Class from, Class to)
          Register a Plotter adapter that can convert an Object of class "from" to an object of class "to".
 int restore(int level, org.freehep.xml.io.XMLIOManager manager, org.jdom.Element el)
          level is the level at which the restore should be performed.
 void save(org.freehep.xml.io.XMLIOManager manager, org.jdom.Element el)
           
 boolean supports(Class klass)
          Test if a given class of data is supported
 
Methods inherited from class org.freehep.application.studio.Plugin
addMenu, applicationVisible, canBeShutDown, getApplication, postInit, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlotterPlugin

public PlotterPlugin()
Method Detail

init

public void init()
          throws SAXException,
                 IOException
Overrides:
init in class org.freehep.application.studio.Plugin
Throws:
SAXException
IOException

plotterAdapterLookup

protected PlotterAdapterLookup plotterAdapterLookup()

createPage

public PlotPage createPage(String name)
Description copied from interface: PlotFactory
Create a page which can be used to display plots.

Specified by:
createPage in interface PlotFactory
Parameters:
name - The name, or null for a default name

createPlotterFor

public Plotter createPlotterFor(Class dataType)
Description copied from interface: PlotFactory
Returns a plotter which is able to plot the given class of data.

Specified by:
createPlotterFor in interface PlotFactory

createPlotterFor

public Plotter createPlotterFor(Class[] dataType)
Description copied from interface: PlotFactory
Returns a plotter which is able to plot all of the given classes of data.

Specified by:
createPlotterFor in interface PlotFactory

canCreatePlotterFor

public boolean canCreatePlotterFor(Class dataType)
Description copied from interface: PlotFactory
Tests if can create a plotter for the given data type

Specified by:
canCreatePlotterFor in interface PlotFactory

canCreatePlotterFor

public boolean canCreatePlotterFor(Class[] dataType)
Description copied from interface: PlotFactory
Tests if can create a plotter for the given data types

Specified by:
canCreatePlotterFor in interface PlotFactory

currentPage

public PlotPage currentPage()
Description copied from interface: PlotFactory
Returns the currently selected plot page, or null if no plot page is currently selected.

Specified by:
currentPage in interface PlotFactory

create

public Plotter create()
Description copied from interface: PlotterProvider
Create a plotter.

Specified by:
create in interface PlotterProvider
Returns:
The newly created Plotter.

supports

public boolean supports(Class klass)
Description copied from interface: PlotterProvider
Test if a given class of data is supported

Specified by:
supports in interface PlotterProvider
Parameters:
klass - The type of data to test for
Returns:
true if this data type is supported

registerAdapter

public void registerAdapter(PlotterAdapter adapter,
                            Class from,
                            Class to)
Description copied from interface: PlotFactory
Register a Plotter adapter that can convert an Object of class "from" to an object of class "to".

Specified by:
registerAdapter in interface PlotFactory
Parameters:
adapter - The PlotterAdapter.
from - The class of the objects that can be converted.
to - The class to which the objects can be converted.

restore

public int restore(int level,
                   org.freehep.xml.io.XMLIOManager manager,
                   org.jdom.Element el)
Description copied from interface: XMLPluginIO
level is the level at which the restore should be performed. Levels: 0 - the initial level. At this level all the data should be restored. This level MUST be present!!! > 100 - final state restoring: finishing touches on the tree, order of the panels on the plot area and console area.

Specified by:
restore in interface XMLPluginIO

save

public void save(org.freehep.xml.io.XMLIOManager manager,
                 org.jdom.Element el)
Specified by:
save in interface XMLPluginIO

pages

public List pages()
Description copied from interface: PlotFactory
Returns a list of all PlotPage's which are showing.

Specified by:
pages in interface PlotFactory


Copyright © 2013. All Rights Reserved.