Class PanelMatic

    • Constructor Detail

      • PanelMatic

        public PanelMatic()
    • Method Detail

      • setBuilderFactory

        public static void setBuilderFactory​(PanelBuilderFactory pbf)
        Sets the panel builder factory and creates a new builder pool.
        Parameters:
        pbf - The new builder factory. Cannot be null
        Throws:
        IllegalArgumentException - if pbf is null.
      • begin

        public static PanelBuilder begin​(PanelMaticComponentCustomizer... custsForCurrentBuild)
        Retrieves a builder (either pooled or new) and returns it. The returned builder is using its own panel as the top-level panel.
        Parameters:
        custsForCurrentBuild - Component customizers that are prepended to the normal component customizers, for this get only (until PanelBuilder.get(org.panelmatic.PanelPostProcessor[]) is called).
        Returns:
        A panel builder ready to get a new panel.
      • begin

        public static PanelBuilder begin​(JComponent basePanel,
                                         PanelMaticComponentCustomizer... custsForCurrentBuild)
        Retrieves a builder (either pooled or new) and returns it. The returned builder is using the passed panel as the top level panel.
        Parameters:
        basePanel - The panel the builder will start building from.
        custsForCurrentBuild - Component customizers that are prepended to the normal component customizers, for this get only (until PanelBuilder.get(org.panelmatic.PanelPostProcessor[]) is called).
        Returns:
        a builder ready to get a panel using basePanel as the top-level container.
      • setLocalizationBundle

        public static void setLocalizationBundle​(ResourceBundle aBundle)
        Sets the localization resource bundle for the builders. If aBundle is not null, the string parameter of PanelBuilder's various addXXX methods is interpreted as a key for a string in the passed bundle.

        If aBundle is null, that string parameter is displayed as-is.

        Note: PanelBuilders obtained before calling this method will not be affected.

        Parameters:
        aBundle - the localization resource bundle, may be null.
      • getLocalizationBundle

        public static ResourceBundle getLocalizationBundle()
      • setComponentOrientation

        public static void setComponentOrientation​(ComponentOrientation anOrientation)
        Sets the component orientation of the created panels.

        Note: PanelBuilders obtained before calling this method will not be affected.

        Parameters:
        anOrientation - the orientation of the built panels.