AddApplet shows how to add an applet to a document by inserting a Java Applet.
netscape.test.plugin.composer package
netscape.plugin.composer.Plugin
The AddApplet sample inserts an applet that calls itself (and prints) "Insert:Nervous Text." This sample plug-in shows how to use LOCALDATA property of the APPLET HTML tag to add applets or any local data files to a Composer document. For information about using the LOCALDATA property, see "Adding Local Data Files."
For an introduction to the sample plug-ins included with the Composer Plug-in Kit, see "Using the Sample Plug-ins."
This table summarizes the members of the AddApplet class:
Constructor | Description |
---|---|
AddApplet() | Creates an instance of the AddApplet class |
Methods | Description |
getCategory() | Gets the human readable category of the plug-in |
getHint() | Gets the human readable hint for the plug-in |
getName() | Gets the human readable name of the plug-in |
main(String[]) | Tests the plug-in |
perform(Document) | Performs the action of the plug-in |
AddButton, AddLayer, Colorize, DocInfo, DocInfoResources, EditHomePage, EditRaw, IFCTest, IFCTestBundle, ImageEncoderTest, RedirectTest, SmallCaps, Tableize, TagStrip, Test, TextImageEncoder
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Creates an instance of the AddApplet class.
AddApplet class
public AddApplet()
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable category of the plug-in.
AddApplet class
public String getCategory()
The human readable category of the plug-in. Default: the name of the plug-in class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable hint for the plug-in.
AddApplet class
public String getHint()
The hint is a one-sentence description of what the plug-in does.
The human readable hint for the plug-in. Default: the name of the plug-in class.
This function overrides the getHint function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable name of the plug-in.
AddApplet class
public String getName()
The human readable name of the plug-in. Default: the name of the plug-in class.
This function overrides the getName function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Tests the plug-in.
AddApplet class
public static void main(String args[])
args[] |
String arguments. For values, see the Test class definition. |
Add this method to your plug-in's perform method if you want to run the plug-in from the command line and test it in the Composer Testbed. You can remove the main method before shipping your plug-in if you like; leaving it will not affect the operation of the plug-in.
To run the plug-in from the command line, use this code:
java -classpath yourClassPath yourPluginName args...
where args is passed to the Test class.
For information about writing the main method and running a plug-in from the command line, see "Preparing for Running in the Testbed." Also, see Test.Main and the main methods of each of the sample plug-in classes that are part of the Testbed package.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Performs the action of the plug-in.
AddApplet class
public boolean perform(Document document) throws IOException
document |
The current document |
This function performs the work of the plug-in. AddApplet shows how to use the LOCALDATA property of the APPLET HTML tag to add local data files to a Composer document.
IOException
The Composer Plug-in API uses standard Java exceptions and exception handling. For more information, see your Java documentation.
Overrides
This function overrides the perform function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
This sample plug-in shows how to add images to the document by adding a "Netscape Now" button.
netscape.test.plugin.composer package
netscape.plugin.composer.Plugin
This sample plug-in shows how to add images to the document by adding a button.
Since this sample plug-in must have the ability access an image file and insert it into a document, it shows how to use the Communicator 4.0 security model for Java code. For more information, see "Composer Plug-ins and Security."
For an introduction to the sample plug-ins included with the Composer Plug-in Kit, see "Using the Sample Plug-ins."
This table summarizes the members of the AddButton class:
Constructor | Description |
---|---|
AddButton() | Creates an instance of the AddButton class |
Methods | Description |
getCategory() | Gets the human readable category of the plug-in |
getHint() | Gets the human readable hint for the plug-in |
getName() | Gets the human readable name of the plug-in |
main(String[]) | Tests the plug-in |
perform(Document) | Performs the action of the plug-in |
AddApplet, AddLayer, Colorize, DocInfo, DocInfoResources, EditHomePage, EditRaw, IFCTest, IFCTestBundle, ImageEncoderTest, RedirectTest, SmallCaps, Tableize, TagStrip, Test, TextImageEncoder
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Creates an instance of the AddButton class.
AddButton class
public AddButton()
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable category of the plug-in.
AddButton class
public String getCategory()
The human readable category of the plug-in. Default: the name of the plug-in class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable hint for the plug-in.
AddButton class
public String getHint()
The hint is a one-sentence description of what the plug-in does.
The human readable hint for the plug-in. Default: the name of the plug-in class.
This function overrides the getHint function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable name of the plug-in.
AddButton class
public String getName()
The human readable name of the plug-in. Default: the name of the plug-in class.
This function overrides the getName function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Tests the plug-in.
AddButton class
public static void main(String args[])
args[] |
String arguments. For values, see the Test class definition. |
Add this method to your plug-in's perform method if you want to run the plug-in from the command line and test it in the Composer Testbed. You can remove the main method before shipping your plug-in if you like; leaving it will not affect the operation of the plug-in.
To run the plug-in from the command line, use this code:
java -classpath yourClassPath yourPluginName args...
where args is passed to the Test class.
For information about writing the main method and running a plug-in from the command line, see "Preparing for Running in the Testbed." Also, see Test.Main and the main methods of each of the sample plug-in classes that are part of the Testbed package.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Performs the action of the plug-in.
AddButton class
public boolean perform(Document document) throws IOException
document |
The current document |
This function performs the work of the plug-in. This plug-in adds a "Netscape Now" button to the document.
IOException
The Composer Plug-in API uses standard Java exceptions and exception handling. For more information, see your Java documentation.
Overrides
This function overrides the perform function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
This sample plug-in shows how to add and edit layers.
netscape.test.plugin.composer package
netscape.plugin.composer.Plugin
AddLayer converts selected text to an HTML layer.
For an introduction to the sample plug-ins included with the Composer Plug-in Kit, see "Using the Sample Plug-ins."
This table summarizes the members of the AddLayer class:
Constructor | Description |
---|---|
AddLayer() | Creates an instance of the AddLayer class |
Methods | |
getCategory() | Gets the human readable category of the plug-in |
getHint() | Gets the human readable hint for the plug-in |
getName() | Gets the human readable name of the plug-in |
main(String[]) | Tests the plug-in |
perform(Document) | Performs the action of the plug-in |
AddApplet, AddButton, Colorize, DocInfo, DocInfoResources, EditHomePage, EditRaw, IFCTest, IFCTestBundle, ImageEncoderTest, RedirectTest, SmallCaps, Tableize, TagStrip, Test, TextImageEncoder
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Creates an instance of the AddLayer class.
AddLayer class
public AddLayer()
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable category of the plug-in.
AddLayer class
public String getCategory()
The human readable category of the plug-in. Default: the name of the plug-in class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable hint for the plug-in.
AddLayer class
public String getHint()
The hint is a one-sentence description of what the plug-in does.
The human readable hint for the plug-in. Default: the name of the plug-in class.
This function overrides the getHint function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable name of the plug-in.
AddLayer class
public String getName()
The human readable name of the plug-in. Default: the name of the plug-in class.
This function overrides the getName function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Tests the plug-in.
AddLayer class
public static void main(String args[])
args[] |
String arguments. For values, see the Test class definition. |
Add this method to your plug-in's perform method if you want to run the plug-in from the command line and test it in the Composer Testbed. You can remove the main method before shipping your plug-in if you like; leaving it will not affect the operation of the plug-in.
To run the plug-in from the command line, use this code:
java -classpath yourClassPath yourPluginName args...
where args is passed to the Test class.
For information about writing the main method and running a plug-in from the command line, see "Preparing for Running in the Testbed." Also, see Test.Main and the main methods of each of the sample plug-in classes that are part of the Testbed package.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Performs the action of the plug-in.
AddLayer class
public boolean perform(Document document) throws IOException
document |
The current document |
This function performs the work of the plug-in. This plug-in creates and edits document layers.
IOException
The Composer Plug-in API uses standard Java exceptions and exception handling. For more information, see your Java documentation.
Overrides
This function overrides the perform function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
This sample plug-in colorizes (applies a color pattern to) the selected text in an HTML document.
netscape.test.plugin.composer package
netscape.plugin.composer.Plugin
This sample plug-in colorizes (applies a color pattern to) selected text and demonstrates low-level parsing of HTML.
For an introduction to the sample plug-ins included with the Composer Plug-in Kit, see "Using the Sample Plug-ins."
This table summarizes the members of the Colorize class:
Constructor | Description |
---|---|
Colorize() | Creates an instance of the Colorize class |
Methods | |
getCategory() | Gets the human readable category of the plug-in |
getHint() | Gets the human readable hint for the plug-in |
getName() | Gets the human readable name of the plug-in |
main(String[]) | Tests the plug-in |
perform(Document) | Performs the action of the plug-in |
AddApplet, AddButton, AddLayer, DocInfo, DocInfoResources, EditHomePage, EditRaw, IFCTest, IFCTestBundle, ImageEncoderTest, RedirectTest, SmallCaps, Tableize, TagStrip, Test, TextImageEncoder
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Creates an instance of the Colorize class.
Colorize class
public Colorize()
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable category of the plug-in.
Colorize class
public String getCategory()
The human readable category of the plug-in. Default: the name of the plug-in class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable hint for the plug-in.
Colorize class
public String getHint()
The hint is a one-sentence description of what the plug-in does.
The human readable hint for the plug-in. Default: the name of the plug-in class.
This function overrides the getHint function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable name of the plug-in.
Colorize class
public String getName()
The human readable name of the plug-in. Default: the name of the plug-in class.
This function overrides the getName function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Tests the plug-in.
Colorize class
public static void main(String args[])
args[] |
String arguments. For values, see the Test class definition. |
Add this method to your plug-in's perform method if you want to run the plug-in from the command line and test it in the Composer Testbed. You can remove the main method before shipping your plug-in if you like; leaving it will not affect the operation of the plug-in.
To run the plug-in from the command line, use this code:
java -classpath yourClassPath yourPluginName args...
where args is passed to the Test class.
For information about writing the main method and running a plug-in from the command line, see "Preparing for Running in the Testbed." Also, see Test.Main and the main methods of each of the sample plug-in classes that are part of the Testbed package.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Performs the action of the plug-in.
Colorize class
public boolean perform(Document document) throws IOException
document |
The current document |
This function performs the work of the plug-in. The Colorize plug-in colorizes (applies a color pattern to) the selected text.
IOException
The Composer Plug-in API uses standard Java exceptions and exception handling. For more information, see your Java documentation.
Overrides
This function overrides the perform function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
This sample event handler plug-in shows how to calculate and display statistics about the document.
netscape.test.plugin.composer package
netscape.plugin.composer.Plugin
This sample plug-in calculates the document's base URL, the working directory and its URL, and the current event, if any. It accesses both relative and absolute URLs.
DocInfo displays these statistics in a dialog box, thus demonstrating how to call IFC, and, by extension, any user interface tool kit, from a plug-in. In this sample, the dialog box does not have an OK button, since the Close button combines the functionality of both.
This sample uses a Java resource bundle, provided by the DocInfoResources sample. The DocInfo sample uses the JDK 1.1 standard API for resource bundles and the Character.IsWhiteSpace method. For more information, see "Internationalizing and Localizing Plug-ins" and your Java documentation.
DocInfo is an event handler plug-in that is triggered when any Composer Plug-in event occurs.
For an introduction to the sample plug-ins included with the Composer Plug-in Kit, see "Using the Sample Plug-ins."
This table summarizes the members of the DocInfo class:
Constructor | Description |
---|---|
DocInfo() | Creates an instance of the DocInfo class |
Methods | |
getCategory() | Gets the human readable category of the plug-in |
getHint() | Gets the human readable hint for the plug-in |
getName() | Gets the human readable name of the plug-in |
main(String[]) | Tests the plug-in |
perform(Document) | Performs the action of the plug-in |
AddApplet, AddButton, AddLayer, Colorize, DocInfoResources, EditHomePage, EditRaw, IFCTest, IFCTestBundle, ImageEncoderTest, RedirectTest, SmallCaps, Tableize, TagStrip, Test, TextImageEncoder
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Creates an instance of the DocInfo class.
DocInfo class
public DocInfo()
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable category of the plug-in.
DocInfo class
public String getCategory()
The human readable category of the plug-in. Default: the name of the plug-in class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable hint for the plug-in.
DocInfo class
public String getHint()
The hint is a one-sentence description of what the plug-in does.
The human readable hint for the plug-in. Default: the name of the plug-in class.
This function overrides the getHint function n in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable name of the plug-in.
DocInfo class
public String getName()
The human readable name of the plug-in. Default: the name of the plug-in class.
This function overrides the getName function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Tests the plug-in.
DocInfo class
public static void main(String args[])
args[] |
String arguments. For values, see the Test class definition. |
Add this method to your plug-in's perform method if you want to run the plug-in from the command line and test it in the Composer Testbed. You can remove the main method before shipping your plug-in if you like; leaving it will not affect the operation of the plug-in.
To run the plug-in from the command line, use this code:
java -classpath yourClassPath yourPluginName args...
where args is passed to the Test class.
For information about writing the main method and running a plug-in from the command line, see "Preparing for Running in the Testbed." Also, see Test.Main and the main methods of each of the sample plug-in classes that are part of the Testbed package.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Performs the action of the plug-in.
DocInfo class
public boolean perform(Document document) throws IOException
document |
The current document |
This function performs the work of the plug-in, in this case, calculating document information.
IOException
The Composer Plug-in API uses standard Java exceptions and exception handling. For more information, see your Java documentation.
Overrides
This function overrides the perform function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
This class is the resource bundle object used in DocInfo sample.
netscape.test.plugin.composer package
java.util.ListResourceBundle
This sample plug-in provides a resource bundle object that is used in the DocInfo sample. DocInfo calculates document statistics and displays them in a dialog box.
Java resource bundles are used in localization. When you are ready for this step, see "Internationalizing and Localizing Plug-ins" and your Java 1.1 documentation. For more information about using resource bundle classes, see in the class definitions for ListResourceBundle and its parent class ResourceBundle.
For an introduction to the sample plug-ins included with the Composer Plug-in Kit, see "Using the Sample Plug-ins."
This table summarizes the members of the DocInfoResources class:
Constructor | Description |
---|---|
DocInfoResources() | Creates an instance of the DocInfoResources class |
Methods | |
getContents() | Gets the contents of the test bundle |
AddApplet, AddButton, AddLayer, Colorize, DocInfo, EditHomePage, EditRaw, IFCTest, IFCTestBundle, ImageEncoderTest, RedirectTest, SmallCaps, Tableize, TagStrip, Test, TextImageEncoder
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Creates an instance of the DocInfoResources class.
DocInfoResources class
public DocInfoResources()
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Overrides ListResourceBundle.
DocInfoResources class
public Object[][] getContents()
This function overrides the getContents function in the ListResourceBundle class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
This sample plug-in opens the Netscape Home Page for editing.
netscape.test.plugin.composer package
netscape.plugin.composer.Plugin
EditHomePage opens the Netscape Home Page for editing. In the process, it shows how to use Document.editDocument.
For an introduction to the sample plug-ins included with the Composer Plug-in Kit, see "Using the Sample Plug-ins."
This table summarizes the members of the EditHomePage class:
Constructor | Description |
---|---|
EditHomePage() | Creates an instance of the EditHomePage class |
Methods | |
getCategory() | Gets the human readable category of the plug-in |
getHint() | Gets the human readable hint for the plug-in |
getName() | Gets the human readable name of the plug-in |
main(String[]) | Tests the plug-in |
perform(Document) | Performs the action of the plug-in |
AddApplet, AddButton, AddLayer, Colorize, DocInfo, EditRaw, DocInfoResources, IFCTest, IFCTestBundle, ImageEncoderTest, RedirectTest, SmallCaps, Tableize, TagStrip, Test, TextImageEncoder
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Creates an instance of the EditHomePage class.
EditHomePage class
public EditHomePage()
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable category of the plug-in.
EditHomePage class
public String getCategory()
The human readable category of the plug-in. Default: the name of the plug-in class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable hint for the plug-in.
EditHomePage class
public String getHint()
The hint is a one-sentence description of what the plug-in does.
The human readable hint for the plug-in. Default: the name of the plug-in class.
This function overrides the getHint function in the Plugin class.
Gets the human readable name of the plug-in.
EditHomePage class
public String getName()
The human readable name of the plug-in. Default: the name of the plug-in class.
This function overrides the getName function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Tests the plug-in.
EditHomePage class
public static void main(String args[])
args[] |
String arguments. For values, see the Test class definition. |
Add this method to your plug-in's perform method if you want to run the plug-in from the command line and test it in the Composer Testbed. You can remove the main method before shipping your plug-in if you like; leaving it will not affect the operation of the plug-in.
To run the plug-in from the command line, use this code:
java -classpath yourClassPath yourPluginName args...
where args is passed to the Test class.
For information about writing the main method and running a plug-in from the command line, see "Preparing for Running in the Testbed." Also, see Test.Main and the main methods of each of the sample plug-in classes that are part of the Testbed package.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Performs the action of the plug-in.
EditHomePage class
public boolean perform(Document document) throws IOException
document |
The current document |
This function performs the work of the plug-in. This plug-in opens the Netscape Home Page for editing.
IOException
The Composer Plug-in API uses standard Java exceptions and exception handling. For more information, see your Java documentation.
Overrides
This function overrides the perform function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
This sample plug-in allows the user to view and edit the raw HTML of the document using an AWT dialog box.
netscape.test.plugin.composer package
netscape.plugin.composer.Plugin
EditRaw allows the user to view and edit a document's raw HTML in an AWT window. It shows how to call AWT, and, by extension, any user interface tool kit, from a plug-in.
For an introduction to the sample plug-ins included with the Composer Plug-in Kit, see "Using the Sample Plug-ins."
This table summarizes the members of the EditRaw class:
Constructor | Description |
---|---|
EditRaw() | Creates an instance of the EditRaw class |
Methods | |
getCategory() | Gets the human readable category of the plug-in |
getHint() | Gets the human readable hint for the plug-in |
getName() | Gets the human readable name of the plug-in |
main(String[]) | Tests the plug-in |
perform(Document) | Performs the action of the plug-in |
AddApplet, AddButton, AddLayer, Colorize, DocInfo, DocInfoResources, EditHomePage, IFCTest, IFCTestBundle, ImageEncoderTest, RedirectTest, SmallCaps, Tableize, TagStrip, Test, TextImageEncoder
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Creates an instance of the EditRaw class.
EditRaw class
public EditRaw()
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable category of the plug-in.
EditRaw class
public String getCategory()
The human readable category of the plug-in. Default: the name of the plug-in class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Gets the human readable hint for the plug-in.
EditRaw class
public String getHint()
The hint is a one-sentence description of what the plug-in does.
The human readable hint for the plug-in. Default: the name of the plug-in class.
This function overrides the getHint function in the Plugin class.
Gets the human readable name of the plug-in.
EditRaw class
public String getName()
The human readable name of the plug-in. Default: the name of the plug-in class.
This function overrides the getName function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Tests the plug-in.
EditRaw class
public static void main(String args[])
args[] |
String arguments. For values, see the Test class definition. |
Add this method to your plug-in's perform method if you want to run the plug-in from the command line and test it in the Composer Testbed. You can remove the main method before shipping your plug-in if you like; leaving it will not affect the operation of the plug-in.
To run the plug-in from the command line, use this code:
java -classpath yourClassPath yourPluginName args...
where args is passed to the Test class.
For information about writing the main method and running a plug-in from the command line, see "Preparing for Running in the Testbed." Also, see Test.Main and the main methods of each of the sample plug-in classes that are part of the Testbed package.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Performs the action of the plug-in.
EditRaw class
public boolean perform(Document document) throws IOException
document |
The current document |
This function performs the work of the plug-in. This plug-in allows viewing and editing of raw HTML in an AWT dialog box.
IOException
The Composer Plug-in API uses standard Java exceptions and exception handling. For more information, see your Java documentation.
Overrides
This function overrides the perform function in the Plugin class.
[Top] [Testbed Package Classes] [Composer Plug-in API Reference]
Copyright © 1997 Netscape Communications Corporation