Class Styler

    • Field Detail

      • log

        private static final java.util.logging.Logger log
    • Constructor Detail

      • Styler

        private Styler()
    • Method Detail

      • getSource

        public static StyleSource getSource()
        Returns global StyleSource.
        Returns:
        the global style source
      • setSource

        public static void setSource​(StyleSource source)
        Install global StyleSource.
        Parameters:
        source - the new global style source
      • resolver

        public static StyleResolver resolver​(java.lang.String group)
        Create a resolver for the given style-group.
        Parameters:
        group - the group
        Returns:
        the resolver
      • factory

        public static StyleFactory factory​(java.lang.String group)
        Create a factory for the given style-group.
        Parameters:
        group - the group
        Returns:
        the factory
      • bundle

        public static <T extends StyleBundle> T bundle​(java.lang.Class<T> type)
        Create a StyleBundle proxy.

        Target class must be annotated with StyleBundle.StyleGroup.

        Type Parameters:
        T - the interface to proxy
        Parameters:
        type - the interface to proxy
        Returns:
        the proxy
      • bundle

        public static <T extends StyleBundle> T bundle​(java.lang.String group,
                                                       java.lang.Class<T> type)
        Create a StyleBundle proxy with explicit style-group.
        Type Parameters:
        T - the interface to proxy
        Parameters:
        group - the group
        type - the interface to proxy
        Returns:
        the proxy