org.openoffice.da.comp.w2lcommon.helper

Class DialogBase

Implemented Interfaces:
XDialogEventHandler, XExecutableDialog, XServiceInfo, XServiceName, XTypeProvider
Known Direct Subclasses:
OptionsDialogBase

public abstract class DialogBase
extends java.lang.Object
implements XTypeProvider, XServiceInfo, XServiceName, XExecutableDialog, XDialogEventHandler

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

Field Summary

protected static short
CHECKBOX_CHECKED
protected static short
CHECKBOX_DONT_KNOW
protected static short
CHECKBOX_NOT_CHECKED
static String
__implementationName
The component should also have an implementation name.
static String
__serviceName
The component will be registered under this name.
protected XComponentContext
xContext

Constructor Summary

DialogBase(XComponentContext xContext)
Create a new OptionsDialogBase

Method Summary

boolean
callHandlerMethod(XDialog xDialog, Object event, 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(String sControlName)
protected boolean
getCheckBoxStateAsBoolean(String sControlName)
protected String
getComboBoxText(String sControlName)
abstract String
getDialogLibraryName()
Return the name of the library containing the dialog The subclass must override this to provide the name of the library
abstract String
getDialogName()
Return the name of the dialog within the library The subclass must override this to provide the name of the dialog
protected String
getFormattedFieldText(String sControlName)
byte[]
getImplementationId()
String
getImplementationName()
protected short
getListBoxLineCount(String sControlName)
protected short
getListBoxSelectedItem(String sControlName)
protected String[]
getListBoxStringItemList(String sControlName)
protected int
getNumericFieldValue(String sControlName)
protected Object
getPropertyValue(XPropertySet xProps, String sName)
protected boolean
getPropertyValueAsBoolean(XPropertySet xProps, String sName)
protected int
getPropertyValueAsInteger(XPropertySet xProps, String sName)
protected short
getPropertyValueAsShort(XPropertySet xProps, String sName)
protected String
getPropertyValueAsString(XPropertySet xProps, String sName)
String
getServiceName()
String[]
getSupportedMethodNames()
String[]
getSupportedServiceNames()
protected String
getTextFieldText(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(String sControlName, short nState)
protected void
setCheckBoxStateAsBoolean(String sControlName, boolean bChecked)
protected void
setComboBoxText(String sControlName, String sText)
protected void
setControlEnabled(String sControlName, boolean bEnabled)
protected void
setFormattedFieldText(String sControlName, String sText)
protected void
setListBoxLineCount(String sControlName, short nLineCount)
protected void
setListBoxSelectedItem(String sControlName, short nIndex)
protected void
setListBoxStringItemList(String sControlName, String[] items)
protected void
setNumericFieldValue(String sControlName, int nValue)
protected void
setPropertyValue(XPropertySet xProps, String sName, Object value)
protected void
setPropertyValue(XPropertySet xProps, String sName, boolean bValue)
protected void
setPropertyValue(XPropertySet xProps, String sName, int nValue)
protected void
setPropertyValue(XPropertySet xProps, String sName, short nValue)
protected void
setTextFieldText(String sControlName, String sText)
void
setTitle(String sTitle)
boolean
supportsService(String sServiceName)

Field Details

CHECKBOX_CHECKED

protected static final short CHECKBOX_CHECKED
Field Value:
1

CHECKBOX_DONT_KNOW

protected static final short CHECKBOX_DONT_KNOW
Field Value:
2

CHECKBOX_NOT_CHECKED

protected static final short CHECKBOX_NOT_CHECKED
Field Value:
0

__implementationName

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

__serviceName

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

xContext

protected XComponentContext xContext

Constructor Details

DialogBase

public DialogBase(XComponentContext xContext)
Create a new OptionsDialogBase

Method Details

callHandlerMethod

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

execute

public short execute()

finalize

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

getCheckBoxState

protected short getCheckBoxState(String sControlName)

getCheckBoxStateAsBoolean

protected boolean getCheckBoxStateAsBoolean(String sControlName)

getComboBoxText

protected String getComboBoxText(String sControlName)

getDialogLibraryName

public abstract 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 String getDialogName()
Return the name of the dialog within the library The subclass must override this to provide the name of the dialog

getFormattedFieldText

protected String getFormattedFieldText(String sControlName)

getImplementationId

public byte[] getImplementationId()

getImplementationName

public String getImplementationName()

getListBoxLineCount

protected short getListBoxLineCount(String sControlName)

getListBoxSelectedItem

protected short getListBoxSelectedItem(String sControlName)

getListBoxStringItemList

protected String[] getListBoxStringItemList(String sControlName)

getNumericFieldValue

protected int getNumericFieldValue(String sControlName)

getPropertyValue

protected Object getPropertyValue(XPropertySet xProps,
                                  String sName)

getPropertyValueAsBoolean

protected boolean getPropertyValueAsBoolean(XPropertySet xProps,
                                            String sName)

getPropertyValueAsInteger

protected int getPropertyValueAsInteger(XPropertySet xProps,
                                        String sName)

getPropertyValueAsShort

protected short getPropertyValueAsShort(XPropertySet xProps,
                                        String sName)

getPropertyValueAsString

protected String getPropertyValueAsString(XPropertySet xProps,
                                          String sName)

getServiceName

public String getServiceName()

getSupportedMethodNames

public String[] getSupportedMethodNames()

getSupportedServiceNames

public String[] getSupportedServiceNames()

getTextFieldText

protected String getTextFieldText(String sControlName)

getTypes

public Type[] getTypes()

initialize

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

setCheckBoxState

protected void setCheckBoxState(String sControlName,
                                short nState)

setCheckBoxStateAsBoolean

protected void setCheckBoxStateAsBoolean(String sControlName,
                                         boolean bChecked)

setComboBoxText

protected void setComboBoxText(String sControlName,
                               String sText)

setControlEnabled

protected void setControlEnabled(String sControlName,
                                 boolean bEnabled)

setFormattedFieldText

protected void setFormattedFieldText(String sControlName,
                                     String sText)

setListBoxLineCount

protected void setListBoxLineCount(String sControlName,
                                   short nLineCount)

setListBoxSelectedItem

protected void setListBoxSelectedItem(String sControlName,
                                      short nIndex)

setListBoxStringItemList

protected void setListBoxStringItemList(String sControlName,
                                        String[] items)

setNumericFieldValue

protected void setNumericFieldValue(String sControlName,
                                    int nValue)

setPropertyValue

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

setPropertyValue

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

setPropertyValue

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

setPropertyValue

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

setTextFieldText

protected void setTextFieldText(String sControlName,
                                String sText)

setTitle

public void setTitle(String sTitle)

supportsService

public boolean supportsService(String sServiceName)