Class DialogBase
java.lang.Object
org.openoffice.da.comp.w2lcommon.helper.DialogBase
- All Implemented Interfaces:
com.sun.star.awt.XDialogEventHandler,com.sun.star.lang.XServiceInfo,com.sun.star.lang.XServiceName,com.sun.star.lang.XTypeProvider,com.sun.star.ui.dialogs.XExecutableDialog,com.sun.star.uno.XInterface
- Direct Known Subclasses:
OptionsDialogBase
public abstract class DialogBase
extends Object
implements com.sun.star.lang.XTypeProvider, com.sun.star.lang.XServiceInfo, com.sun.star.lang.XServiceName, com.sun.star.ui.dialogs.XExecutableDialog, com.sun.star.awt.XDialogEventHandler
This class provides an abstract uno component which implements a dialog
from an xml description (using the DialogProvider2 service)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringThe component should also have an implementation name.static StringThe component will be registered under this name.protected static final shortprotected static final shortprotected static final shortprotected com.sun.star.uno.XComponentContextFields inherited from interface com.sun.star.awt.XDialogEventHandler
UNOTYPEINFOFields inherited from interface com.sun.star.ui.dialogs.XExecutableDialog
UNOTYPEINFOFields inherited from interface com.sun.star.lang.XServiceInfo
UNOTYPEINFOFields inherited from interface com.sun.star.lang.XServiceName
UNOTYPEINFOFields inherited from interface com.sun.star.lang.XTypeProvider
UNOTYPEINFO -
Constructor Summary
ConstructorsConstructorDescriptionDialogBase(com.sun.star.uno.XComponentContext xContext) Create a new OptionsDialogBase -
Method Summary
Modifier and TypeMethodDescriptionbooleancallHandlerMethod(com.sun.star.awt.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 thisprotected shortgetCheckBoxState(String sControlName) protected booleangetCheckBoxStateAsBoolean(String sControlName) protected StringgetComboBoxText(String sControlName) abstract StringReturn the name of the library containing the dialog The subclass must override this to provide the name of the libraryabstract StringReturn the name of the dialog within the library The subclass must override this to provide the name of the dialogprotected StringgetFormattedFieldText(String sControlName) byte[]protected shortgetListBoxLineCount(String sControlName) protected shortgetListBoxSelectedItem(String sControlName) protected String[]getListBoxStringItemList(String sControlName) protected intgetNumericFieldValue(String sControlName) protected ObjectgetPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName) protected booleangetPropertyValueAsBoolean(com.sun.star.beans.XPropertySet xProps, String sName) protected intgetPropertyValueAsInteger(com.sun.star.beans.XPropertySet xProps, String sName) protected shortgetPropertyValueAsShort(com.sun.star.beans.XPropertySet xProps, String sName) protected StringgetPropertyValueAsString(com.sun.star.beans.XPropertySet xProps, String sName) String[]String[]protected StringgetTextFieldText(String sControlName) com.sun.star.uno.Type[]getTypes()protected abstract voidInitialize the dialog (eg. with settings from the registry) The subclass must implement thisprotected 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(com.sun.star.beans.XPropertySet xProps, String sName, boolean bValue) protected voidsetPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName, int nValue) protected voidsetPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName, short nValue) protected voidsetPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName, Object value) protected voidsetTextFieldText(String sControlName, String sText) voidbooleansupportsService(String sServiceName)
-
Field Details
-
__serviceName
The component will be registered under this name. The subclass must override this with a suitable name -
__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:
-
CHECKBOX_CHECKED
protected static final short CHECKBOX_CHECKED- See Also:
-
CHECKBOX_DONT_KNOW
protected static final short CHECKBOX_DONT_KNOW- See Also:
-
xContext
protected com.sun.star.uno.XComponentContext xContext
-
-
Constructor Details
-
DialogBase
public DialogBase(com.sun.star.uno.XComponentContext xContext) Create a new OptionsDialogBase
-
-
Method Details
-
getDialogLibraryName
Return the name of the library containing the dialog The subclass must override this to provide the name of the library -
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 -
getTypes
public com.sun.star.uno.Type[] getTypes()- Specified by:
getTypesin interfacecom.sun.star.lang.XTypeProvider
-
getImplementationId
public byte[] getImplementationId()- Specified by:
getImplementationIdin interfacecom.sun.star.lang.XTypeProvider
-
getServiceName
- Specified by:
getServiceNamein interfacecom.sun.star.lang.XServiceName
-
supportsService
- Specified by:
supportsServicein interfacecom.sun.star.lang.XServiceInfo
-
getImplementationName
- Specified by:
getImplementationNamein interfacecom.sun.star.lang.XServiceInfo
-
getSupportedServiceNames
- Specified by:
getSupportedServiceNamesin interfacecom.sun.star.lang.XServiceInfo
-
setTitle
- Specified by:
setTitlein interfacecom.sun.star.ui.dialogs.XExecutableDialog
-
execute
public short execute()- Specified by:
executein interfacecom.sun.star.ui.dialogs.XExecutableDialog
-
callHandlerMethod
- Specified by:
callHandlerMethodin interfacecom.sun.star.awt.XDialogEventHandler
-
getSupportedMethodNames
- Specified by:
getSupportedMethodNamesin interfacecom.sun.star.awt.XDialogEventHandler
-
setControlEnabled
-
getCheckBoxState
-
getCheckBoxStateAsBoolean
-
setCheckBoxState
-
setCheckBoxStateAsBoolean
-
getListBoxStringItemList
-
setListBoxStringItemList
-
getListBoxSelectedItem
-
setListBoxSelectedItem
-
getListBoxLineCount
-
setListBoxLineCount
-
getComboBoxText
-
setComboBoxText
-
getTextFieldText
-
setTextFieldText
-
getFormattedFieldText
-
setFormattedFieldText
-
getNumericFieldValue
-
setNumericFieldValue
-
getPropertyValue
-
setPropertyValue
-
getPropertyValueAsString
-
getPropertyValueAsInteger
-
setPropertyValue
-
getPropertyValueAsShort
-
setPropertyValue
-
getPropertyValueAsBoolean
-
setPropertyValue
protected void setPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName, boolean bValue)
-