Package com.iizigo.vs
Class NewVSComponentWizard<TYPE extends VSComponent>
java.lang.Object
org.eclipse.jface.wizard.Wizard
com.iizigo.vs.NewVSComponentWizard<TYPE>
- All Implemented Interfaces:
- INewVSComponentWizardInfo,- IShellProvider,- IWizard
public class NewVSComponentWizard<TYPE extends VSComponent> extends Wizard implements INewVSComponentWizardInfo
New VS Component wizard.
- Author:
- Christopher Mindus
- Field Summary- Fields inherited from class org.eclipse.jface.wizard.Wizard- DEFAULT_IMAGE
- Constructor SummaryConstructorsConstructorDescription- NewVSComponentWizard- (int createType, String title, EditorVirtualSpace virtualSpace, Value.Type type, boolean isChooseTypeAllowed, Boolean isNullAllowed, boolean doCreateDefaultValue, VSReferenceOwnerData<VSTable, - VSTableReference> tableOwner, IPropUndoRedo undoRedo) Constructor.
- Method SummaryModifier and TypeMethodDescription- void- createPageControls- (Composite pageContainer) Creation: override to set image on shell.- booleanReturns if a default value should be created.Gets the created component.Gets the requested name.Gets the table owner, for table column creation.Gets the undo/redo instance.Returns the value type where this applies (for VS Field and VS Column Header).Returns the VirtualSpace.- booleanReturns if the user is allowed to choose type.Returns if null is allowed.- static NewVSComponentWizard<EditorVSAction>- newVSActionWizard- (EditorVirtualSpace virtualSpace, IPropUndoRedo undoRedo) Create a new instance of the wizard to create an action.- static NewVSComponentWizard<EditorVSField>- newVSFieldWizard- (EditorVirtualSpace virtualSpace, Value.Type type, boolean isChooseTypeAllowed, Boolean isNullAllowed, boolean doCreateDefaultValue, IPropUndoRedo undoRedo) Create a new instance of the wizard to create a field.- newVSTableColumnWizard- (EditorVirtualSpace virtualSpace, Value.Type type, boolean isChooseTypeAllowed, Boolean isNullAllowed, boolean doCreateDefaultValue, VSReferenceOwnerData<VSTable, - VSTableReference> tableOwner, IPropUndoRedo undoRedo) Create a new instance of the wizard to create a field or a table column.- static NewVSComponentWizard<EditorVSTable>- newVSTableWizard- (EditorVirtualSpace virtualSpace, VSReferenceOwnerData<VSTable, - VSTableReference> tableOwner, IPropUndoRedo undoRedo) Create a new instance of the wizard to create a table.- booleanFinishes the wizard.- void- setNullAllowed- (boolean isNullAllowed) Sets the null allowed flag.- void- setRequestedName- (String requestedName) Sets the requested name.- void- setValueType- (Value.Type valueType) Sets the value type where this applies (for VS Field and VS Column Header).- Methods inherited from class org.eclipse.jface.wizard.Wizard- addPage, addPages, canFinish, 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- Methods inherited from interface com.iizigo.vs.INewVSComponentWizardInfo- getDescription, getTitle, isComponentSelectable, registerRequestedNameListener
- Constructor Details- NewVSComponentWizardpublic NewVSComponentWizard- (int createType, String title, EditorVirtualSpace virtualSpace, Value.Type type, boolean isChooseTypeAllowed, Boolean isNullAllowed, boolean doCreateDefaultValue, VSReferenceOwnerData<VSTable, - VSTableReference> tableOwner, IPropUndoRedo undoRedo) Constructor.- Parameters:
- createType- Creation type, or -1 not to.
- title- The window title and for undo operation.
- virtualSpace- The VirtualSpace.
- type- Value type for column & field.
- isChooseTypeAllowed- Flag indicating user is allowed to choose type (for field and column).
- isNullAllowed- Flag to allow null for column & field, specify null to let user choose.
- doCreateDefaultValue- Flag to create a default value, event when null is allowed or chosen.
- tableOwner- The table owner, when possible to create table for a column that doesn't exist.
- undoRedo- Undo/redo instance.
 
 
- Method Details- newVSActionWizardpublic static NewVSComponentWizard<EditorVSAction> newVSActionWizard- (EditorVirtualSpace virtualSpace, IPropUndoRedo undoRedo) Create a new instance of the wizard to create an action.- Parameters:
- virtualSpace- The VirtualSpace.
- undoRedo- Undo/redo instance.
- Returns:
- The new component wizard.
 
- newVSTableWizardpublic static NewVSComponentWizard<EditorVSTable> newVSTableWizard- (EditorVirtualSpace virtualSpace, VSReferenceOwnerData<VSTable, - VSTableReference> tableOwner, IPropUndoRedo undoRedo) Create a new instance of the wizard to create a table.- Parameters:
- virtualSpace- The VirtualSpace.
- tableOwner- The table owner, when possible to create table for a column that doesn't exist.
- undoRedo- Undo/redo instance.
- Returns:
- The new component wizard.
 
- newVSFieldWizardpublic static NewVSComponentWizard<EditorVSField> newVSFieldWizard- (EditorVirtualSpace virtualSpace, Value.Type type, boolean isChooseTypeAllowed, Boolean isNullAllowed, boolean doCreateDefaultValue, IPropUndoRedo undoRedo) Create a new instance of the wizard to create a field.- Parameters:
- virtualSpace- The VirtualSpace.
- type- Value type for column & field.
- isChooseTypeAllowed- Flag indicating user is allowed to choose type (for field and column).
- isNullAllowed- Flag to allow null for column & field, specify null to let user choose.
- doCreateDefaultValue- Flag to create a default value, event when null is allowed or chosen.
- undoRedo- Undo/redo instance.
- Returns:
- The new component wizard.
 
- newVSTableColumnWizardpublic static NewVSComponentWizard<EditorVSColumnHeader> newVSTableColumnWizard- (EditorVirtualSpace virtualSpace, Value.Type type, boolean isChooseTypeAllowed, Boolean isNullAllowed, boolean doCreateDefaultValue, VSReferenceOwnerData<VSTable, - VSTableReference> tableOwner, IPropUndoRedo undoRedo) Create a new instance of the wizard to create a field or a table column.- Parameters:
- virtualSpace- The VirtualSpace.
- type- Value type for column & field.
- isChooseTypeAllowed- Flag indicating user is allowed to choose type (for field and column).
- isNullAllowed- Flag to allow null for column & field, specify null to let user choose.
- doCreateDefaultValue- Flag to create a default value, event when null is allowed or chosen.
- tableOwner- The table owner, when possible to create table for a column that doesn't exist.
- undoRedo- Undo/redo instance.
- Returns:
- The new component wizard.
 
- createPageControlsCreation: override to set image on shell.- Specified by:
- createPageControlsin interface- IWizard
- Overrides:
- createPageControlsin class- Wizard
 
- performFinishpublic boolean performFinish()Finishes the wizard.- Specified by:
- performFinishin interface- IWizard
- Specified by:
- performFinishin class- Wizard
 
- getComponentGets the created component.
- getVirtualSpaceReturns the VirtualSpace.- Specified by:
- getVirtualSpacein interface- INewVSComponentWizardInfo
 
- getValueTypeReturns the value type where this applies (for VS Field and VS Column Header).- Specified by:
- getValueTypein interface- INewVSComponentWizardInfo
 
- setValueTypeSets the value type where this applies (for VS Field and VS Column Header).- Specified by:
- setValueTypein interface- INewVSComponentWizardInfo
- Parameters:
- valueType- The new value type.
 
- isChooseTypeAllowedpublic boolean isChooseTypeAllowed()Returns if the user is allowed to choose type.- Specified by:
- isChooseTypeAllowedin interface- INewVSComponentWizardInfo
 
- isNullAllowedReturns if null is allowed.- Specified by:
- isNullAllowedin interface- INewVSComponentWizardInfo
- Returns:
- null to enable user to choose, otherwise Boolean.TRUE or Boolean.FALSE to disable user choice and use this setting.
 
- setNullAllowedpublic void setNullAllowed- (boolean isNullAllowed) Sets the null allowed flag.- Specified by:
- setNullAllowedin interface- INewVSComponentWizardInfo
 
- doCreateDefaultValuepublic boolean doCreateDefaultValue()Returns if a default value should be created.- Specified by:
- doCreateDefaultValuein interface- INewVSComponentWizardInfo
 
- getTableOwnerGets the table owner, for table column creation.- Specified by:
- getTableOwnerin interface- INewVSComponentWizardInfo
- Returns:
- The table owner, or null for not available (or not applicable).
 
- getUndoRedoGets the undo/redo instance.- Specified by:
- getUndoRedoin interface- INewVSComponentWizardInfo
 
- getRequestedNameGets the requested name.- Specified by:
- getRequestedNamein interface- INewVSComponentWizardInfo
- Returns:
- null if no name is requested.
 
- setRequestedNameSets the requested name.- Specified by:
- setRequestedNamein interface- INewVSComponentWizardInfo
- Parameters:
- requestedName- null if no name is requested.