Class ActionBuilderUtils


  • public class ActionBuilderUtils
    extends java.lang.Object
    Utility class for ActionBuilder related functions.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull java.lang.String format​(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key, @NotNull java.lang.Object... args)
      Returns the value of a key.
      static boolean getBoolean​(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key)
      Returns the value of a key as a boolean.
      static int getInt​(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key, int defaultValue)
      Returns the value of a key as an int.
      static @NotNull java.lang.String getString​(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key)
      Returns the value of a key.
      static @NotNull java.lang.String getString​(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key, @NotNull java.lang.String defaultValue)
      Returns the value of a key.
      static @NotNull javax.swing.JLabel newLabel​(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key)
      Creates a new JLabel from a resource key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getBoolean

        public static boolean getBoolean​(@NotNull
                                         @NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder,
                                         @NotNull
                                         @NotNull java.lang.String key)
        Returns the value of a key as a boolean.
        Parameters:
        actionBuilder - the action builder to query
        key - the key to query
        Returns:
        the value or false if the key does not exist or if the value is invalid
      • getInt

        public static int getInt​(@NotNull
                                 @NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder,
                                 @NotNull
                                 @NotNull java.lang.String key,
                                 int defaultValue)
        Returns the value of a key as an int.
        Parameters:
        actionBuilder - the action builder to query
        key - the key to query
        defaultValue - the default value if the key does not exist or if the value is invalid
        Returns:
        the value
      • getString

        @NotNull
        public static @NotNull java.lang.String getString​(@NotNull
                                                          @NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder,
                                                          @NotNull
                                                          @NotNull java.lang.String key,
                                                          @NotNull
                                                          @NotNull java.lang.String defaultValue)
        Returns the value of a key.
        Parameters:
        actionBuilder - the action builder to query
        key - the key to query
        defaultValue - the default value if the key does not exist
        Returns:
        the value
      • getString

        @NotNull
        public static @NotNull java.lang.String getString​(@NotNull
                                                          @NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder,
                                                          @NotNull
                                                          @NotNull java.lang.String key)
        Returns the value of a key.
        Parameters:
        actionBuilder - the action builder to query
        key - the key to query
        Returns:
        the value
        Throws:
        java.util.MissingResourceException - if the key does not exist
      • format

        @NotNull
        public static @NotNull java.lang.String format​(@NotNull
                                                       @NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder,
                                                       @NotNull
                                                       @NotNull java.lang.String key,
                                                       @NotNull
                                                       @NotNull java.lang.Object... args)
        Returns the value of a key.
        Parameters:
        actionBuilder - the action builder to query
        key - the key to query
        args - the arguments to replace in the format string
        Returns:
        the value
        Throws:
        java.util.MissingResourceException - if the key does not exist
      • newLabel

        @NotNull
        public static @NotNull javax.swing.JLabel newLabel​(@NotNull
                                                           @NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder,
                                                           @NotNull
                                                           @NotNull java.lang.String key)
        Creates a new JLabel from a resource key.
        Parameters:
        actionBuilder - the action builder to query
        key - the resource key
        Returns:
        the label
        Throws:
        java.util.MissingResourceException - if the key does not exist