org.freehep.jas.plugin.tree
Class FTreePlugin

java.lang.Object
  extended by org.freehep.application.studio.Plugin
      extended by org.freehep.jas.plugin.tree.FTreePlugin
All Implemented Interfaces:
FTreeProvider, XMLPluginIO, PreferencesTopic

public class FTreePlugin
extends org.freehep.application.studio.Plugin
implements FTreeProvider, XMLPluginIO, PreferencesTopic

Author:
The FreeHEP team @ SLAC

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
FTreePlugin()
           
 
Method Summary
 boolean apply(JComponent panel)
          Called when the user pushes the apply button in the preferences dialog.
 JComponent component()
          Get the component to display in the preferences dialog
protected  void init()
           
 String[] namesOfExistingTrees()
          Get the names of the exising FTrees.
 String[] path()
          Specifies where in the preferences tree this item should appear.
 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)
           
 FTree tree()
          Get the provider's default FTree.
 FTree tree(String name)
          Get an FTree by name.
 FTreeNodeAdapterRegistry treeNodeAdapterRegistry()
          Get the FTreeNodeAdapterRegistry.
 
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

FTreePlugin

public FTreePlugin()
Method Detail

init

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

treeNodeAdapterRegistry

public FTreeNodeAdapterRegistry treeNodeAdapterRegistry()
Description copied from interface: FTreeProvider
Get the FTreeNodeAdapterRegistry. Via the FTreeNodeAdapterRegistry it is possible to register FTreeNodeAdapters and FTreeNodeObjectProviders to shape the behavior of FTreeNodes.

Specified by:
treeNodeAdapterRegistry in interface FTreeProvider
Returns:
The FTreeNodeAdapterRegistry.

namesOfExistingTrees

public String[] namesOfExistingTrees()
Description copied from interface: FTreeProvider
Get the names of the exising FTrees.

Specified by:
namesOfExistingTrees in interface FTreeProvider
Returns:
The array with the names of the existing FTrees.

tree

public FTree tree()
Description copied from interface: FTreeProvider
Get the provider's default FTree.

Specified by:
tree in interface FTreeProvider
Returns:
The default FTree for this provider

tree

public FTree tree(String name)
Description copied from interface: FTreeProvider
Get an FTree by name. If the tree for the given name does not exist, a new one is created.

Specified by:
tree in interface FTreeProvider
Parameters:
name - The name of the FTree.
Returns:
The corresponding FTree.

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

apply

public boolean apply(JComponent panel)
Description copied from interface: PreferencesTopic
Called when the user pushes the apply button in the preferences dialog. This is also called if the user changes to another preferences topic, or if the user hits OK to dismiss the preferences dialog.

Specified by:
apply in interface PreferencesTopic
Parameters:
panel - The component currently being displayed
Returns:
true if success, false if an error occured (invalid input)
See Also:
PreferencesTopic.component()

component

public JComponent component()
Description copied from interface: PreferencesTopic
Get the component to display in the preferences dialog

Specified by:
component in interface PreferencesTopic
Returns:
The component to be used.

path

public String[] path()
Description copied from interface: PreferencesTopic
Specifies where in the preferences tree this item should appear.

Specified by:
path in interface PreferencesTopic
Returns:
The path under which this topic should be displayed in the preferences dialog.


Copyright © 2013. All Rights Reserved.