org.openoffice.ide.eclipse.core.wizards.pages
Class NewServiceWizardPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by org.openoffice.ide.eclipse.core.wizards.pages.NewScopedElementWizardPage
              extended by org.openoffice.ide.eclipse.core.wizards.pages.NewServiceWizardPage
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage, IFieldChangedListener, IListenablePage

public class NewServiceWizardPage
extends NewScopedElementWizardPage

Service creation wizard page.

Author:
cedricbosdo

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
NewServiceWizardPage(java.lang.String pPageName, IUnoidlProject pProject)
          Simple constructor setting the package root and element name to blank values.
NewServiceWizardPage(java.lang.String pPageName, IUnoidlProject pProject, java.lang.String pRootName, java.lang.String pServiceName)
          Constructor setting allowing to set custom root package and service name.
 
Method Summary
 void createSpecificControl(org.eclipse.swt.widgets.Composite pParent)
          Implement this method to add specific controls for the subclassing wizard page.
 void fieldChanged(FieldEvent pEvent)
          Method called when the row has changed.
 UnoFactoryData fillData(UnoFactoryData pData)
           
 java.lang.String getDescription()
          
 UnoFactoryData getEmptyTypeData()
          Creates an empty factory data for the page UNO type.
protected  org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
          
 java.lang.String getInheritanceName()
          Gets the name of the exported interface.
 int getProvidedTypes()
          
 java.lang.String getTitle()
          
protected  java.lang.String getTypeLabel()
          
 boolean isInheritanceChanged()
          Tells whether the user has changed the exported interface since it has last been set using the APIs.
 void setInheritanceName(java.lang.String pValue, boolean pForced)
          Sets the name of the exported interface.
 
Methods inherited from class org.openoffice.ide.eclipse.core.wizards.pages.NewScopedElementWizardPage
addPageListener, createControl, dispose, existsIdlFile, firePageChanged, getElementName, getPackage, getPackageRoot, getProject, getTypeData, isPageComplete, isPublished, removePageListener, setName, setOOoInstance, setPackage, setPackageRoot, setPublished, setUnoidlProject, setVisible
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
getControl, getErrorMessage, getMessage, performHelp
 

Constructor Detail

NewServiceWizardPage

public NewServiceWizardPage(java.lang.String pPageName,
                            IUnoidlProject pProject)
Simple constructor setting the package root and element name to blank values.

Parameters:
pPageName - the page name
pProject - the project where to create the service

NewServiceWizardPage

public NewServiceWizardPage(java.lang.String pPageName,
                            IUnoidlProject pProject,
                            java.lang.String pRootName,
                            java.lang.String pServiceName)
Constructor setting allowing to set custom root package and service name.

Parameters:
pPageName - the page name
pProject - the project where to create the service
pRootName - the project root namespace
pServiceName - the default service name
Method Detail

getProvidedTypes

public int getProvidedTypes()

Specified by:
getProvidedTypes in class NewScopedElementWizardPage
Returns:
the types to get in the UNO types provider. The returned integer is a
bit or
of the types defined in the UnoTypeProvider class.

createSpecificControl

public void createSpecificControl(org.eclipse.swt.widgets.Composite pParent)
Implement this method to add specific controls for the subclassing wizard page.

Specified by:
createSpecificControl in class NewScopedElementWizardPage
Parameters:
pParent - the composite parent where to put the controls

getTitle

public java.lang.String getTitle()

Specified by:
getTitle in interface org.eclipse.jface.dialogs.IDialogPage
Overrides:
getTitle in class org.eclipse.jface.dialogs.DialogPage

getDescription

public java.lang.String getDescription()

Specified by:
getDescription in interface org.eclipse.jface.dialogs.IDialogPage
Overrides:
getDescription in class org.eclipse.jface.dialogs.DialogPage

getTypeLabel

protected java.lang.String getTypeLabel()

Specified by:
getTypeLabel in class NewScopedElementWizardPage
Returns:
the string corresponding to the type name, e.g. "interface".

getImageDescriptor

protected org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()

Specified by:
getImageDescriptor in class NewScopedElementWizardPage
Returns:
the image descriptor to put on the top-right of the page

fieldChanged

public void fieldChanged(FieldEvent pEvent)
Method called when the row has changed.

Specified by:
fieldChanged in interface IFieldChangedListener
Overrides:
fieldChanged in class NewScopedElementWizardPage
Parameters:
pEvent - the field event thrown

getInheritanceName

public java.lang.String getInheritanceName()
Gets the name of the exported interface.

Returns:
the fully qualified name of the exported interface separated with "::"

setInheritanceName

public void setInheritanceName(java.lang.String pValue,
                               boolean pForced)
Sets the name of the exported interface.

Use this method to impose the service to implement a particular interface. This is the case for an URE application.

Parameters:
pValue - the interface fully qualified name
pForced - disables the field if true

isInheritanceChanged

public boolean isInheritanceChanged()
Tells whether the user has changed the exported interface since it has last been set using the APIs.

Returns:
true is the has changed the exported interface.

fillData

public UnoFactoryData fillData(UnoFactoryData pData)
Overrides:
fillData in class NewScopedElementWizardPage
Parameters:
pData - the data to fill
Returns:
the given data with the completed properties, null if the provided data is null

getEmptyTypeData

public UnoFactoryData getEmptyTypeData()
Creates an empty factory data for the page UNO type.

Specified by:
getEmptyTypeData in class NewScopedElementWizardPage
Returns:
the empty UNO factory data