Class ResourceFieldElementFactory

  • public class ResourceFieldElementFactory
    extends TextFieldElementFactory
    A factory to define ResourceFieldElements. ResourceField translate their content using a ResourceBundle instance.
    Thomas Morgner
    • Constructor Detail

      • ResourceFieldElementFactory

        public ResourceFieldElementFactory()
        Default Constructor.
    • Method Detail

      • getResourceBase

        public String getResourceBase()
        Returns the base name of the resource bundle used to translate the content later.
        the resource bundle name of the element.
      • setResourceBase

        public void setResourceBase​(String resourceBase)
        Defines the base name of the resource bundle used to translate the content later.
        resourceBase - the resource bundle name of the element.
      • createResourceElement

        public static Element createResourceElement​(String name,
                                                    Rectangle2D bounds,
                                                    Color color,
                                                    ElementAlignment alignment,
                                                    ElementAlignment valignment,
                                                    FontDefinition font,
                                                    String nullValue,
                                                    String resourceBase,
                                                    String field)
        Use a more fine-grained approach to define this element by using the element-factory directly.
        creates a ResourceElement. ResourceElements resolve their value using a java.util.ResourceBundle.
        name - the name of the element (null allowed)
        bounds - the element's bounds
        color - the text color of the element
        alignment - the element's horizontal text alignment
        valignment - the element's vertical text alignment
        font - the elements font
        nullValue - the text used when the value of this element is null
        field - the field in the datamodel to retrieve values from
        resourceBase - the classname/basename of the assigned resource bundle
        the created ResourceElement