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 Details

    • __serviceName

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

      public static 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:
    • 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

      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
    • 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 Object
    • getTypes

      public com.sun.star.uno.Type[] getTypes()
      Specified by:
      getTypes in interface com.sun.star.lang.XTypeProvider
    • getImplementationId

      public byte[] getImplementationId()
      Specified by:
      getImplementationId in interface com.sun.star.lang.XTypeProvider
    • getServiceName

      public String getServiceName()
      Specified by:
      getServiceName in interface com.sun.star.lang.XServiceName
    • supportsService

      public boolean supportsService(String sServiceName)
      Specified by:
      supportsService in interface com.sun.star.lang.XServiceInfo
    • getImplementationName

      public String getImplementationName()
      Specified by:
      getImplementationName in interface com.sun.star.lang.XServiceInfo
    • getSupportedServiceNames

      public String[] getSupportedServiceNames()
      Specified by:
      getSupportedServiceNames in interface com.sun.star.lang.XServiceInfo
    • setTitle

      public void setTitle(String sTitle)
      Specified by:
      setTitle in interface com.sun.star.ui.dialogs.XExecutableDialog
    • execute

      public short execute()
      Specified by:
      execute in interface com.sun.star.ui.dialogs.XExecutableDialog
    • callHandlerMethod

      public boolean callHandlerMethod(com.sun.star.awt.XDialog xDialog, Object event, String sMethod)
      Specified by:
      callHandlerMethod in interface com.sun.star.awt.XDialogEventHandler
    • getSupportedMethodNames

      public String[] getSupportedMethodNames()
      Specified by:
      getSupportedMethodNames in interface com.sun.star.awt.XDialogEventHandler
    • setControlEnabled

      protected void setControlEnabled(String sControlName, boolean bEnabled)
    • getCheckBoxState

      protected short getCheckBoxState(String sControlName)
    • getCheckBoxStateAsBoolean

      protected boolean getCheckBoxStateAsBoolean(String sControlName)
    • setCheckBoxState

      protected void setCheckBoxState(String sControlName, short nState)
    • setCheckBoxStateAsBoolean

      protected void setCheckBoxStateAsBoolean(String sControlName, boolean bChecked)
    • getListBoxStringItemList

      protected String[] getListBoxStringItemList(String sControlName)
    • setListBoxStringItemList

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

      protected short getListBoxSelectedItem(String sControlName)
    • setListBoxSelectedItem

      protected void setListBoxSelectedItem(String sControlName, short nIndex)
    • getListBoxLineCount

      protected short getListBoxLineCount(String sControlName)
    • setListBoxLineCount

      protected void setListBoxLineCount(String sControlName, short nLineCount)
    • getComboBoxText

      protected String getComboBoxText(String sControlName)
    • setComboBoxText

      protected void setComboBoxText(String sControlName, String sText)
    • getTextFieldText

      protected String getTextFieldText(String sControlName)
    • setTextFieldText

      protected void setTextFieldText(String sControlName, String sText)
    • getFormattedFieldText

      protected String getFormattedFieldText(String sControlName)
    • setFormattedFieldText

      protected void setFormattedFieldText(String sControlName, String sText)
    • getNumericFieldValue

      protected int getNumericFieldValue(String sControlName)
    • setNumericFieldValue

      protected void setNumericFieldValue(String sControlName, int nValue)
    • getPropertyValue

      protected Object getPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName)
    • setPropertyValue

      protected void setPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName, Object value)
    • getPropertyValueAsString

      protected String getPropertyValueAsString(com.sun.star.beans.XPropertySet xProps, String sName)
    • getPropertyValueAsInteger

      protected int getPropertyValueAsInteger(com.sun.star.beans.XPropertySet xProps, String sName)
    • setPropertyValue

      protected void setPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName, int nValue)
    • getPropertyValueAsShort

      protected short getPropertyValueAsShort(com.sun.star.beans.XPropertySet xProps, String sName)
    • setPropertyValue

      protected void setPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName, short nValue)
    • getPropertyValueAsBoolean

      protected boolean getPropertyValueAsBoolean(com.sun.star.beans.XPropertySet xProps, String sName)
    • setPropertyValue

      protected void setPropertyValue(com.sun.star.beans.XPropertySet xProps, String sName, boolean bValue)