org.openoffice.da.comp.w2lcommon.helper
Class DialogBase

java.lang.Object
  extended by org.openoffice.da.comp.w2lcommon.helper.DialogBase
Direct Known Subclasses:
OptionsDialogBase

public abstract class DialogBase
extends java.lang.Object

This class provides an abstract uno component which implements a dialog from an xml description (using the DialogProvider2 service)


Field Summary
static java.lang.String __implementationName
          The component should also have an implementation name.
static java.lang.String __serviceName
          The component will be registered under this name.
protected static short CHECKBOX_CHECKED
           
protected static short CHECKBOX_DONT_KNOW
           
protected static short CHECKBOX_NOT_CHECKED
           
protected  XComponentContext xContext
           
 
Constructor Summary
DialogBase(XComponentContext xContext)
          Create a new OptionsDialogBase
 
Method Summary
 boolean callHandlerMethod(XDialog xDialog, java.lang.Object event, java.lang.String sMethod)
           
 short execute()
           
protected abstract  void finalize()
          Finalize the dialog after execution (eg. save settings to the registry) The subclass must implement this
protected  short getCheckBoxState(java.lang.String sControlName)
           
protected  boolean getCheckBoxStateAsBoolean(java.lang.String sControlName)
           
protected  java.lang.String getComboBoxText(java.lang.String sControlName)
           
abstract  java.lang.String getDialogLibraryName()
          Return the name of the library containing the dialog The subclass must override this to provide the name of the library
abstract  java.lang.String getDialogName()
          Return the name of the dialog within the library The subclass must override this to provide the name of the dialog
protected  java.lang.String getFormattedFieldText(java.lang.String sControlName)
           
 byte[] getImplementationId()
           
 java.lang.String getImplementationName()
           
protected  short getListBoxLineCount(java.lang.String sControlName)
           
protected  short getListBoxSelectedItem(java.lang.String sControlName)
           
protected  java.lang.String[] getListBoxStringItemList(java.lang.String sControlName)
           
protected  int getNumericFieldValue(java.lang.String sControlName)
           
protected  java.lang.Object getPropertyValue(XPropertySet xProps, java.lang.String sName)
           
protected  boolean getPropertyValueAsBoolean(XPropertySet xProps, java.lang.String sName)
           
protected  int getPropertyValueAsInteger(XPropertySet xProps, java.lang.String sName)
           
protected  short getPropertyValueAsShort(XPropertySet xProps, java.lang.String sName)
           
protected  java.lang.String getPropertyValueAsString(XPropertySet xProps, java.lang.String sName)
           
 java.lang.String getServiceName()
           
 java.lang.String[] getSupportedMethodNames()
           
 java.lang.String[] getSupportedServiceNames()
           
protected  java.lang.String getTextFieldText(java.lang.String sControlName)
           
 Type[] getTypes()
           
protected abstract  void initialize()
          Initialize the dialog (eg. with settings from the registry) The subclass must implement this
protected  void setCheckBoxState(java.lang.String sControlName, short nState)
           
protected  void setCheckBoxStateAsBoolean(java.lang.String sControlName, boolean bChecked)
           
protected  void setComboBoxText(java.lang.String sControlName, java.lang.String sText)
           
protected  void setControlEnabled(java.lang.String sControlName, boolean bEnabled)
           
protected  void setFormattedFieldText(java.lang.String sControlName, java.lang.String sText)
           
protected  void setListBoxLineCount(java.lang.String sControlName, short nLineCount)
           
protected  void setListBoxSelectedItem(java.lang.String sControlName, short nIndex)
           
protected  void setListBoxStringItemList(java.lang.String sControlName, java.lang.String[] items)
           
protected  void setNumericFieldValue(java.lang.String sControlName, int nValue)
           
protected  void setPropertyValue(XPropertySet xProps, java.lang.String sName, boolean bValue)
           
protected  void setPropertyValue(XPropertySet xProps, java.lang.String sName, int nValue)
           
protected  void setPropertyValue(XPropertySet xProps, java.lang.String sName, java.lang.Object value)
           
protected  void setPropertyValue(XPropertySet xProps, java.lang.String sName, short nValue)
           
protected  void setTextFieldText(java.lang.String sControlName, java.lang.String sText)
           
 void setTitle(java.lang.String sTitle)
           
 boolean supportsService(java.lang.String sServiceName)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__serviceName

public static java.lang.String __serviceName
The component will be registered under this name. The subclass must override this with a suitable name


__implementationName

public static java.lang.String __implementationName
The component should also have an implementation name. The subclass must override this with a suitable name


CHECKBOX_NOT_CHECKED

protected static final short CHECKBOX_NOT_CHECKED
See Also:
Constant Field Values

CHECKBOX_CHECKED

protected static final short CHECKBOX_CHECKED
See Also:
Constant Field Values

CHECKBOX_DONT_KNOW

protected static final short CHECKBOX_DONT_KNOW
See Also:
Constant Field Values

xContext

protected XComponentContext xContext
Constructor Detail

DialogBase

public DialogBase(XComponentContext xContext)
Create a new OptionsDialogBase

Method Detail

getDialogLibraryName

public abstract java.lang.String getDialogLibraryName()
Return the name of the library containing the dialog The subclass must override this to provide the name of the library


getDialogName

public abstract java.lang.String getDialogName()
Return the name of the dialog within the library The subclass must override this to provide the name of the dialog


initialize

protected abstract void initialize()
Initialize the dialog (eg. with settings from the registry) The subclass must implement this


finalize

protected abstract void finalize()
Finalize the dialog after execution (eg. save settings to the registry) The subclass must implement this

Overrides:
finalize in class java.lang.Object

getTypes

public Type[] getTypes()

getImplementationId

public byte[] getImplementationId()

getServiceName

public java.lang.String getServiceName()

supportsService

public boolean supportsService(java.lang.String sServiceName)

getImplementationName

public java.lang.String getImplementationName()

getSupportedServiceNames

public java.lang.String[] getSupportedServiceNames()

setTitle

public void setTitle(java.lang.String sTitle)

execute

public short execute()

callHandlerMethod

public boolean callHandlerMethod(XDialog xDialog,
                                 java.lang.Object event,
                                 java.lang.String sMethod)

getSupportedMethodNames

public java.lang.String[] getSupportedMethodNames()

setControlEnabled

protected void setControlEnabled(java.lang.String sControlName,
                                 boolean bEnabled)

getCheckBoxState

protected short getCheckBoxState(java.lang.String sControlName)

getCheckBoxStateAsBoolean

protected boolean getCheckBoxStateAsBoolean(java.lang.String sControlName)

setCheckBoxState

protected void setCheckBoxState(java.lang.String sControlName,
                                short nState)

setCheckBoxStateAsBoolean

protected void setCheckBoxStateAsBoolean(java.lang.String sControlName,
                                         boolean bChecked)

getListBoxStringItemList

protected java.lang.String[] getListBoxStringItemList(java.lang.String sControlName)

setListBoxStringItemList

protected void setListBoxStringItemList(java.lang.String sControlName,
                                        java.lang.String[] items)

getListBoxSelectedItem

protected short getListBoxSelectedItem(java.lang.String sControlName)

setListBoxSelectedItem

protected void setListBoxSelectedItem(java.lang.String sControlName,
                                      short nIndex)

getListBoxLineCount

protected short getListBoxLineCount(java.lang.String sControlName)

setListBoxLineCount

protected void setListBoxLineCount(java.lang.String sControlName,
                                   short nLineCount)

getComboBoxText

protected java.lang.String getComboBoxText(java.lang.String sControlName)

setComboBoxText

protected void setComboBoxText(java.lang.String sControlName,
                               java.lang.String sText)

getTextFieldText

protected java.lang.String getTextFieldText(java.lang.String sControlName)

setTextFieldText

protected void setTextFieldText(java.lang.String sControlName,
                                java.lang.String sText)

getFormattedFieldText

protected java.lang.String getFormattedFieldText(java.lang.String sControlName)

setFormattedFieldText

protected void setFormattedFieldText(java.lang.String sControlName,
                                     java.lang.String sText)

getNumericFieldValue

protected int getNumericFieldValue(java.lang.String sControlName)

setNumericFieldValue

protected void setNumericFieldValue(java.lang.String sControlName,
                                    int nValue)

getPropertyValue

protected java.lang.Object getPropertyValue(XPropertySet xProps,
                                            java.lang.String sName)

setPropertyValue

protected void setPropertyValue(XPropertySet xProps,
                                java.lang.String sName,
                                java.lang.Object value)

getPropertyValueAsString

protected java.lang.String getPropertyValueAsString(XPropertySet xProps,
                                                    java.lang.String sName)

getPropertyValueAsInteger

protected int getPropertyValueAsInteger(XPropertySet xProps,
                                        java.lang.String sName)

setPropertyValue

protected void setPropertyValue(XPropertySet xProps,
                                java.lang.String sName,
                                int nValue)

getPropertyValueAsShort

protected short getPropertyValueAsShort(XPropertySet xProps,
                                        java.lang.String sName)

setPropertyValue

protected void setPropertyValue(XPropertySet xProps,
                                java.lang.String sName,
                                short nValue)

getPropertyValueAsBoolean

protected boolean getPropertyValueAsBoolean(XPropertySet xProps,
                                            java.lang.String sName)

setPropertyValue

protected void setPropertyValue(XPropertySet xProps,
                                java.lang.String sName,
                                boolean bValue)