nrio.MBPluginFactory is an interface; it is used to add features to MaxBase. Let's see how.
You must implement somewhere (in the applet, program or whatever else is controlling the MaxBase instance(s)) the nrio.MBPluginFactory interface, and this means implementing the following method:
void pluginLaunch(String sTextLabel) After you instantiate MaxBase, you set the PluginFactory property of MaxBase making it point to the controlling program/applet/class, like this:
myMBInstance.setPluginFactory((MBPluginFactory) this);
from there on, when a user selects a menu item that is not part of the standard MaxBase menu items, MaxBase will call your program pluginLaunch method, passing as a parameter the text label of the menu item.
So, say that the user selects the "e-mail them" menu item, MaxBase calls then your program's pluginLaunch method with parameter "e-mail them", and your program can do whatever it wants (it could, for example, call MaxBase's peekSelected() method to ask for the selected records, and then send an e-mail to the people represented by the records).
Since this technique doesn't rely on external .ini files as the user-defined plugins, it works everywhere, even in a browser. |