/*
 * 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.jbo.html.jsp;

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 MSG_APP_PATH_MISSING = 0;
  public static final int MSG_HOSTNAME_MISSING = 1;
  public static final int MSG_UNKNOWN_CONNECT_TYPE = 2;
  public static final int MSG_DAD_MISSING = 3;


  /** Array containing localizable objects */
  private static final Object[] contents =
  {
      "Please provide a value for the \'ApplicationPath\' path property in your JSP property file",  // MSG_APP_PATH_MISSING
      "Please provide a value for the \'HostName\' property in your JSP property file",  // MSG_HOSTNAME_MISSING
      "Connection Type is not known. Please make sure it\'s one of the following:",  // MSG_UNKNOWN_CONNECT_TYPE
      "Please provide a value for the \'DatabaseAccessDescriptor\' property in your JSP property file",  // MSG_DAD_MISSING
  };
}
