001 /*
002 * This file is part of the Echo Point Project. This project is a
003 * collection of Components that have extended the Echo Web Application
004 * Framework Version 3.
005 *
006 * Version: MPL 1.1
007 *
008 * The contents of this file are subject to the Mozilla Public License Version
009 * 1.1 (the "License"); you may not use this file except in compliance with
010 * the License. You may obtain a copy of the License at
011 * http://www.mozilla.org/MPL/
012 *
013 * Software distributed under the License is distributed on an "AS IS" basis,
014 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
015 * for the specific language governing rights and limitations under the
016 * License.
017 */
018
019 package echopoint.internal;
020
021 /**
022 * A base class for text field extensions.
023 *
024 * @author Rakesh 2009-03-08
025 * @version $Id: TextField.java 208 2009-05-25 02:40:35Z sptrakesh $
026 */
027 public abstract class TextField extends nextapp.echo.app.TextField
028 {
029 /** The default text to display in the text field. */
030 public static final String PROPERTY_DEFAULT_TEXT = "defaultText";
031
032 /**
033 * Set the default text to display in the component.
034 *
035 * @return The {@link #PROPERTY_DEFAULT_TEXT} value.
036 */
037 public String getDefaultText()
038 {
039 return (String) get( PROPERTY_DEFAULT_TEXT );
040 }
041
042 /**
043 * Set the default text value to display in the component.
044 *
045 * @param defaultText The {@link #PROPERTY_DEFAULT_TEXT} value to set.
046 */
047 public void setDefaultText( final String defaultText )
048 {
049 set( PROPERTY_DEFAULT_TEXT, defaultText );
050 }
051 }