package izyndoc;

import com.jacob.com.*;

/**
 * <p>Title: ExcelRange</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: </p>
 * @author Richard Norton
 * @version 1.0
 */

public class ExcelRange extends com.jacob.com.Dispatch
{
  /**
   * Constructor.
   */
  public ExcelRange()
  {
    super("Excel.Range");
  }

  /**
   * Alternative constructor to be used if you need to return a Range
   * object from another object's method call.
   *
   * @param dispatchRange Dispatch
   */
  public ExcelRange(Dispatch dispatchRange)
  {
    //TAKE OVER THE IDispatch POINTER
    this.m_pDispatch = dispatchRange.m_pDispatch;
    //NULL OUT THE INPUT POINTER
    dispatchRange.m_pDispatch = 0;
  }

//  /**
//   * Get Read-only property.
//   *
//   * @return boolean
//   */
//  public boolean isReadOnly()
//  {
//    return Dispatch.get(this, "ReadOnly").toBoolean();
//  }

//  /**
//   * Close Word Document with Options for Saving or not Saving.
//   *
//   * @param closeOption Integer
//   */
//  public void close(Integer closeOption)
//  {
//    Dispatch.call(this, "Close", new Variant(closeOption));
//  }

  /**
   * Add a value to a Range of cells.
   *
   * @param theValue String
   */
  public void addValue(String theValue)
  {
    Dispatch.put(this, "Value", new Variant(theValue));
  }
}