Package com.iizigo.vs.wizards
Class VSComponentCreation<VSTYPE extends VSComponent>
java.lang.Object
com.iizigo.vs.wizards.VSComponentCreation<VSTYPE>
- All Implemented Interfaces:
- INewVSComponentWizardInfo
- Direct Known Subclasses:
- VSActionCreation,- VSColumnCreation,- VSFieldCreation,- VSTableCreation
public abstract class VSComponentCreation<VSTYPE extends VSComponent> extends Object implements INewVSComponentWizardInfo
Class for VirtualSpace component creation used in the wizards e.g. when creating panel components.
- Author:
- Christopher Mindus
- Field SummaryFields
- Constructor SummaryConstructorsConstructorDescription- VSComponentCreation- (EditorVirtualSpace virtualSpace, String requestedName, Value.Type valueType, boolean doCreateDefaultValue, boolean isChooseTypeAllowed, Boolean isNullAllowed, VSReferenceOwnerData<VSTable, - VSTableReference> tableOwner, IPropUndoRedo undoRedo) Constructor.
- Method SummaryModifier and TypeMethodDescription- abstract booleanCompletes the referencing to the VS component in the UI component.- final VSTYPECreates the component required with the specified name.- protected abstract VSTYPE- doCreate- (Atom name, PropCnr parent, ComplexOperation op) Creates the component required with the specified name.- final booleanReturns if a default value should be created.- abstract StringGets the default name for the VS component if no request name is defined.- final StringGets the description.- final StringGets the requested name.Gets the table owner, for table column creation.- final String- getTitle()Gets the title.- final IPropUndoRedoGets the undo/redo instance.- final Value.TypeReturns the value type where this applies (for VS Field and VS Column Header).- final EditorVirtualSpaceReturns the VirtualSpace.- final PropCnrGets the parent for the component.- final booleanReturns if the user is allowed to choose type.- final booleanReturns if the VS component should be selectable or not.- final BooleanReturns if null is allowed.- abstract void- onWizard- (AddUICompWizard wizard) Called to create required wizard pages.- void- registerRequestedNameListener- (Runnable nameListener) Registers a requested name listener.- final void- setDescription- (String descr) Gets the description.- final void- setNullAllowed- (boolean isNullAllowed) Sets the null allowed flag.- final void- setRequestedName- (String requestedName) Sets the requested name.- final voidSets the title.- final void- setValueType- (Value.Type valueType) Sets the value type where this applies (for VS Field and VS Column Header).- final void- setVSParent- (PropCnr vsParent) Sets the parent.
- Field Details- createdComponentThe created component.
 
- Constructor Details- VSComponentCreationpublic VSComponentCreation- (EditorVirtualSpace virtualSpace, String requestedName, Value.Type valueType, boolean doCreateDefaultValue, boolean isChooseTypeAllowed, Boolean isNullAllowed, VSReferenceOwnerData<VSTable, - VSTableReference> tableOwner, IPropUndoRedo undoRedo) Constructor.- Parameters:
- virtualSpace- The VirtualSpace.
- requestedName- The requested name of the component.
- valueType- The value type chosen when the VS type is VSField or VSColumnHeader.
- doCreateDefaultValue- Flag to create a default value.
- isChooseTypeAllowed- If user is allowed to choose value type.
- isNullAllowed- Flag null is allowed, null to enable user to choose.
- tableOwner- The table owner, or null for not available (or not applicable).
- undoRedo- The undo/redo instance.
 
 
- Method Details- registerRequestedNameListenerRegisters a requested name listener.- Specified by:
- registerRequestedNameListenerin interface- INewVSComponentWizardInfo
 
- isComponentSelectablepublic final boolean isComponentSelectable()Returns if the VS component should be selectable or not.- Specified by:
- isComponentSelectablein interface- INewVSComponentWizardInfo
- Returns:
- true by default in order to enable selecting an existing component.
 
- setTitleSets the title.- Parameters:
- title- The title for the page, or null for default.
 
- getTitleGets the title.- Specified by:
- getTitlein interface- INewVSComponentWizardInfo
- Returns:
- The title for the page, or null for default.
 
- getDescriptionGets the description.- Specified by:
- getDescriptionin interface- INewVSComponentWizardInfo
- Returns:
- The description of the page, or null for default.
 
- setDescriptionGets the description.- Parameters:
- descr- The description of the page, or null for default.
 
- getVSParentGets the parent for the component. This is initially set to the VirtualSpace.
- setVSParentSets the parent.
- setRequestedNameSets the requested name.- Specified by:
- setRequestedNamein interface- INewVSComponentWizardInfo
- Parameters:
- requestedName- null if no name is requested.
 
- getRequestedNameGets the requested name.- Specified by:
- getRequestedNamein interface- INewVSComponentWizardInfo
- Returns:
- null if no name is requested.
 
- 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 final 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 final void setNullAllowed- (boolean isNullAllowed) Sets the null allowed flag.- Specified by:
- setNullAllowedin interface- INewVSComponentWizardInfo
 
- doCreateDefaultValuepublic final 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
 
- createVSComponentCreates the component required with the specified name.- Parameters:
- op- The complex operation.
- Returns:
- The component, initiated with potential value or value type.
 
- getDefaultNameGets the default name for the VS component if no request name is defined.
- onWizardCalled to create required wizard pages.- Parameters:
- wizard- The wizard.
 
- doCreateCreates the component required with the specified name.- Parameters:
- name- The name.
- parent- The parent for the VS component.
- op- The complex operation.
- Returns:
- The component, initiated with potential value or value type.
 
- assignReferencepublic abstract boolean assignReference()Completes the referencing to the VS component in the UI component.- Returns:
- true if the component reference is set, false if the user chose not to create this VS component.