org.netbeans.spi.wizard
Class Summary

java.lang.Object
  extended by org.netbeans.spi.wizard.Summary

public class Summary
extends java.lang.Object

Object which may be returned from WizardPage.WizardResultProducer.finish() or WizardPanelProvider.finish(), or passed to DeferredWizardResult.ResultProgressHandle.finish(). If an instance of Summary is used, then the UI should, rather than disappearing, show the component provided by the Summary object. Convenience constructors are provided for plain text and list style views.

Author:
Tim Boudreau

Method Summary
Modifier and Type Method and Description
static Summary create(java.awt.Component comp, java.lang.Object result)
          Create a Summary object that will display the passed component.
static Summary create(java.lang.String[] items, java.lang.Object result)
          Create a Summary object that will display the passed Strings in a JList or similar.
static Summary create(java.lang.String text, java.lang.Object result)
          Create a Summary object which will display the passed String in a text component of some sort.
 java.lang.Object getResult()
          Get the object that represents the actual result of whatever the Wizard that created this Summary object computes.
 java.awt.Component getSummaryComponent()
          Get the component that will display the summary information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Summary create(java.lang.String[] items,
                             java.lang.Object result)
Create a Summary object that will display the passed Strings in a JList or similar.

Parameters:
items - A non-null list of one or more Strings to be displayed
result - The result that should be returned when the Wizard is closed
Returns:
the requested Summary object

create

public static Summary create(java.awt.Component comp,
                             java.lang.Object result)
Create a Summary object that will display the passed component.

Parameters:
comp - A custom component to show on the summary page after the Wizard has been completed
result - The result that should be returned when the Wizard is closed
Returns:
the requested Summary object

create

public static Summary create(java.lang.String text,
                             java.lang.Object result)
Create a Summary object which will display the passed String in a text component of some sort.

Parameters:
text - The text to display - must be non-null, greater than zero length and not completely whitespace
result - The result that should be returned when the Wizard is closed
Returns:
the requested Summary object

getSummaryComponent

public java.awt.Component getSummaryComponent()
Get the component that will display the summary information.

Returns:
an appropriate component, the type of which may differ depending on the factory method used to create this component

getResult

public java.lang.Object getResult()
Get the object that represents the actual result of whatever the Wizard that created this Summary object computes. Note this method may not return another instance of Summary or an instance of DeferredWizardResult.

Returns:
the object passed to the factory method that created this Summary object, or null.