AddApplet


AddApplet shows how to add an applet to a document by inserting a Java Applet.

Class of

netscape.test.plugin.composer package

Superclass

netscape.plugin.composer.Plugin

Description

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


See Also

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


Constructors


AddApplet

Creates an instance of the AddApplet class.

Method of

AddApplet class

Syntax

public AddApplet()

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


Methods


getCategory

Gets the human readable category of the plug-in.

Method of

AddApplet class

Syntax

public String getCategory()

Returns

The human readable category of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getCategory function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getHint

Gets the human readable hint for the plug-in.

Method of

AddApplet class

Syntax

public String getHint()

Description

The hint is a one-sentence description of what the plug-in does.

Returns

The human readable hint for the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getHint function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getName

Gets the human readable name of the plug-in.

Method of

AddApplet class

Syntax

public String getName()

Returns

The human readable name of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getName function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


main

Tests the plug-in.

Method of

AddApplet class

Syntax

public static void main(String args[])

Parameters

args[]
String arguments. For values, see the Test class definition.

Description

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


perform

Performs the action of the plug-in.

Method of

AddApplet class

Syntax

public boolean perform(Document document) throws IOException

Parameters

document
The current document

Description

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.

Throws

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


AddButton


This sample plug-in shows how to add images to the document by adding a "Netscape Now" button.

Class of

netscape.test.plugin.composer package

Superclass

netscape.plugin.composer.Plugin

Description

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


See Also

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


Constructors


AddButton

Creates an instance of the AddButton class.

Method of

AddButton class

Syntax

public AddButton()

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


Methods


getCategory

Gets the human readable category of the plug-in.

Method of

AddButton class

Syntax

public String getCategory()

Returns

The human readable category of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getCategory function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getHint

Gets the human readable hint for the plug-in.

Method of

AddButton class

Syntax

public String getHint()

Description

The hint is a one-sentence description of what the plug-in does.

Returns

The human readable hint for the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getHint function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getName

Gets the human readable name of the plug-in.

Method of

AddButton class

Syntax

public String getName()

Returns

The human readable name of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getName function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference]


main

Tests the plug-in.

Method of

AddButton class

Syntax

public static void main(String args[])

Parameters

args[]
String arguments. For values, see the Test class definition.

Description

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


perform

Performs the action of the plug-in.

Method of

AddButton class

Syntax

public boolean perform(Document document) throws IOException

Parameters

document
The current document

Description

This function performs the work of the plug-in. This plug-in adds a "Netscape Now" button to the document.

Throws

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


AddLayer


This sample plug-in shows how to add and edit layers.

Class of

netscape.test.plugin.composer package

Superclass

netscape.plugin.composer.Plugin

Description

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


See Also

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


Constructors


AddLayer

Creates an instance of the AddLayer class.

Method of

AddLayer class

Syntax

public AddLayer()

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


Methods


getCategory

Gets the human readable category of the plug-in.

Method of

AddLayer class

Syntax

public String getCategory()

Returns

The human readable category of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getCategory function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getHint

Gets the human readable hint for the plug-in.

Method of

AddLayer class

Syntax

public String getHint()

Description

The hint is a one-sentence description of what the plug-in does.

Returns

The human readable hint for the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getHint function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getName

Gets the human readable name of the plug-in.

Method of

AddLayer class

Syntax

public String getName()

Returns

The human readable name of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getName function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


main

Tests the plug-in.

Method of

AddLayer class

Syntax

public static void main(String args[])

Parameters

args[]
String arguments. For values, see the Test class definition.

Description

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


perform

Performs the action of the plug-in.

Method of

AddLayer class

Syntax

public boolean perform(Document document) throws IOException

Parameters

document
The current document

Description

This function performs the work of the plug-in. This plug-in creates and edits document layers.

Throws

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


Colorize


This sample plug-in colorizes (applies a color pattern to) the selected text in an HTML document.

Class of

netscape.test.plugin.composer package

Superclass

netscape.plugin.composer.Plugin

Description

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


See Also

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


Constructors


Colorize

Creates an instance of the Colorize class.

Method of

Colorize class

Syntax

public Colorize()

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


Methods


getCategory

Gets the human readable category of the plug-in.

Method of

Colorize class

Syntax

public String getCategory()

Returns

The human readable category of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getCategory function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getHint

Gets the human readable hint for the plug-in.

Method of

Colorize class

Syntax

public String getHint()

Description

The hint is a one-sentence description of what the plug-in does.

Returns

The human readable hint for the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getHint function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getName

Gets the human readable name of the plug-in.

Method of

Colorize class

Syntax

public String getName()

Returns

The human readable name of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getName function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


main

Tests the plug-in.

Method of

Colorize class

Syntax

public static void main(String args[])

Parameters

args[]
String arguments. For values, see the Test class definition.

Description

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


perform

Performs the action of the plug-in.

Method of

Colorize class

Syntax

public boolean perform(Document document) throws IOException

Parameters

document
The current document

Description

This function performs the work of the plug-in. The Colorize plug-in colorizes (applies a color pattern to) the selected text.

Throws

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


DocInfo


This sample event handler plug-in shows how to calculate and display statistics about the document.

Class of

netscape.test.plugin.composer package

Superclass

netscape.plugin.composer.Plugin

Description

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


See Also

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


Constructors


DocInfo

Creates an instance of the DocInfo class.

Method of

DocInfo class

Syntax

public DocInfo()

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


Methods


getCategory

Gets the human readable category of the plug-in.

Method of

DocInfo class

Syntax

public String getCategory()

Returns

The human readable category of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getCategory function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getHint

Gets the human readable hint for the plug-in.

Method of

DocInfo class

Syntax

public String getHint()

Description

The hint is a one-sentence description of what the plug-in does.

Returns

The human readable hint for the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getHint function n in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getName

Gets the human readable name of the plug-in.

Method of

DocInfo class

Syntax

public String getName()

Returns

The human readable name of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getName function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


main

Tests the plug-in.

Method of

DocInfo class

Syntax

public static void main(String args[])

Parameters

args[]
String arguments. For values, see the Test class definition.

Description

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


perform

Performs the action of the plug-in.

Method of

DocInfo class

Syntax

public boolean perform(Document document) throws IOException

Parameters

document
The current document

Description

This function performs the work of the plug-in, in this case, calculating document information.

Throws

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


DocInfoResources


This class is the resource bundle object used in DocInfo sample.

Class of

netscape.test.plugin.composer package

Superclass

java.util.ListResourceBundle

Description

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


See Also

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


Constructors


DocInfoResources

Creates an instance of the DocInfoResources class.

Method of

DocInfoResources class

Syntax

public DocInfoResources()

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


Methods


getContents

Overrides ListResourceBundle.

Method of

DocInfoResources class

Syntax

public Object[][] getContents()

Overrides

This function overrides the getContents function in the ListResourceBundle class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


EditHomePage


This sample plug-in opens the Netscape Home Page for editing.

Class of

netscape.test.plugin.composer package

Superclass

netscape.plugin.composer.Plugin

Description

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


See Also

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


Constructors


EditHomePage

Creates an instance of the EditHomePage class.

Method of

EditHomePage class

Syntax

public EditHomePage()

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


Methods


getCategory

Gets the human readable category of the plug-in.

Method of

EditHomePage class

Syntax

public String getCategory()

Returns

The human readable category of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getCategory function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getHint

Gets the human readable hint for the plug-in.

Method of

EditHomePage class

Syntax

public String getHint()

Description

The hint is a one-sentence description of what the plug-in does.

Returns

The human readable hint for the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getHint function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getName

Gets the human readable name of the plug-in.

Method of

EditHomePage class

Syntax

public String getName()

Returns

The human readable name of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getName function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference]


main

Tests the plug-in.

Method of

EditHomePage class

Syntax

public static void main(String args[])

Parameters

args[]
String arguments. For values, see the Test class definition.

Description

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


perform

Performs the action of the plug-in.

Method of

EditHomePage class

Syntax

public boolean perform(Document document) throws IOException

Parameters

document
The current document

Description

This function performs the work of the plug-in. This plug-in opens the Netscape Home Page for editing.

Throws

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


EditRaw


This sample plug-in allows the user to view and edit the raw HTML of the document using an AWT dialog box.

Class of

netscape.test.plugin.composer package

Superclass

netscape.plugin.composer.Plugin

Description

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


See Also

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


Constructors


EditRaw

Creates an instance of the EditRaw class.

Method of

EditRaw class

Syntax

public EditRaw()

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


Methods


getCategory

Gets the human readable category of the plug-in.

Method of

EditRaw class

Syntax

public String getCategory()

Returns

The human readable category of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getCategory function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getHint

Gets the human readable hint for the plug-in.

Method of

EditRaw class

Syntax

public String getHint()

Description

The hint is a one-sentence description of what the plug-in does.

Returns

The human readable hint for the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getHint function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference


getName

Gets the human readable name of the plug-in.

Method of

EditRaw class

Syntax

public String getName()

Returns

The human readable name of the plug-in. Default: the name of the plug-in class.

Overrides

This function overrides the getName function in the Plugin class.

[Top] [Testbed Package Classes] [Composer Plug-in API Reference]


main

Tests the plug-in.

Method of

EditRaw class

Syntax

public static void main(String args[])

Parameters

args[]
String arguments. For values, see the Test class definition.

Description

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


perform

Performs the action of the plug-in.

Method of

EditRaw class

Syntax

public boolean perform(Document document) throws IOException

Parameters

document
The current document

Description

This function performs the work of the plug-in. This plug-in allows viewing and editing of raw HTML in an AWT dialog box.

Throws

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