Extension SDK 10.1.2

oracle.ide.addin
Interface Wizard

All Superinterfaces:
Invokable
All Known Subinterfaces:
GalleryWizard
All Known Implementing Classes:
AbstractConnectionEditorWizard, AbstractGalleryWizard

public interface Wizard
extends Invokable

The Wizard interface is used to identify a Java class as a Wizard in the context of the Oracle IDE. All Wizards are capable of being invoked.

The exact mechanism for invocation is up to the Wizard to determine. Some Wizards register a menu label which is used to create a menu item under the "Tools" menu and are invoked when the user selects that menu item. Other Wizards create their own menu item under a different menu (and may even create a new menu). Still other Wizards are available as an icon in the Gallery (File|New).

A Wizards should only implement the Addin interface if they need to be loaded when the IDE starts up. By default a Wizard is not loaded until it is requested (normally by the Object Gallery.

If the Wizard returns a non-null String from the getMenuLabel method, then registering the Wizard with the WizardManager will add a menu item under the "Tools" menu. If the Wizard needs to appear in a different menu, then the Wizard needs to implement the Addin interface, and manually create an IdeAction, a JMenuItem, and add it to the appropriate menu in IdeMainWindow.

See Also:
IdeAction, IdeMainWindow, WizardManager, Addin

Method Summary
 javax.swing.Icon getIcon()
          Gets the Icon to use in the Object Gallery and Navigator views.
 java.lang.String getMenuLabel()
          Deprecated. use getMenuSpecification
 MenuSpec getMenuSpecification()
          Provides the menu specification used by this Wizard.
 java.lang.String getName()
          Provides the human readable name of this Wizard.
 boolean isAvailable(Context context)
          Called when the sensitivity of the menu item that opens this wizard must be determined.
 java.lang.String toString()
          Provides a String representation of this Wizard.
 
Methods inherited from interface oracle.ide.addin.Invokable
invoke
 

Method Detail

getName

public java.lang.String getName()
Provides the human readable name of this Wizard. The format of this string can be whatever makes the most sense to the Wizard developer; no conventions enforced by the Addin API.


getMenuLabel

public java.lang.String getMenuLabel()
Deprecated. use getMenuSpecification

Provides the menu label used by this Wizard. The menu label returned by this method is added to the "Wizards" menu and used to invoke this Wizard. If this Wizard is not invokable from the "Wizards" menu, return null.

Returns:
The name of the menu label, or null if no label is desired.

getMenuSpecification

public MenuSpec getMenuSpecification()
Provides the menu specification used by this Wizard. The menu specifiaction returned by this method is added to the "Tools" menu and used to invoke this Wizard.

If this Wizard is not invokable from the "Tools" menu, return null.

Returns:
The menu specification, or null if no label is required.

isAvailable

public boolean isAvailable(Context context)
Called when the sensitivity of the menu item that opens this wizard must be determined.

Parameters:
context - The Context to use when invoking this Wizard.
Returns:
true if the wizard can be invoked, or false otherwise.

toString

public java.lang.String toString()
Provides a String representation of this Wizard. In general this should be the same as getName().

Returns:
The String representation of this Wizard.
See Also:
getName()

getIcon

public javax.swing.Icon getIcon()
Gets the Icon to use in the Object Gallery and Navigator views.

Note: If this Wizard is not intended to be accessed from the ObjectGallery, the Wizard may return null.

Returns:
The Icon to be displayed in the ObjectGallery and Navigator.

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.