Package java.util

Examples of java.util.ResourceBundle$SingleFormatControl


         idBuf.append(n).append("_");
      idBuf.append(locale);
      String id = idBuf.toString();
      try
      {
         ResourceBundle res = cache_.get(id);
         if (res != null)
            return res;
         MapResourceBundle outputBundled = new MapResourceBundle(locale);
         for (int i = 0; i < name.length; i++)
         {
            ResourceBundle temp = getResourceBundle(name[i], locale, cl);
            if (temp != null)
            {
               outputBundled.merge(temp);
               continue;
            }
View Full Code Here


   public ResourceBundle getResourceBundle(String name)
   {
      ResourceBundleService service =
         (ResourceBundleService)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(
            ResourceBundleService.class);
      ResourceBundle res = service.getResourceBundle(name, locale_);
      return res;
   }
View Full Code Here

   public ResourceBundle getMergeResourceBundle(String[] names)
   {
      ResourceBundleService service =
         (ResourceBundleService)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(
            ResourceBundleService.class);
      ResourceBundle res = service.getResourceBundle(names, locale_);
      return res;
   }
View Full Code Here

  public void testLogWithResourceBundle() {
    SLF4JBridgeHandler.install();

    String resourceBundleName = "org.slf4j.bridge.testLogStrings";
    ResourceBundle bundle = ResourceBundle.getBundle(resourceBundleName);
    String resourceKey = "resource_key";
    String expectedMsg = bundle.getString(resourceKey);
    String msg = resourceKey;

    java.util.logging.Logger julResourceBundleLogger = java.util.logging.Logger
        .getLogger("yay", resourceBundleName);
View Full Code Here

  public void testLogWithResourceBundleWithParameters() {
    SLF4JBridgeHandler.install();

    String resourceBundleName = "org.slf4j.bridge.testLogStrings";
    ResourceBundle bundle = ResourceBundle.getBundle(resourceBundleName);

    java.util.logging.Logger julResourceBundleLogger = java.util.logging.Logger
        .getLogger("foo", resourceBundleName);

    String resourceKey1 = "resource_key_1";
    String expectedMsg1 = bundle.getString(resourceKey1);
    julResourceBundleLogger.info(resourceKey1); // 1st log

    String resourceKey2 = "resource_key_2";
    Object[] params2 = new Object[] { "foo", "bar" };
    String expectedMsg2 = MessageFormat.format(bundle.getString(resourceKey2),
        params2);
    julResourceBundleLogger.log(Level.INFO, resourceKey2, params2); // 2nd log

   
    String resourceKey3 = "invalidKey {0}";
View Full Code Here

  {

    defaultContext = new DefaultGuiContext(this, null);
    guiContext = defaultContext;

    final ResourceBundle resources = ResourceBundle.getBundle(SwingCommonModule.BUNDLE_NAME);
    cancelAction = new CancelAction(resources);
    confirmAction = new ConfirmAction(resources);

    formValidator = new ExportDialogValidator();
    setModal(true);
View Full Code Here

  public LibraryPanel(final List libraries)
  {

    setLayout(new BorderLayout());

    final ResourceBundle resources = ResourceBundle.getBundle(SwingPreviewModule.BUNDLE_NAME);

    final String[] names = new String[]{
        resources.getString("libraries-table.column.name"),
        resources.getString("libraries-table.column.version"),
        resources.getString("libraries-table.column.licence"),
        resources.getString("libraries-table.column.info")};
    final DefaultTableModel model = new DefaultTableModel(names, libraries.size());
    for (int i = 0; i < libraries.size(); i++)
    {
      final DependencyInformation depInfo = (DependencyInformation) libraries.get(i);
      model.setValueAt(depInfo.getName(), i, 0);
View Full Code Here

          tabText = String.valueOf(o);
        }
      }
      if (StringUtils.isEmpty(tabText))
      {
        final ResourceBundle bundle = ResourceBundle.getBundle
            ("org.pentaho.reporting.engine.classic.extensions.drilldown.messages");
        tabText = bundle.getString("UnnamedTab");
      }
    }

    final boolean tabActive;
    if (parameters.getParameterCount() == 3)
View Full Code Here

   *
   * @return a system properties table.
   */
  public static JTable createSystemPropertiesTable()
  {
    final ResourceBundle resources = ResourceBundle.getBundle(SwingPreviewModule.BUNDLE_NAME);

    final String[] names = new String[]{
        resources.getString("system-properties-table.column.name"),
        resources.getString("system-properties-table.column.value"),};

    final Properties sysProps = System.getProperties();

    final TreeMap data = new TreeMap(sysProps);
    final Map.Entry[] entries = (Map.Entry[]) data.entrySet().toArray(new Map.Entry[data.size()]);
View Full Code Here

    initialize();
  }

  private void initialize()
  {
    final ResourceBundle resources = ResourceBundle.getBundle(SwingCommonModule.BUNDLE_NAME);
    setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);

    addWindowListener(new WindowCloseHandler());

    cancelAction = new CancelAction(resources);
View Full Code Here

TOP

Related Classes of java.util.ResourceBundle$SingleFormatControl

Copyright © 2018 www.massapicom. 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.