Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.ide.wizard
Class Wizard

java.lang.Object
  extended by oracle.ide.wizard.Wizard
Direct Known Subclasses:
BaliWizard, GalleryItemAdapter, ProviderWizard, SchemaChooserWizard, SchemaWizard, ShareWizard

public abstract class Wizard
extends java.lang.Object

The Wizard interface is used to identify a Java class as a Wizard in the context of the Oracle IDE.

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 oracle.ide.IdeAction, a JMenuItem, and add it to the appropriate menu in IdeMainWindow.

See Also:
oracle.ide.IdeAction, IdeMainWindow, oracle.ide.WizardManager, Addin

Constructor Summary
Wizard()
           
 
Method Summary
 javax.swing.Icon getIcon()
          Gets the Icon to use in the Object Gallery.
static java.lang.String[] getLegacyParams(Context context)
          Gets the array of String from the specified Context that represent the legacy parameters for the Wizard API used by some older Wizard implementations and Wizard launchers.
 java.lang.String getLongLabel()
          Provides a description of the Wizard that appears in the hint text area of the Object Gallery.
 MenuSpec getMenuSpecification()
          Provides the menu specification used by this Wizard.
abstract  java.lang.String getShortLabel()
          Provides the label that represents the Wizard in the Object Gallery.
 java.lang.String getToolTipText()
          The tool tip text to display when the mouse hovers over this Wizard's item in the Object Gallery.
abstract  boolean invoke(Context context)
          Invokes the wizard.
abstract  boolean isAvailable(Context context)
          Called when the sensitivity of the menu item that opens this wizard must be determined.
static void setLegacyParams(Context context, java.lang.String[] params)
          Sets the String array that represents the legacy parameters for the Wizard API.
 java.lang.String toString()
          Returns a String describing the Wizard.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Wizard

public Wizard()
Method Detail

isAvailable

public abstract 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.

invoke

public abstract boolean invoke(Context context)
Invokes the wizard.

Parameters:
context - The context of the wizard. All parameters required by the wizard must be set on the context. The wizard may also return values to the caller by setting them into the Context for the caller to retrieve.
Returns:
true if the invocation was successful, false if it failed or was canceled.

getShortLabel

public abstract java.lang.String getShortLabel()
Provides the label that represents the Wizard in the Object Gallery. The label should be a noun or noun phrase naming the item that is created by this Wizard and should omit the word "new". Examples: "Java Class", "Java Interface", "XML Document", "Database Connection".

Returns:
The human readable label of the Wizard.

getLongLabel

public java.lang.String getLongLabel()
Provides a description of the Wizard that appears in the hint text area of the Object Gallery. This is usually a verb phrase starting with "Creates a...". The default implementation uses a format string for "Creates a new ____", filling in the blank with the value from getShortLabel().


getIcon

public javax.swing.Icon getIcon()
Gets the Icon to use in the Object Gallery. If this Wizard is not accessed from the Object Gallery, the Wizard should return null.

Returns:
The Icon to be displayed in the Object Gallery.

getToolTipText

public java.lang.String getToolTipText()
The tool tip text to display when the mouse hovers over this Wizard's item in the Object Gallery.


toString

public java.lang.String toString()
Returns a String describing the Wizard. This is usually the same as getShortLabel().

Overrides:
toString in class java.lang.Object

getLegacyParams

public static final java.lang.String[] getLegacyParams(Context context)
Gets the array of String from the specified Context that represent the legacy parameters for the Wizard API used by some older Wizard implementations and Wizard launchers.


setLegacyParams

public static final void setLegacyParams(Context context,
                                         java.lang.String[] params)
Sets the String array that represents the legacy parameters for the Wizard API. This is used by some older Wizard implementations and Wizard launchers.


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 this item is not invokable from the Tools menu.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

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