Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.ide.wizard
Class Wizard

java.lang.Object
  extended by oracle.ide.wizard.Wizard
All Implemented Interfaces:
Invokable
Direct Known Subclasses:
BaliWizard, ProviderWizard, SchemaChooserWizard, SchemaWizard

public abstract class Wizard
extends java.lang.Object
implements Invokable

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. 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. Others create a menu item in a different menu (and may even create a new menu). Still other Wizards are available in the Gallery (File|New). Note: it is not necessary to subclass Wizard in order to register a gallery item; the class must only extend Invokable.

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, Invokable

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.
static java.lang.String getWizardId(Context context)
          Gets the ID from the specified Context.
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.
static void setWizardId(Context context, java.lang.String id)
          Sets the ID for the Wizard.
 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
 
Methods inherited from interface oracle.ide.wizard.Invokable
invoke
 

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.

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

getWizardId

public static final java.lang.String getWizardId(Context context)
Gets the ID from the specified Context.


setWizardId

public static final void setWizardId(Context context,
                                     java.lang.String id)
Sets the ID for the Wizard. This can be used to look up the wizard id which has been set declaratively.


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
11g Release 2 (11.1.2.1.0)

E17493-02

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