All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hfg.html.InputPassword Maven / Gradle / Ivy

There is a newer version: 20240423
Show newest version
package com.hfg.html;


//------------------------------------------------------------------------------
/**
 * Represents a password form element (<input type='password'>) tag.
 *
 * @author J. Alex Taylor, hairyfatguy.com
 */
//------------------------------------------------------------------------------
// com.hfg XML/HTML Coding Library
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
// [email protected]
//------------------------------------------------------------------------------

public class InputPassword extends HTMLTagWithFormEvents
{

   //##########################################################################
   // PRIVATE FIELDS
   //##########################################################################


   //##########################################################################
   // CONSTRUCTORS
   //##########################################################################

   //--------------------------------------------------------------------------
   public InputPassword()
   {
      super(HTML.INPUT);
      setAttribute(HTML.TYPE, HTML.PASSWORD);
   }

   //--------------------------------------------------------------------------
   public InputPassword(String inName, String inValue)
   {
      this();
      setName(inName);
      setValue(inValue);
   }

   //##########################################################################
   // PUBLIC METHODS
   //##########################################################################

   //--------------------------------------------------------------------------
   public InputPassword setSize(int inValue)
   {
      setAttribute(HTML.SIZE, Integer.toString(inValue));

      return this;
   }

   //--------------------------------------------------------------------------
   public InputPassword setMaxLength(int inValue)
   {
      setAttribute(HTML.MAX_LENGTH, Integer.toString(inValue));

      return this;
   }


   //--------------------------------------------------------------------------
   public InputPassword setName(String inValue)
   {
      setAttribute(HTML.NAME, inValue);

      return this;
   }

   //--------------------------------------------------------------------------
   public String getName()
   {
      return getAttributeValue(HTML.NAME);
   }

   //--------------------------------------------------------------------------
   public InputPassword setValue(String inValue)
   {
      setAttribute(HTML.VALUE, inValue);

      return this;
   }

   //--------------------------------------------------------------------------
   public String getValue()
   {
      return getAttributeValue(HTML.VALUE);
   }

   // Overrides for HTMLTag setters to allow method chaining.

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setId(String inValue)
   {
      return (InputPassword) super.setId(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setStyle(CharSequence inValue)
   {
      return (InputPassword) super.setStyle(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword addStyle(String inValue)
   {
      return (InputPassword) super.addStyle(inValue);
   }

   //--------------------------------------------------------------------------
   public InputPassword setOnInput(String inValue)
   {
      setAttribute(HTML.ONINPUT, inValue);
      return this;
   }

   // Overrides for HTMLTagWithCoreEvents setters to allow method chaining.

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnClick(String inValue)
   {
      return (InputPassword) super.setOnClick(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnDblClick(String inValue)
   {
      return (InputPassword) super.setOnDblClick(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnMouseDown(String inValue)
   {
      return (InputPassword) super.setOnMouseDown(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnMouseMove(String inValue)
   {
      return (InputPassword) super.setOnMouseMove(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnMouseOut(String inValue)
   {
      return (InputPassword) super.setOnMouseOut(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnMouseOver(String inValue)
   {
      return (InputPassword) super.setOnMouseOver(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnMouseUp(String inValue)
   {
      return (InputPassword) super.setOnMouseUp(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnKeyDown(String inValue)
   {
      return (InputPassword) super.setOnKeyDown(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnKeyPress(String inValue)
   {
      return (InputPassword) super.setOnKeyPress(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnKeyUp(String inValue)
   {
      return (InputPassword) super.setOnKeyUp(inValue);
   }

   // Overrides for HTMLTagWithFormEvents setters to allow method chaining.

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnBlur(String inValue)
   {
      return (InputPassword) super.setOnBlur(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnChange(String inValue)
   {
      return (InputPassword) super.setOnChange(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setOnFocus(String inValue)
   {
      return (InputPassword) super.setOnFocus(inValue);
   }

   //--------------------------------------------------------------------------
   @Override
   public InputPassword setAutofocus()
   {
      return (InputPassword) super.setAutofocus();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy