All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.izforge.izpack.installer.panel.PanelView Maven / Gradle / Ivy

The newest version!
package com.izforge.izpack.installer.panel;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.DynamicInstallerRequirementValidator;
import com.izforge.izpack.api.data.InstallData;
import com.izforge.izpack.api.data.Panel;
import com.izforge.izpack.api.installer.DataValidator;

/**
 * Encapsulates a {@link Panel} and its user-interface representation.
 *
 * @author Tim Anderson
 */
public interface PanelView
{
    /**
     * Returns the panel identifier.
     *
     * @return the panel identifier
     */
    String getPanelId();

    /**
     * Returns the panel.
     *
     * @return the panel
     */
    Panel getPanel();

    /**
     * Returns the panel index.
     * 
* This is the offset of the panel relative to the other panels, visible or not. * * @return the panel index */ int getIndex(); /** * Sets the panel index. * * @param index the index */ void setIndex(int index); /** * Returns the panel user interface. *
* The view will be created if it doesn't exist. *
* If the panel has a {@link DataValidator} specified, this will be constructed, with both the panel and view * supplied for injection into it's constructor. * * @return the panel user interface */ T getView(); /** * Sets the visibility of the panel. * * @param visible if {@code true} the panel is visible, otherwise it is hidden */ void setVisible(boolean visible); /** * Determines the visibility of the panel. * * @return {@code true} if the panel is visible, {@code false} if it is hidden */ boolean isVisible(); /** * Determines if the panel is valid. *

* This: *

    *
  1. Refreshes variables
  2. *
  3. Executes any pre-validation panel actions
  4. *
  5. Validates any {@link DynamicInstallerRequirementValidator}s returned by * {@link InstallData#getDynamicInstallerRequirements()}
  6. *
  7. Validates any {@link DataValidator} associated with the panel
  8. *
  9. Executes any post-validation panel actions
  10. *
* * @return {@code true} if the panel is valid, otherwise {@code false} */ boolean isValid(); /** * Determines if the panel is valid. *

* This: *

    *
  1. Executes any pre-validation panel actions
  2. *
  3. Validates any {@link DynamicInstallerRequirementValidator}s returned by * {@link InstallData#getDynamicInstallerRequirements()}
  4. *
  5. Validates any {@link DataValidator} associated with the panel
  6. *
  7. Executes any post-validation panel actions
  8. *
* * @param refreshVariables whether to refresh dynamic variables before validating * @return {@code true} if the panel is valid, otherwise {@code false} */ boolean isValid(boolean refreshVariables); /** * Save the contents of the panel into install data. */ void saveData(); /** * Determines if the panel can be shown. * * @return {@code true} if the panel can be shown */ boolean canShow(); /** * Creates an installation record for unattended installations and adds it to a XML root element. * * @param rootElement the root to add child elements to */ void createInstallationRecord(IXMLElement rootElement); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy