org.openoffice.da.comp.w2lcommon.helper

Class DialogBase

public abstract class DialogBase extends 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 shortCHECKBOX_CHECKED
protected static shortCHECKBOX_DONT_KNOW
protected static shortCHECKBOX_NOT_CHECKED
protected XComponentContextxContext
static String__implementationName
The component should also have an implementation name.
static String__serviceName
The component will be registered under this name.
Constructor Summary
DialogBase(XComponentContext xContext)
Create a new OptionsDialogBase
Method Summary
booleancallHandlerMethod(XDialog xDialog, Object event, String sMethod)
shortexecute()
protected abstract voidfinalize()
Finalize the dialog after execution (eg. save settings to the registry) The subclass must implement this
protected shortgetCheckBoxState(String sControlName)
protected booleangetCheckBoxStateAsBoolean(String sControlName)
protected StringgetComboBoxText(String sControlName)
abstract StringgetDialogLibraryName()
Return the name of the library containing the dialog The subclass must override this to provide the name of the library
abstract StringgetDialogName()
Return the name of the dialog within the library The subclass must override this to provide the name of the dialog
protected StringgetFormattedFieldText(String sControlName)
byte[]getImplementationId()
StringgetImplementationName()
protected shortgetListBoxLineCount(String sControlName)
protected shortgetListBoxSelectedItem(String sControlName)
protected String[]getListBoxStringItemList(String sControlName)
protected intgetNumericFieldValue(String sControlName)
protected ObjectgetPropertyValue(XPropertySet xProps, String sName)
protected booleangetPropertyValueAsBoolean(XPropertySet xProps, String sName)
protected intgetPropertyValueAsInteger(XPropertySet xProps, String sName)
protected shortgetPropertyValueAsShort(XPropertySet xProps, String sName)
protected StringgetPropertyValueAsString(XPropertySet xProps, String sName)
StringgetServiceName()
String[]getSupportedMethodNames()
String[]getSupportedServiceNames()
protected StringgetTextFieldText(String sControlName)
Type[]getTypes()
protected abstract voidinitialize()
Initialize the dialog (eg. with settings from the registry) The subclass must implement this
protected voidsetCheckBoxState(String sControlName, short nState)
protected voidsetCheckBoxStateAsBoolean(String sControlName, boolean bChecked)
protected voidsetComboBoxText(String sControlName, String sText)
protected voidsetControlEnabled(String sControlName, boolean bEnabled)
protected voidsetFormattedFieldText(String sControlName, String sText)
protected voidsetListBoxLineCount(String sControlName, short nLineCount)
protected voidsetListBoxSelectedItem(String sControlName, short nIndex)
protected voidsetListBoxStringItemList(String sControlName, String[] items)
protected voidsetNumericFieldValue(String sControlName, int nValue)
protected voidsetPropertyValue(XPropertySet xProps, String sName, Object value)
protected voidsetPropertyValue(XPropertySet xProps, String sName, int nValue)
protected voidsetPropertyValue(XPropertySet xProps, String sName, short nValue)
protected voidsetPropertyValue(XPropertySet xProps, String sName, boolean bValue)
protected voidsetTextFieldText(String sControlName, String sText)
voidsetTitle(String sTitle)
booleansupportsService(String sServiceName)

Field Detail

CHECKBOX_CHECKED

protected static final short CHECKBOX_CHECKED

CHECKBOX_DONT_KNOW

protected static final short CHECKBOX_DONT_KNOW

CHECKBOX_NOT_CHECKED

protected static final short CHECKBOX_NOT_CHECKED

xContext

protected XComponentContext xContext

__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

Constructor Detail

DialogBase

public DialogBase(XComponentContext xContext)
Create a new OptionsDialogBase

Method Detail

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, int nValue)

setPropertyValue

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

setPropertyValue

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

setTextFieldText

protected void setTextFieldText(String sControlName, String sText)

setTitle

public void setTitle(String sTitle)

supportsService

public boolean supportsService(String sServiceName)