Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plugins SYSTEM "http://java.freehep.org/schemas/plugin/1.0/plugin.dtd">
<plugins>
   <plugin>
      <information>
          <name>org.lcsim</name>
	  <category>hep.linearcollider</category>
          <author>LCSIM Team</author>
          <version>0.9</version>
          <description kind="short">org.lcsim plugin for JAS3</description>
          <description>org.lcsim plugin for JAS3.</description>
          <load-at-start/>
      </information>
      <resources>
          <j2se minVersion="1.5"/>
          <file href="http://jas.freehep.org/jas3/plugins/lcsim/0.9/lcsim.jar" location="lcsim.jar"/>
          <file href="http://jas.freehep.org/jas3/plugins/lcsim/0.9/freehep-physics.jar" location="freehep-physics.jar"/>
          <file href="http://jas.freehep.org/jas3/plugins/lcsim/0.9/sio.jar" location="sio.jar"/>
          <file href="http://jas.freehep.org/jas3/plugins/lcsim/0.9/GeomConverter.jar" location="GeomConverter.jar"/>
          <file href="http://jas.freehep.org/jas3/plugins/lcsim/0.9/commons-math.jar" location="commons-math.jar"/>
      </resources>
      <plugin-desc class="org.lcsim.plugin.LCSimPlugin"/>
    </plugin>
</plugins>

Menus

Example of adding a File -> New -> Example Plugin

...

menu item.

No Format
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE MenuSystem SYSTEM "http://java.freehep.org/schemas/menus/1.0/menus.dtd">
<MenuSystem>
    <MenuBar id="mainMenu">
        <Menu name="File" mnemonic="F" location="100">
            <Menu name="New" mnemonic="N" location="50">
                <Component type="default" 
                           icon="/classpath/to/examplePluginIcon.gif" 
                           name="Example Plugin" 
                           mnemonic="E" 
                           command="ExamplePlugin" 
                           location="1200"/>
            </Menu>
        </Menu>
    </MenuBar>
</MenuSystem>

Within the init() function of the plugin class, the following lines of code should be used to build the menus.

No Format

Studio app = getApplication();
XMLMenuBuilder builder = app.getXMLMenuBuilder();
URL xml = getClass().getResource("ExamplePlugin.menus");
builder.build(xml);