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


package oracle.jdeveloper.html;

import java.io.PrintWriter;
import java.util.Vector;


/**
 *
 *
 * @version PUBLIC
 */

public class DHTMLNoTabControl extends HTMLScript
{
   protected String  name;
   protected String  title;
   protected String  helpText;
   protected boolean longPage = true;

   public DHTMLNoTabControl()
   {
      setVersion("javascript");
   }
   
   public DHTMLNoTabControl(String name)
   {
      this();
      setName(name);
   }
   
   public void setName(String name)
   {
      DHTMLElement.CheckValidName(name);
      this.name = name;
   }
   
   public String getName()
   {
      return name;
   }
   
   public void setTitle(String title)
   {
      this.title = title;
   }
   
   public String getTitle()
   {
      return title;
   }

   public void setHelpText(String helpText)
   {
      this.helpText = helpText;
   }
   
   public String getHelpText()
   {
      return helpText;
   }

/* Not in this release   
   public void setLongPage(boolean longPage)
   {
      this.longPage = longPage;
   }
   
   public boolean getLongPage()
   {
      return longPage;
   }
*/
   protected void renderContainerHeader(PrintWriter out)
   {
      super.renderContainerHeader(out);
      
      boolean needsc = false;
      StringBuffer buf = new StringBuffer();
      buf.append(name);
      buf.append(" = new notabcontrol(\"");
      
      if (title != null && title.length() > 0)
      {
         buf.append("title:");
         buf.append(title);
         needsc = true;
      }
   
      if (helpText != null && helpText.length() > 0)
      {
         if (needsc)
         {
            buf.append("; ");
         }
         buf.append("helptext:");
         buf.append(helpText);
      }

      buf.append("\");");
      out.println(buf.toString());
   }
}

