Package net.sf.gridarta.utils
Class ActionBuilderUtils
- java.lang.Object
-
- net.sf.gridarta.utils.ActionBuilderUtils
-
public class ActionBuilderUtils extends java.lang.ObjectUtility class forActionBuilderrelated functions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull java.lang.Stringformat(@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 booleangetBoolean(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key)Returns the value of a key as aboolean.static intgetInt(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key, int defaultValue)Returns the value of a key as anint.static @NotNull java.lang.StringgetString(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key)Returns the value of a key.static @NotNull java.lang.StringgetString(@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.JLabelnewLabel(@NotNull net.sf.japi.swing.action.ActionBuilder actionBuilder, @NotNull java.lang.String key)Creates a newJLabelfrom a resource key.
-
-
-
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 aboolean.- Parameters:
actionBuilder- the action builder to querykey- the key to query- Returns:
- the value or
falseif 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 anint.- Parameters:
actionBuilder- the action builder to querykey- the key to querydefaultValue- 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 querykey- the key to querydefaultValue- 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 querykey- 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 querykey- the key to queryargs- 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 newJLabelfrom a resource key.- Parameters:
actionBuilder- the action builder to querykey- the resource key- Returns:
- the label
- Throws:
java.util.MissingResourceException- if the key does not exist
-
-