Class AddUICompWizard

  • All Implemented Interfaces:
    org.eclipse.jface.window.IShellProvider, org.eclipse.jface.wizard.IWizard

    public class AddUICompWizard
    extends org.eclipse.jface.wizard.Wizard
    Wizard used when a UI component is about to be added. This wizard provides a mechanism to pop-up a dialog box so the user can fill in the name of the component, VS connections, etc.
    Author:
    Christopher Mindus
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SILENT_PREFERENCE
      The Silent creation preference store name.
      • Fields inherited from class org.eclipse.jface.wizard.Wizard

        DEFAULT_IMAGE
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canFinish()  
      static boolean doAdd​(IAddUICompProvider<?> provider, UIComps uiComps, int index, PanelEditor editor)
      Performs the add component action.
      static boolean doWizardBeforeDrop​(UIComp dropComponent, UIComps uiComps, ComplexOperation op)
      Performs the wizard prompting for the component before dropping it.
      ModuleModel getModuleModel()
      Gets the Module model.
      PanelEditor getPanelEditor()
      Gets the panel editor.
      UIComps getUIComps()
      Gets the UIComps instance for e.g.
      IPropUndoRedo getUndoRedo()
      Returns the undo/redo instance.
      EditorVirtualSpace getVirtualSpace()
      Gets the VirtualSpace.
      static boolean isSilent()
      Checks if the dialog box should be shown or if it is silent.
      boolean performFinish()
      Finishes the dialog.
      static void setSilent​(boolean isSilent)
      Sets the silent flag.
      • Methods inherited from class org.eclipse.jface.wizard.Wizard

        addPage, addPages, createPageControls, dispose, getContainer, getDefaultPageImage, getDialogSettings, getNextPage, getPage, getPageCount, getPages, getPreviousPage, getShell, getStartingPage, getTitleBarColor, getWindowTitle, isHelpAvailable, needsPreviousAndNextButtons, needsProgressMonitor, performCancel, setContainer, setDefaultPageImageDescriptor, setDialogSettings, setForcePreviousAndNextButtons, setHelpAvailable, setNeedsProgressMonitor, setTitleBarColor, setWindowTitle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SILENT_PREFERENCE

        public static final java.lang.String SILENT_PREFERENCE
        The Silent creation preference store name.
        See Also:
        Constant Field Values
    • Method Detail

      • isSilent

        public static boolean isSilent()
        Checks if the dialog box should be shown or if it is silent.
      • setSilent

        public static void setSilent​(boolean isSilent)
        Sets the silent flag.
        Parameters:
        isSilent - The flag.
      • doAdd

        public static boolean doAdd​(IAddUICompProvider<?> provider,
                                    UIComps uiComps,
                                    int index,
                                    PanelEditor editor)
        Performs the add component action.
        Parameters:
        provider - The provider instance to create a new component.
        uiComps - The target UIComps.
        index - The index in UIComps, -1 for last.
        editor - The panel editor.
        Returns:
        true if successful, false if user canceled the operation.
      • doWizardBeforeDrop

        public static boolean doWizardBeforeDrop​(UIComp dropComponent,
                                                 UIComps uiComps,
                                                 ComplexOperation op)
        Performs the wizard prompting for the component before dropping it. This is called due to JavaScript panel editor callback, and will modify the component and perhaps create VS Components, etc...

        The component is NOT added.

        Parameters:
        dropComponent - The component to drop.
        uiComps - The target UIComps.
        op - The complex operation.
        Returns:
        true if successful, false if user canceled the operation.
      • getModuleModel

        public ModuleModel getModuleModel()
        Gets the Module model.
      • getUIComps

        public UIComps getUIComps()
        Gets the UIComps instance for e.g. naming the component uniquely.
      • getPanelEditor

        public PanelEditor getPanelEditor()
        Gets the panel editor.
      • getUndoRedo

        public IPropUndoRedo getUndoRedo()
        Returns the undo/redo instance.
      • canFinish

        public boolean canFinish()
        Specified by:
        canFinish in interface org.eclipse.jface.wizard.IWizard
        Overrides:
        canFinish in class org.eclipse.jface.wizard.Wizard
      • performFinish

        public boolean performFinish()
        Finishes the dialog.
        Specified by:
        performFinish in interface org.eclipse.jface.wizard.IWizard
        Specified by:
        performFinish in class org.eclipse.jface.wizard.Wizard
        Returns:
        true to indicate the finish request was accepted, and false to indicate that the finish request was refused.