/********************************************************************
 *  Oracle JDeveloper
 *  Copyright (c) 1997, 1999, Oracle Corporation. All rights reserved.
 ********************************************************************/


package oracle.jdeveloper.html;

import java.io.PrintWriter;
import java.util.Vector;
import oracle.jbo.*;


/**
 *
 * The <tt>HTMLFieldRenderer</tt> interface defines the set of functions to be implemented by
 * a field renderer. If you are creating a field renderer for use in the
 * <tt>oracle.jbo.html.databeans.EditCurrentRecord</tt> Data Web Bean, you can avoid
 * implementing all of the methods by extending your field renderer class from the
 * <tt>HTMLFieldRendererImpl</tt> class. The only method you need to override
 * is <tt>populateForm()</tt>.
 *
 *
 **/
public interface HTMLFieldRenderer
{
    /**
	*	Sets this FORM field's name. This will be the name of the input parameter
	*   when the HTML form is submitted.
  * <p>
  * @param sName name of this FORM field.
	*/
    public void setFieldName(String sName);
    /**
	*	Gets this FORM field's name. This will be the name of the input parameter
	*   when the HTML form is submitted.
  * <p>
  * @return this FORM field's name.
	*/
	public String getFieldName();

	/**
	*	Sets the display width, in characters, of this field.
  * <p>
  * @param nWidth the display width, in characters.
	*/
    public void setDisplayWidth(int nWidth);
	/**
	*	Gets the display width, in characters, of this field.
  * <P>
  * @return the display width, in characters.
	*/
	public int  getDisplayWidth();

	/**
	*	Sets the display height, in characters, of this field.
  * <p>
  * @param nHeight the display height, in characters.
	*/
    public void  setDisplayHeight(int nHeight);

	/**
	*	Gets the display height, in characters, of this field.
  * <p>
  * @return the display height, in characters.
	*/
    public int   getDisplayHeight();

	/**
	*	Sets the maximum input length, in characters, of this field. The user will
  * not be able to enter more than <tt>nLength</tt> characters.
  * <p>
  * @param nLength the maximum input length, in characters.
	*/
    public void setMaxDataLength(int nLength);

	/**
  * Gets the maximum input length, in characters, of this field. This is the maximum
  * number of characters the user can enter in the field.
  * <p>
	*	@return the maximum input length, in characters.
	*/
    public int  getMaxDataLength();

	/**
	*	Sets the prompt to be displayed next to this input field.
  * <p>
  * @param sPrompt the prompt for this input field.
	*/
    public void setPromptText(String sPrompt);
	/**
	*	Gets the prompt to be displayed next to this input field.
  * <p>
  * @return the prompt displayed next to this input field.
	*/
    public String getPromptText();

	/**
	*	Sets the CSS (cascading style sheet) class name to be used by this field. You
  * can the use this class name
	* in your CSS file to change the visual attributes of the field.
  * <p>
  * @param sClass the class name of the CSS.
	*/
    public void setCSSClassName(String sClass);

	/**
  * Gets the name of the CSS (cascading style sheet) used by this field.
  * <p>
	*	@return the class name of the CSS.
	*/
    public String getCSSClassName();

	/**
	* Sets this field's current value.
  * <p>
  * @param sValue current value of this field.
	*/
    public void setValue(String sValue);

	/**
  * Gets this field's current value.
	*	<p>
  * @return this field's current value.
	*/
    public String getValue();

    /**
    **  This method is called when the field renderers are being used from the Tag library
    **  and from the DataWebBeans. 
    **/
    public String renderToString(HTMLRenderingContext ctx , RowSet rs, Row row , String sAttribute);

    public void setFormName(String sForm);

    public String getFormName();
}
