/** Connects buttons to action. If the action supplies value for "iconBase" * key from getValue(String) with a path to icons the methods setIcon, * setPressedIcon, setDisabledIcon and setRolloverIcon will be called on the * button with loaded icons using the iconBase. E.g. if the value for "iconBase" * will be "com/mycompany/myIcon.gif" following images will be tried "com/mycompany/myIcon.gif" * for setIcon, "com/mycompany/myIcon_pressed.gif" for setPressedIcon, * "com/mycompany/myIcon_disabled.gif" for setDisabledIcon and * "com/mycompany/myIcon_rollover.gif" for setRolloverIcon. SystemAction has * special support for iconBase - please check {@link SystemAction#iconResource} * for more details. * @param button the button * @param action the action * @since 3.29 */ public static void connect (AbstractButton button, Action action) { Bridge b = new ButtonBridge (button, action); b.updateState (null); }
/** Connects buttons to action. If the action supplies value for "iconBase" * key from getValue(String) with a path to icons the methods setIcon, * setPressedIcon, setDisabledIcon and setRolloverIcon will be called on the * button with loaded icons using the iconBase. E.g. if the value for "iconBase" * will be "com/mycompany/myIcon.gif" following images will be tried "com/mycompany/myIcon.gif" * for setIcon, "com/mycompany/myIcon_pressed.gif" for setPressedIcon, * "com/mycompany/myIcon_disabled.gif" for setDisabledIcon and * "com/mycompany/myIcon_rollover.gif" for setRolloverIcon. SystemAction has * special support for iconBase - please check {@link SystemAction#iconResource} * for more details. * @param button the button * @param action the action * @since 3.29 */ public static void connect (AbstractButton button, Action action) { Bridge b = new ButtonBridge (button, action); b.updateState (null); }
Bridge b = new ButtonBridge(button, action); b.prepare();