This type of plugins allows the
developer to work with a custom designed protocol for retrieving and storing files.
It provides the following API:
- The interface URLStreamHandlerPluginExtension - There is one method
that must be implemented:
- getURLStreamHandler(String protocol) - It takes as an argument the
name of the protocol and returns a URLStreamHandler object, or null if
there is no URL handler for the specified protocol.
- With the help of the URLChooserPluginExtension2 interface, it is
possible to write your own dialog that works with the custom protocol. This interface
provides two methods:
- chooseURLs(StandalonePluginWorkspace workspaceAccess) - Returns a
URL[] object that contains the URLs the user decided to open with the
custom protocol. You can invoke your own URL chooser dialog here and then return the
chosen URLs having your own custom protocol. You have access to the application
workspace.
- getMenuName() - Returns a String object that is
the name of the entry added in the menu.
- With the help of the URLChooserToolbarExtension interface, it is
possible to provide a toolbar entry which is used for launching the custom URLs chooser from
the URLChooserPluginExtension implementation. This interface provides two
methods:
- getToolbarIcon() - Returns the javax.swing.Icon
image used on the toolbar.
- getToolbarTooltip() - Returns a String that is the
tooltip used on the toolbar button.