/*
 * Copyright 1999-2000 by Oracle Corporation,
 * 500 Oracle Parkway, Redwood Shores, California, 94065, U.S.A.
 * All rights reserved.
 * 
 * This software is the confidential and proprietary information
 * of Oracle Corporation. 
 * 
 * 
 *                    ***** PLEASE NOTE ***** 
 * 
 * This file is AUTO-GENERATED and any changes to this file will
 * be LOST.
 * 
 */ 
package oracle.jdeveloper.html;

import java.util.ResourceBundle;

import java.awt.event.KeyEvent;
import java.awt.Event;

import java.text.MessageFormat;

import javax.swing.KeyStroke;
import javax.swing.Icon;

import oracle.ide.util.ArrayResourceBundle;
import oracle.ide.util.ResourceManager;


public class Res extends ArrayResourceBundle 
{
  // Compatability with JDeveloper 4.XX and lower
  private static final String nullString = "(null)";


  private static final ArrayResourceBundle resources = 
(ArrayResourceBundle) ResourceBundle.getBundle(Res.class.getName());


  /**
   * Gets the object associated with the specified resource id.
   * By convention all LRB's should implement a getObj static method
   * similar to the one below.
   */
  public static Object getObj(int key) {
    return ResourceManager.getObj(resources, key);
  }


  /**
   * Gets the string associated with the specified resource id.
   * By convention all LRB's should implement a getStr static method
   * similar to the one below.
   * @deprecated - replace with getString
   * @see #getString
   */
  public static String getStr(int key) {
    return ResourceManager.getStr(resources, key);
  }


  /**
   * Gets the string associated with the specified resource id.
   * By convention all LRB's should implement a getStr static method
   * similar to the one below. (Same as getStr)
   */
  public static String getString(int key) {
    return ResourceManager.getStr(resources, key);
  }


  /**
   * Gets the character associated with the specified resource id.
   * By convention all LRB's should implement a getChar static method
   * similar to the one below.
   */
  public static char getChar(int key) {
    return ResourceManager.getChar(resources, key);
  }


  public static Integer getInteger(int key) {
    return ResourceManager.getInteger(resources, key);
  }


  public static char getMnemonic(int key) {
    return ResourceManager.getMnemonic(resources, key);
  }


  public static KeyStroke getAccelerator(int key) {
    return ResourceManager.getAccelerator(resources, key);
  }


  public static Icon getIcon(int key) {
    return ResourceManager.getIcon(resources, key);
  }

  static String format(int index, Object[] params)
  {
    for (int i=0; i<params.length; i++)
    {
      if (params[i]==null)
        params[i] = nullString;
    }
    String result =  MessageFormat.format(getStr(index), params);
    for (int i=0; i<params.length; i++)
    {
      if  (params[i] == nullString)
        params[i]=null;
    }
    return result;
  }
  public static String format(int index, Object param1)
  {
    return MessageFormat.format(getStr(index),
      new Object[] { param1==null?nullString:param1 });
  }
  public static String format(int index, Object param1, Object param2)
  {
    return MessageFormat.format(getStr(index),
      new Object[] { param1==null?nullString:param1,
                     param2==null?nullString:param2 });
  }
  public static String format(int index, Object param1, Object param2, Object param3)
  {
    return MessageFormat.format(getStr(index),
      new Object[] { param1==null?nullString:param1,
                     param2==null?nullString:param2,
                     param3==null?nullString:param3 });
  }

  /** Gets the localizable objects */
  protected Object[] getContents() {
    return contents;
  }


  /** Identifies keys to access localizable object */
  public static final int PROPT_NONE = 0;
  public static final int DHTML_INVALID_NAME_ERROR = 1;


  /** Array containing localizable objects */
  private static final Object[] contents =
  {
      "None",  // PROPT_NONE
      "DHTML: Invalid character in object name: \"{0}\".",  // DHTML_INVALID_NAME_ERROR
  };
}
