All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.builder.WizardArchiveWriter

java.lang.Object
   |
   +----com.sun.wizards.builder.WizardArchiveWriter

public class WizardArchiveWriter
extends Object
WizardArchiveWriter is responsible for creating a wizard archive with native support resolving its resources from an existing archive.


Constructor Index

 o WizardArchiveWriter(WizardState)
Create an WizardArchiveWriter with the default ArchiveReader classes and the default RuntimeClasses set.

Method Index

 o addCollection(ResourceCollection)
Adds a collection of resources to the archive.
 o addResource(String, String, ResourceResolver)
Add a single resource to the archive.
 o addResources(Vector, ResourceResolver)
Adds the specified vector of resources to the table of resources that will be written into the wizard archive.
 o createClientTree()
Create the wizard client tree.
 o getArchiveName()
Returns the name of this wizard archive (without the ".class" extension)
 o getBaselineImage()
Gets the name of the baselineImage to be included in this wizard.
 o getIcon()
Gets the name of the icon to be included in this wizard.
 o getImage()
Gets the name of the image to be included in this wizard.
 o getRoot()
Returns the WizardComposite object that is the root of the client tree.
 o getRuntimeResources()
This method collects the classnames of the classes required to execute the wizard defined via the createClientTree method.
 o getWizardState()
Returns the WizardState object that will be written into the wizard archive.
 o setArchiveName(String)
Sets the name of this archive, omitting the ".class" extension.
 o setBaselineImage(String)
Sets the baselineImage for this product.
 o setCancelMsg(Msg)
Set the text that will appear when the user clicks the 'cancel' button
 o setExitMsg(Msg)
Set the text that will appear when the user clicks the 'exit' button
 o setIcon(String)
Sets the icon for this product.
 o setImage(String)
Sets the image for this product.
 o setResources()
Set other resources into the archive.
 o setRoot(WizardComposite)
Sets the WizardComposite object that will be the root of the client panel tree.
 o setWizardState(WizardState)
Sets the WizardState object that will be written into the wizard archive.
 o writeArchive(File)
Write the archive file.

Constructors

 o WizardArchiveWriter
 public WizardArchiveWriter(WizardState state)
Create an WizardArchiveWriter with the default ArchiveReader classes and the default RuntimeClasses set.

Parameters:
state - The WizardState.

Methods

 o getWizardState
 public WizardState getWizardState()
Returns the WizardState object that will be written into the wizard archive.

Returns:
The WizardState to be written into the wizard archive.
 o setWizardState
 public void setWizardState(WizardState state)
Sets the WizardState object that will be written into the wizard archive.

Parameters:
state - The state to be used to write into the wizard archive
 o getRoot
 public WizardComposite getRoot()
Returns the WizardComposite object that is the root of the client tree.

Returns:
The WizardComposite to be written into the wizard archive, or null if none has been set.
 o getArchiveName
 public String getArchiveName()
Returns the name of this wizard archive (without the ".class" extension)

Returns:
the name of this wizard archive (without the ".class" extension)
 o setArchiveName
 public void setArchiveName(String archiveName)
Sets the name of this archive, omitting the ".class" extension.

Parameters:
archiveName - The name of this archive
 o setRoot
 public void setRoot(WizardComposite root)
Sets the WizardComposite object that will be the root of the client panel tree. wizard archive.

Parameters:
root - The root of the client panel tree
 o createClientTree
 protected void createClientTree()
Create the wizard client tree. The default behavior only provides the root of the tree.

 o setResources
 protected void setResources()
Set other resources into the archive. Subclasses should override this method to set images, audio files, or other runtime resources to the archive.

 o addResource
 public void addResource(String type,
                         String name,
                         ResourceResolver resolver)
Add a single resource to the archive. The type argument specifies what type of resource is being added. The ResourceResolver will be queried when the archive is written for it to resolve the resource.

Parameters:
type - The type of the resource.
name - The name of the resource.
resolver - The resourceResolver of the resource.
 o getRuntimeResources
 protected void getRuntimeResources()
This method collects the classnames of the classes required to execute the wizard defined via the createClientTree method.

 o addResources
 public void addResources(Vector resourceVector,
                          ResourceResolver resolver)
Adds the specified vector of resources to the table of resources that will be written into the wizard archive. Uses the same Resolver for all resources. Each element of this array can be one of the following types:

Parameters:
resourceVector - The vector containing wizard resource name(s).
resolver - The ResourceResolver for the specified resources.
 o writeArchive
 public void writeArchive(File wizardFile)
Write the archive file. The output of this method is a classfile named [archiveName].class. If that classfile already exists, it will be deleted and the new archive will be written.

The [archiveName].class file is the wizard archive, and can be executed by running the class through the Java virtual machine.

Parameters:
out - The output stream to which the archive should be written.
 o addCollection
 public void addCollection(ResourceCollection collection)
Adds a collection of resources to the archive.

Parameters:
collection - The resources to be added.
 o setImage
 public void setImage(String imageName)
Sets the image for this product. The image will appear on the left side of the wizard. It should be specified in wizard resource form ([packageName].[imagename_without_extension]). It is recommended that this image be 120 pixels wide x 290 pixels long. Make sure you include your image in the resource collections (by overriding setResources()) or your image will not be included in the archive!

Parameters:
imageName - The name of the image, in wizard resource form.
 o getImage
 public String getImage()
Gets the name of the image to be included in this wizard.

Returns:
The name of the image.
 o setIcon
 public void setIcon(String iconName)
Sets the icon for this product. The icon will appear on the left side of the wizard. It should be specified in wizard resource form ([packageName].[imagename_without_extension]) Make sure you include your image in the resource collections (by overriding setResources()) or your image will not be included in the archive!

Parameters:
iconName - The name of the icon, in wizard resource form. It is recommended that this image be 48 pixels square.
 o getIcon
 public String getIcon()
Gets the name of the icon to be included in this wizard.

Returns:
The name of the icon.
 o setBaselineImage
 public void setBaselineImage(String baselineImage)
Sets the baselineImage for this product. The baselineImage will appear below the console image on the left side of the wizard. It should be specified in wizard resource form ([packageName].[imagename_without_extension]). It is recommended that this image be 120 pixels wide x 30 pixels long.Make sure you include your image in the resource collections (by overriding setResources()) or your image will not be included in the archive!

Parameters:
baselineImage - The name of the baselineImage, in wizard resource form.
 o getBaselineImage
 public String getBaselineImage()
Gets the name of the baselineImage to be included in this wizard.

Returns:
The name of the baselineImage.
 o setExitMsg
 public void setExitMsg(Msg exitMsg)
Set the text that will appear when the user clicks the 'exit' button

Parameters:
exitMsg - The localized Msg that should appear when the user presses the "Exit" Button. If no text is supplied via this method, then the wizard will not prompt the user when the exit button is pressed, and simply exit. If text is supplied, it will be localized at runtime Using the correct locale resource bundle, by using the Msg class to produce the desired localized text.
See Also:
Msg
 o setCancelMsg
 public void setCancelMsg(Msg cancelMsg)
Set the text that will appear when the user clicks the 'cancel' button

Parameters:
cancelMsg - The localized Msg that should appear when the user presses the "Cancel" Button. If no text is supplied via this method, then the wizard will not prompt the user when the cancel button is pressed, and simply cancel whatever it was doing at the time. If text is supplied, it will be localized using the correct runtime locale resource bundle and the supplied key.
See Also:
Msg

All Packages  Class Hierarchy  This Package  Previous  Next  Index