Package ghidra.framework.main.wizard.project

# Class ProjectTypeStep

java.lang.Object
docking.wizard.WizardStep<ProjectWizardData>
ghidra.framework.main.wizard.project.ProjectTypeStep

public class ProjectTypeStep extends WizardStep<ProjectWizardData>
Wizard step in the new project wizard for choosing the type of project.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ProjectTypeStep(WizardModel<ProjectWizardData> model)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `apply(ProjectWizardData data)`
  This method is called on the current step when advancing to the next step.
  `boolean`
  `canFinish(ProjectWizardData data)`
  Reports true if the information in the given data object is sufficient enough that this step does not need to be shown in order to complete the wizard.
  `JComponent`
  `getComponent()`
  Get the panel object
  `void`
  `initialize(ProjectWizardData data)`
  Initialize the panel as though this is the first time it is being displayed.
  `boolean`
  `isValid()`
  Checks if the Gui component has completed and has valid information.
  `void`
  `populateData(ProjectWizardData data)`
  This method should populate the given data object with information from its Gui component.

  ### Methods inherited from class docking.wizard.WizardStep

  `clearStatus, dispose, getDefaultFocusComponent, getHelpLocation, getStatusMessage, getTitle, isApplicable, notifyStatusChanged, setHelpLocation, setStatusMessage, setTitle`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ProjectTypeStep

    protected ProjectTypeStep(WizardModel<ProjectWizardData> model)

- ## Method Details

  - ### initialize

    public void initialize(ProjectWizardData data)
    Description copied from class: `WizardStep`
    Initialize the panel as though this is the first time it is being displayed. This is where the step should initialize all Gui fields from the given data object.

    Creating the Gui component can be done lazily in this method if not done in the constructor, as the initialize() method will always be called before the getComponent() method is called. Just be careful as this method can be called multiple times if the user backtracks in the wizard dialog.

    Specified by:
      `initialize` in class `WizardStep<ProjectWizardData>`
    Parameters:
      `data` - the custom wizard data containing the information from all previous steps.

  - ### isValid

    public boolean isValid()
    Description copied from class: `WizardStep`
    Checks if the Gui component has completed and has valid information. Typically, whenever the Gui state changes, it notifies the model using the statusChangedCallback, which in turn will call the isValid() method on the current step. If the current step is valid, it will in turn trigger additional calls to follow-on steps to see if the wizard can finish.
    Specified by:
      `isValid` in class `WizardStep<ProjectWizardData>`
    Returns:
      true if the Gui component has completed and valid information and is eligible to continue to the next step.

  - ### populateData

    public void populateData(ProjectWizardData data)
    Description copied from class: `WizardStep`
    This method should populate the given data object with information from its Gui component.
    Specified by:
      `populateData` in class `WizardStep<ProjectWizardData>`
    Parameters:
      `data` - the custom wizard data containing the information from all previous steps.

  - ### apply

    public boolean apply(ProjectWizardData data)
    Description copied from class: `WizardStep`
    This method is called on the current step when advancing to the next step. It is also called on all subsequent steps when finishing the wizard as those steps are skipped because the finish button was pressed. This method is for steps to perform more extensive operations when moving on to subsequent steps. Most steps can just return true here as simple data will be added during the `WizardStep.populateData(Object)` method.
    Specified by:
      `apply` in class `WizardStep<ProjectWizardData>`
    Parameters:
      `data` - the custom wizard data containing the information from all previous steps.
    Returns:
      true if the apply completes successfully.

  - ### canFinish

    public boolean canFinish(ProjectWizardData data)
    Description copied from class: `WizardStep`
    Reports true if the information in the given data object is sufficient enough that this step does not need to be shown in order to complete the wizard. It is only called on steps subsequent to the current step. Wizard steps should only make their decisions based on the information in the data object and not their internal GUI, which might not have even been initialized at this point. This method is only called on steps whose `WizardStep.isApplicable(Object)` method returns true.
    Specified by:
      `canFinish` in class `WizardStep<ProjectWizardData>`
    Parameters:
      `data` - the custom wizard data containing the information from all previous steps.
    Returns:
      true if this step does not need to be shown before completing the wizard

  - ### getComponent

    public JComponent getComponent()
    Description copied from class: `WizardStep`
    Get the panel object
    Specified by:
      `getComponent` in class `WizardStep<ProjectWizardData>`
    Returns:
      JPanel panel