Package java.util

Examples of java.util.ResourceBundle.containsKey()


        return Application.getInstance().getContext().getBundle().getString(key);
    }

    private static String getOptionalString(String key) {
        ResourceBundle bundle = Application.getInstance().getContext().getBundle();
        return bundle.containsKey(key) ? bundle.getString(key) : null;
    }

    public static JMenu createMenu(String name) {
        JMenu menu = new JMenu(getString(name + "-menu"));
        menu.setName(name);
View Full Code Here


    public void localizeAbstractButton(String bundleBaseName, String componentName, AbstractButton component) {
        ResourceBundle resourceBundle = getResourceBundle(bundleBaseName);

        localizeComponent(bundleBaseName, componentName, component);

        if (resourceBundle.containsKey(componentName + TEXT)) {
            component.setText(resourceBundle.getString(componentName + TEXT));
        }

        if (resourceBundle.containsKey(componentName + MNEMONIC)) {
            component.setMnemonic(parseMnemonic(resourceBundle.getString(componentName + MNEMONIC)));
View Full Code Here

        if (resourceBundle.containsKey(componentName + TEXT)) {
            component.setText(resourceBundle.getString(componentName + TEXT));
        }

        if (resourceBundle.containsKey(componentName + MNEMONIC)) {
            component.setMnemonic(parseMnemonic(resourceBundle.getString(componentName + MNEMONIC)));
        }
    }

    /**
 
View Full Code Here

     * @param component localized component
     */
    public void localizeComponent(String bundleBaseName, String componentName, JComponent component) {
        ResourceBundle resourceBundle = getResourceBundle(bundleBaseName);

        if (resourceBundle.containsKey(componentName + TOOL_TIP_TEXT)) {
            component.setToolTipText(resourceBundle.getString(componentName + TOOL_TIP_TEXT));
        }
    }

    /**
 
View Full Code Here

    public void localizeMenuItem(String bundleBaseName, String componentName, JMenuItem component) {
        ResourceBundle resourceBundle = getResourceBundle(bundleBaseName);

        localizeAbstractButton(bundleBaseName, componentName, component);

        if (resourceBundle.containsKey(componentName + ACCELERATOR)) {
            component.setAccelerator(parseAccelerator(resourceBundle.getString(componentName + ACCELERATOR)));
        }
    }

    /**
 
View Full Code Here

    this.managedTypes = new TypeRegistry();

    try {
      log.info("starting errai cdi ...");
      ResourceBundle erraiServiceConfig = getBundle("ErraiService");
      if (erraiServiceConfig.containsKey(ERRAI_CDI_STANDALONE)) {
        boolean standalone = "true".equals(erraiServiceConfig.getString(ERRAI_CDI_STANDALONE).trim());

        if (standalone) {
          log.info("errai cdi running in standalone mode.");
        }
View Full Code Here

          log.info("errai cdi running as regular extension.");
        }
      }

      final String dispatchImplKey = "errai.dispatcher_implementation";
      if (erraiServiceConfig.containsKey(dispatchImplKey)) {
        if (AsyncDispatcher.class.getName().equals(erraiServiceConfig.getString(dispatchImplKey))) {
          throw new ErraiBootstrapFailure("Cannot start Errai CDI. You have have configured the service to use the " +
                  AsyncDispatcher.class.getName() + " dispatcher implementation. Due to limitations of Weld, you must use the " +
                  SimpleDispatcher.class.getName() + " in order to use this module.");
        }
View Full Code Here

    catch (MissingResourceException e) {
      // ErraiService is optional!
      return;
    }

    if (erraiServiceConfig.containsKey(ERRAI_CDI_STANDALONE)) {
      boolean standalone = "true".equals(erraiServiceConfig.getString(ERRAI_CDI_STANDALONE).trim());

      if (standalone) {
        log.info("errai cdi running in standalone mode.");
      }
View Full Code Here

        log.info("errai cdi running as regular extension.");
      }
    }

    final String dispatchImplKey = "errai.dispatcher_implementation";
    if (erraiServiceConfig.containsKey(dispatchImplKey)) {
      if (AsyncDispatcher.class.getName().equals(erraiServiceConfig.getString(dispatchImplKey))) {
        throw new ErraiBootstrapFailure("Cannot start Errai CDI. You have have configured the service to use the " +
                AsyncDispatcher.class.getName()
                + " dispatcher implementation. Due to limitations of Weld, you must use the " +
                SimpleDispatcher.class.getName() + " in order to use this module.");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.