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.
-
WizardArchiveWriter(WizardState)
- Create an WizardArchiveWriter with the default ArchiveReader classes
and the default RuntimeClasses set.
-
addCollection(ResourceCollection)
- Adds a collection of resources to the archive.
-
addResource(String, String, ResourceResolver)
- Add a single resource to the archive.
-
addResources(Vector, ResourceResolver)
- Adds the specified vector of resources to the table of
resources that will be written into the wizard archive.
-
createClientTree()
- Create the wizard client tree.
-
getArchiveName()
- Returns the name of this wizard archive (without the ".class" extension)
-
getBaselineImage()
- Gets the name of the baselineImage to be included in this wizard.
-
getIcon()
-
Gets the name of the icon to be included in this wizard.
-
getImage()
- Gets the name of the image to be included in this wizard.
-
getRoot()
- Returns the WizardComposite object that is the root of the client
tree.
-
getRuntimeResources()
- This method collects the classnames of the classes required to
execute the wizard defined via the createClientTree method.
-
getWizardState()
- Returns the WizardState object that will be written into the
wizard archive.
-
setArchiveName(String)
- Sets the name of this archive, omitting the ".class" extension.
-
setBaselineImage(String)
- Sets the baselineImage for this product.
-
setCancelMsg(Msg)
- Set the text that will appear when the user clicks the 'cancel' button
-
setExitMsg(Msg)
- Set the text that will appear when the user clicks the 'exit' button
-
setIcon(String)
- Sets the icon for this product.
-
setImage(String)
- Sets the image for this product.
-
setResources()
- Set other resources into the archive.
-
setRoot(WizardComposite)
- Sets the WizardComposite object that will be the root of the client panel tree.
-
setWizardState(WizardState)
- Sets the WizardState object that will be written into the
wizard archive.
-
writeArchive(File)
- Write the archive file.
WizardArchiveWriter
public WizardArchiveWriter(WizardState state)
- Create an WizardArchiveWriter with the default ArchiveReader classes
and the default RuntimeClasses set.
- Parameters:
- state - The WizardState.
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.
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
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.
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)
setArchiveName
public void setArchiveName(String archiveName)
- Sets the name of this archive, omitting the ".class" extension.
- Parameters:
- archiveName - The name of this archive
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
createClientTree
protected void createClientTree()
- Create the wizard client tree. The default behavior only
provides the root of the tree.
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.
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.
getRuntimeResources
protected void getRuntimeResources()
- This method collects the classnames of the classes required to
execute the wizard defined via the createClientTree method.
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:
String[] - If the length is two, the element is assumed
to be of the form:
{path, resource name}
The supplied path will be used to locate the resource. If the supplied path
is null, the wizard runtime package path is assumed.
String - If the element is a String, the string is assumed
to be the name of the resource. The CLASSPATH will be searched
to find the resource.
- Parameters:
- resourceVector - The vector containing wizard resource name(s).
- resolver - The ResourceResolver for the specified resources.
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.
addCollection
public void addCollection(ResourceCollection collection)
- Adds a collection of resources to the archive.
- Parameters:
- collection - The resources to be added.
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.
getImage
public String getImage()
- Gets the name of the image to be included in this wizard.
- Returns:
- The name of the image.
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.
getIcon
public String getIcon()
- Gets the name of the icon to be included in this wizard.
- Returns:
- The name of the icon.
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.
getBaselineImage
public String getBaselineImage()
- Gets the name of the baselineImage to be included in this wizard.
- Returns:
- The name of the baselineImage.
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
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