/******************************************************************************************************************* * * ******************************************************************************************************************/ @CheckForNull public String svgIconResource() { try { String s = NbBundle.getMessage(getClass(), "ICON_" + name).trim(); return (s.indexOf(".svg") < 0) ? null : s; } catch (MissingResourceException e) { putValue("noIconInMenu", Boolean.TRUE); return super.iconResource(); } }
/******************************************************************************************************************* * * <code>GenericCookieAction</code> provides a convenient default implementation of <code>iconResource()</code>. If * the resource name for your action is just <code>ICON_</code><i>action_name</i>, you needn't to override this method. * * @return the name of this action * ******************************************************************************************************************/ @Override @CheckForNull protected String iconResource() { try { String s = NbBundle.getMessage(getClass(), "ICON_" + name).trim(); return (s.indexOf(".svg") >= 0) ? null : s; } catch (MissingResourceException e) { putValue("noIconInMenu", Boolean.TRUE); return super.iconResource(); } }