diff --git a/src/antidote/docs/new-module-howto.html b/src/antidote/docs/new-module-howto.html new file mode 100644 index 000000000..14777cccc --- /dev/null +++ b/src/antidote/docs/new-module-howto.html @@ -0,0 +1,81 @@ + + +
+Version 0.1 (2000/12/18)
+ +Authors: + Simeon H.K. Fitch +
+ +The purpose of this document is to provide an overview of the + basic steps one must undertake to add a new module to + Antidote. Please see The Antidote + Design Overview for information on what a module is and how it + fits into Antidote. If you've already got all that, then read + on!
+ +NB: Please submit updates and criticisms to this, particularly + areas that were unclear, missing, or difficult to follow.
+ +All modules must inherit from the AntModule + class. This will probably irritate some of you, but it essentially + enforces inheritance from javax.swing.JComponent and + provides encapsulated handling of the AppContext instance + that is so important to this class.
+ +Your module is required to implement the + AntModule.contextualize(AppContext) method. The first + thing this method should do is call + AntModule.setContext(AppContext), and then it is safe for + it to begin constructing its display, using whatever resources it + needs from the given AppContext instance. Think of this + in a similar manner to Applet.init() or + Servlet.init(). + +
All displayable strings must be externalized to the + antidote.properties file, and looked up via the + AppContext.getResources() method after the + AntModule.contextualize() method has been called. Follow + the naming convention currently used in the properties file and + you should have to problems. This task should be done + during development of your module. Under no cercumstances + should your module be submitted or committed without this task + being completed. Remember that Antidote has an international + audience.
+ +Look for the properties with the format + org.apache.tools.ant.gui.Antidote.xxx.modules where + xxx is one of {left | right | top | bottom}. Depending on + where you want your module to appear, and the order that you want + it to appear in relationship to the other modules, add the class + name of your module appropriately. If multiple modules are listed + for a single property (via a comma delimited list), then each + module will have it's own tab in a javax.swing.JTabbedPane. + +
That should be all you need to do, at least to get your module + plugged in. Check out the source code for + ProjectNavigator and PropertyEditor for module + examples that use the various facilities of the Antidote + framework.
+ + +