Class FormConfigImpl

    • Constructor Detail

      • FormConfigImpl

        public FormConfigImpl()
      • FormConfigImpl

        public FormConfigImpl​(java.lang.Object obj)
    • Method Detail

      • getFormItemNames

        public java.util.List<java.lang.String> getFormItemNames()
        Description copied from interface: FormConfig
        Returns a list of the names of all the FormItems in this FormConfig. Some names may refer to global FormItems.
        Specified by:
        getFormItemNames in interface FormConfig
      • getLocalFormItemNames

        public java.util.Iterator<java.lang.String> getLocalFormItemNames()
        Description copied from interface: FormConfig
        Returns an Iterator over names of FormItems defined in this FormConfig.
        Specified by:
        getLocalFormItemNames in interface FormConfig
      • getFormItem

        public FormItemConfig getFormItem​(java.lang.String name)
        Description copied from interface: FormConfig
        Get a FormItem defined by this FormConfig. May return null if the name is not defined in this FormConfig.
        Specified by:
        getFormItem in interface FormConfig
        Parameters:
        name - The name of the FormItem
      • newFormItem

        public FormItemConfig newFormItem​(java.lang.String name)
        Description copied from interface: FormConfig
        Create a new FormItem with the given name
        Specified by:
        newFormItem in interface FormConfig
        Parameters:
        name - The name of the FormItem
      • addSection

        public void addSection​(FormSection section)
        Description copied from interface: FormConfig
        Add a FormSection definition to this FormConfig
        Specified by:
        addSection in interface FormConfig
      • removeFormItem

        public void removeFormItem​(java.lang.String name)
        Description copied from interface: FormConfig
        Remove the FormItem with the given name
        Specified by:
        removeFormItem in interface FormConfig
        Parameters:
        name - The name of the FormItem
      • renameFormItem

        public void renameFormItem​(java.lang.String oldName,
                                   java.lang.String newName)
        Description copied from interface: FormConfig
        Rename a FormItem.
        Specified by:
        renameFormItem in interface FormConfig
        Parameters:
        oldName - The old name of the FormItem
        newName - The new name of the FormItem
      • getSectionNames

        public java.util.List<java.lang.String> getSectionNames()
        Description copied from interface: FormConfig
        Get a list of the names of all Sections used by this FormConfig, if defined. The names would typically be FormSection names. A FormSection also contains names, which could either be FormSection names of FormItem names. FormSection names would refer to FormSections in this FormConfig, but FormItem names may refer to global FormItems.
        Specified by:
        getSectionNames in interface FormConfig
      • getSection

        public FormSection getSection​(java.lang.String name)
        Description copied from interface: FormConfig
        Get the FormSection with the given name.
        Specified by:
        getSection in interface FormConfig
        Parameters:
        name - The name of the FormSection
      • getClone

        public java.lang.Object getClone()
                                  throws java.lang.Exception
        Return self clone
        Specified by:
        getClone in interface BaseConfiguration
        Overrides:
        getClone in class BaseConfigurationImpl
        Returns:
        a cloned version of this object.
        Throws:
        java.lang.Exception
      • getFormEventHandler

        public java.lang.String getFormEventHandler()
        Description copied from interface: FormConfig
        /** Get the script that handles events in this FormConfig. This script is executed at once when the Form is displayed. Could be null.
        Specified by:
        getFormEventHandler in interface FormConfig
      • getFormScript

        public java.lang.String getFormScript()
        Description copied from interface: FormConfig
        Get the script that will be executed every time a button is pressed. Much like getFormEventHandler(), but this can be executed 0 or more times. Could be null.
        Specified by:
        getFormScript in interface FormConfig
      • getTitle

        public java.lang.String getTitle()
        Description copied from interface: FormConfig
        Get the title of this FormConfig.
        Specified by:
        getTitle in interface FormConfig
      • getUIClass

        public java.lang.String getUIClass()
        Description copied from interface: FormConfig
        Get the name of a UI class that will be used to display the form. Most of the other parameters will be ignored. This could be null, indicating no UI class is defined.
        Specified by:
        getUIClass in interface FormConfig
      • getWidth

        public int getWidth​(int w)
        Description copied from interface: FormConfig
        Get the preferred width of this Form.
        Specified by:
        getWidth in interface FormConfig
        Parameters:
        w - Use this width if no width defined
      • getHeight

        public int getHeight​(int h)
        Description copied from interface: FormConfig
        Get the preferred height of this Form.
        Specified by:
        getHeight in interface FormConfig
        Parameters:
        h - Use this height if no height defined.
      • getUseHyperLabel

        public boolean getUseHyperLabel()
        Description copied from interface: FormConfig
        Return true if this FormConfig uses hyperlabels
        Specified by:
        getUseHyperLabel in interface FormConfig
      • getUseTabs

        public boolean getUseTabs()
        Description copied from interface: FormConfig
        Return true if this form uses tabs.
        Specified by:
        getUseTabs in interface FormConfig
      • getTabNames

        public java.util.List<java.lang.String> getTabNames()
        Description copied from interface: FormConfig
        Get names of tabs. These names refer to other FormConfig objects.
        Specified by:
        getTabNames in interface FormConfig
      • getTabTitle

        public java.lang.String getTabTitle​(java.lang.String name)
        Description copied from interface: FormConfig
        Get Title for one tab.
        Specified by:
        getTabTitle in interface FormConfig
        Parameters:
        name - Name of the tab
      • getTabToolTip

        public java.lang.String getTabToolTip​(java.lang.String name)
        Description copied from interface: FormConfig
        Get Tooltip for one tab.
        Specified by:
        getTabToolTip in interface FormConfig
        Parameters:
        name - Name of the tab
      • getTranslationFile

        public java.lang.String getTranslationFile()
        Description copied from interface: FormConfig
        Get the name of the translation file. For internal use, to translate labels and so on.
        Specified by:
        getTranslationFile in interface FormConfig
      • setTranslationFile

        public void setTranslationFile​(java.lang.String name)
        Description copied from interface: FormConfig
        Set the name of the translation file. For internal use with ResourceBundle.
        Specified by:
        setTranslationFile in interface FormConfig
      • translate

        public java.lang.String translate​(java.lang.String str)
        Description copied from interface: FormConfig
        Translate a String.
        Specified by:
        translate in interface FormConfig
        Parameters:
        str - The string to be translated
        Returns:
        The translated String, or the original String if no translation was found.
      • getTranslationClassLoader

        public java.lang.ClassLoader getTranslationClassLoader()
        Specified by:
        getTranslationClassLoader in interface FormConfig
        Returns:
        the ClassLoader used to resolve the translation file as a resource. If not specified null is returned.
      • setTranslationClassLoader

        public void setTranslationClassLoader​(java.lang.ClassLoader ldr)
        Description copied from interface: FormConfig
        Sets the preferred ClassLoader able to resolve the translation file as a resource.
        Specified by:
        setTranslationClassLoader in interface FormConfig
      • setTranslationLocale

        public void setTranslationLocale​(java.lang.String locale)
        Sets the preferred Locale to use when translating strings
        Specified by:
        setTranslationLocale in interface FormConfig
      • getTranslationLocale

        public java.lang.String getTranslationLocale()
        Returns Locale identifier (ISO lang code) to use when translating resources.
        Specified by:
        getTranslationLocale in interface FormConfig
      • getValidators

        public java.util.List<ValidatorConfig> getValidators()
        Return list of all available validators in the configuration. In case of missing validators an empty list is returned.
        Specified by:
        getValidators in interface FormConfig
        Returns:
        list of validators configuration.