Class I15dPanelBuilder

  • Direct Known Subclasses:
    DefaultFormBuilder

    public class I15dPanelBuilder
    extends AbstractI15dPanelBuilder
    A general purpose panel builder that uses the FormLayout to lay out JPanels. In addition to its superclass PanelBuilder this class provides convenience behavior to map resource keys to their associated internationalized (i15d) strings when adding labels, titles and titled separators.

    The localized texts used in methods #addI15dLabel and #addI15dTitle can contain an optional mnemonic marker. The mnemonic and mnemonic index are indicated by a single ampersand (&). For example "&Save", or "Save &as". To use the ampersand itself, duplicate it, for example "Look&&Feel".

    Since:
    1.0.3
    Version:
    $Revision: 1.8 $
    Author:
    Karsten Lentzsch
    See Also:
    ResourceBundle
    • Constructor Detail

      • I15dPanelBuilder

        public I15dPanelBuilder​(FormLayout layout,
                                java.util.ResourceBundle bundle)
        Constructs an I15dPanelBuilder for the given layout and resource bundle. Uses an instance of JPanel as layout container.
        Parameters:
        layout - the FormLayout used to layout the container
        bundle - the ResourceBundle used to lookup i15d strings
      • I15dPanelBuilder

        public I15dPanelBuilder​(FormLayout layout,
                                java.util.ResourceBundle bundle,
                                javax.swing.JPanel panel)
        Constructs an I15dPanelBuilder for the given FormLayout, resource bundle, and layout container.
        Parameters:
        layout - the FormLayout used to layout the container
        bundle - the ResourceBundle used to lookup i15d strings
        panel - the layout container
    • Method Detail

      • getI15dString

        protected java.lang.String getI15dString​(java.lang.String resourceKey)
        Looks up and returns the internationalized (i15d) string for the given resource key from the ResourceBundle.
        Specified by:
        getI15dString in class AbstractI15dPanelBuilder
        Parameters:
        resourceKey - the key to look for in the resource bundle
        Returns:
        the associated internationalized string, or the resource key itself in case of a missing resource
        Throws:
        java.lang.IllegalStateException - if no ResourceBundle has been set