/** * Get a localized and/or branded file with the default class loader. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @param locale locale of file * @return URL of matching localized file * @throws MissingResourceException if not found * @deprecated Use the <code>nbresloc</code> URL protocol instead. This method does a poor * job of handling resources such as <samp>/some.dir/res.txt</samp> or * <samp>/some/res.txt.sample</samp>. */ @Deprecated public static synchronized URL getLocalizedFile(String baseName, String ext, Locale locale) throws MissingResourceException { return getLocalizedFile(baseName, ext, locale, getLoader()); }
/** * Get a localized and/or branded file in the default locale with the default class loader. * <p>Note that use of this call is similar to using the URL protocol <code>nbresloc</code> * (which may in fact be implemented using the fuller form of the method). * <p>The extension may be null, in which case no final dot will be appended. * If it is the empty string, the resource will end in a dot. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @return URL of matching localized file * @throws MissingResourceException if not found * @deprecated Use the <code>nbresloc</code> URL protocol instead. This method does a poor * job of handling resources such as <samp>/some.dir/res.txt</samp> or * <samp>/some/res.txt.sample</samp>. */ @Deprecated public static synchronized URL getLocalizedFile(String baseName, String ext) throws MissingResourceException { return getLocalizedFile(baseName, ext, Locale.getDefault(), getLoader()); }
/** Get a localized file with the default class loader. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @param locale locale of file * @return URL of matching localized file * @throws MissingResourceException if not found */ public static synchronized URL getLocalizedFile(String baseName, String ext, Locale locale) throws MissingResourceException { return getLocalizedFile(baseName, ext, locale, getLoader()); }
/** Get a localized file with the default class loader. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @param locale locale of file * @return URL of matching localized file * @throws MissingResourceException if not found */ public static synchronized URL getLocalizedFile(String baseName, String ext, Locale locale) throws MissingResourceException { return getLocalizedFile(baseName, ext, locale, getLoader()); }
/** Get a localized file in the default locale with the default class loader. * <p>Note that use of this call is similar to using the URL protocol <code>nbresloc</code> * (which is in fact implemented using the fuller form of the method). * <p>The extension may be null, in which case no final dot will be appended. * If it is the empty string, the resource will end in a dot. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @return URL of matching localized file * @throws MissingResourceException if not found */ public static synchronized URL getLocalizedFile(String baseName, String ext) throws MissingResourceException { return getLocalizedFile(baseName, ext, Locale.getDefault(), getLoader()); }
private static Image getDefaultImage() { Image img = null; if (defaultImage != null) img = (Image)defaultImage.get(); if (img == null) { java.net.URL url = NbBundle.getLocalizedFile( "org.openide.resources.defaultWizard", // NOI18N "gif" // NOI18N ); img = url == null ? null : java.awt.Toolkit.getDefaultToolkit().getImage(url); if (img != null) defaultImage = new WeakReference(img); } return img; }
/** Get a localized file in the default locale with the default class loader. * <p>Note that use of this call is similar to using the URL protocol <code>nbresloc</code> * (which is in fact implemented using the fuller form of the method). * <p>The extension may be null, in which case no final dot will be appended. * If it is the empty string, the resource will end in a dot. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @return URL of matching localized file * @throws MissingResourceException if not found */ public static synchronized URL getLocalizedFile(String baseName, String ext) throws MissingResourceException { return getLocalizedFile(baseName, ext, Locale.getDefault(), getLoader()); }
private static Image getDefaultImage() { Image img = null; if (defaultImage != null) img = (Image)defaultImage.get(); if (img == null) { java.net.URL url = NbBundle.getLocalizedFile( "org.openide.resources.defaultWizard", // NOI18N "gif" // NOI18N ); img = url == null ? null : java.awt.Toolkit.getDefaultToolkit().getImage(url); if (img != null) defaultImage = new WeakReference(img); } return img; }
/** * Get a localized and/or branded file with the default class loader. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @param locale locale of file * @return URL of matching localized file * @throws MissingResourceException if not found * @deprecated Use the <code>nbresloc</code> URL protocol instead. This method does a poor * job of handling resources such as <samp>/some.dir/res.txt</samp> or * <samp>/some/res.txt.sample</samp>. */ @Deprecated public static synchronized URL getLocalizedFile(String baseName, String ext, Locale locale) throws MissingResourceException { return getLocalizedFile(baseName, ext, locale, getLoader()); }
/** * Get a localized and/or branded file with the default class loader. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @param locale locale of file * @return URL of matching localized file * @throws MissingResourceException if not found * @deprecated Use the <code>nbresloc</code> URL protocol instead. This method does a poor * job of handling resources such as <samp>/some.dir/res.txt</samp> or * <samp>/some/res.txt.sample</samp>. */ @Deprecated public static synchronized URL getLocalizedFile(String baseName, String ext, Locale locale) throws MissingResourceException { return getLocalizedFile(baseName, ext, locale, getLoader()); }
/** * Get a localized and/or branded file in the default locale with the default class loader. * <p>Note that use of this call is similar to using the URL protocol <code>nbresloc</code> * (which may in fact be implemented using the fuller form of the method). * <p>The extension may be null, in which case no final dot will be appended. * If it is the empty string, the resource will end in a dot. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @return URL of matching localized file * @throws MissingResourceException if not found * @deprecated Use the <code>nbresloc</code> URL protocol instead. This method does a poor * job of handling resources such as <samp>/some.dir/res.txt</samp> or * <samp>/some/res.txt.sample</samp>. */ @Deprecated public static synchronized URL getLocalizedFile(String baseName, String ext) throws MissingResourceException { return getLocalizedFile(baseName, ext, Locale.getDefault(), getLoader()); }
/** * Get a localized and/or branded file in the default locale with the default class loader. * <p>Note that use of this call is similar to using the URL protocol <code>nbresloc</code> * (which may in fact be implemented using the fuller form of the method). * <p>The extension may be null, in which case no final dot will be appended. * If it is the empty string, the resource will end in a dot. * @param baseName base name of file, as dot-separated path (e.g. <code>some.dir.File</code>) * @param ext extension of file (or <code>null</code>) * @return URL of matching localized file * @throws MissingResourceException if not found * @deprecated Use the <code>nbresloc</code> URL protocol instead. This method does a poor * job of handling resources such as <samp>/some.dir/res.txt</samp> or * <samp>/some/res.txt.sample</samp>. */ @Deprecated public static synchronized URL getLocalizedFile(String baseName, String ext) throws MissingResourceException { return getLocalizedFile(baseName, ext, Locale.getDefault(), getLoader()); }