001    // Copyright 2004, 2005 The Apache Software Foundation
002    //
003    // Licensed under the Apache License, Version 2.0 (the "License");
004    // you may not use this file except in compliance with the License.
005    // You may obtain a copy of the License at
006    //
007    //     http://www.apache.org/licenses/LICENSE-2.0
008    //
009    // Unless required by applicable law or agreed to in writing, software
010    // distributed under the License is distributed on an "AS IS" BASIS,
011    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012    // See the License for the specific language governing permissions and
013    // limitations under the License.
014    
015    package org.apache.tapestry.contrib.form;
016    
017    import org.apache.tapestry.BaseComponent;
018    
019    /**
020     * Provides a mask edit HTML <input type="text"> form element.
021     * <p>
022     * Mask edit field validates the text the user enters against a mask that encodes the valid forms
023     * the text can take. The mask can also format text that is displayed to the user.
024     * <p>
025     * <table border="1" cellpadding="2">
026     * <tr>
027     * <th>Mask character</th>
028     * <th>Meaning in mask</th>
029     * </tr>
030     * <tr>
031     * <td>&nbsp;l</td>
032     * <td>&nbsp;Mixed case letter character [a..z, A..Z]</td>
033     * </tr>
034     * <tr>
035     * <td>&nbsp;L</td>
036     * <td>&nbsp;Upper case letter character [A..Z]</td>
037     * </tr>
038     * <tr>
039     * <td>&nbsp;a</td>
040     * <td>&nbsp;Mixed case alpha numeric character [a..z, A..Z, 0..1]</td>
041     * </tr>
042     * <tr>
043     * <td>&nbsp;A</td>
044     * <td>&nbsp;Upper case alpha numeric character [A..Z, 0..9]</td>
045     * </tr>
046     * <tr>
047     * <td>&nbsp;#</td>
048     * <td>&nbsp;Numeric character [0..9]</td>
049     * </tr>
050     * <tr>
051     * <td>&nbsp;_</td>
052     * <td>&nbsp;Reserved character for display, do not use.</td>
053     * </tr>
054     * <tr>
055     * <td>&nbsp;others</td>
056     * <td>&nbsp;Non editable character for display.</td>
057     * </tr>
058     * </table>
059     * <p>
060     * This component requires JavaScript to be enabled in the client browser.
061     * <p>[ <a href="../../../../../ComponentReference/MaskEdit.html">Component Reference </a>]
062     * 
063     * @author Malcolm Edgar
064     * @since 2.3
065     */
066    
067    public abstract class MaskEdit extends BaseComponent
068    {
069        public abstract String getMask();
070    
071        public abstract void setMask(String mask);
072    
073        public abstract String getValue();
074    
075        public abstract void setValue(String value);
076    
077        public abstract boolean isDisabled();
078    
079        public abstract void setDisabled(boolean disabled);
080    }