< prev index next >

src/java.desktop/share/classes/java/awt/TextArea.java

Print this page
rev 55815 : 8225372: accessibility errors in tables in java.desktop files
Reviewed-by: aivanov
   1 /*
   2  * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  24  */
  25 package java.awt;
  26 
  27 import java.awt.peer.TextAreaPeer;
  28 import java.io.IOException;
  29 import java.io.ObjectInputStream;
  30 import java.util.HashSet;
  31 import java.util.Set;
  32 
  33 import javax.accessibility.AccessibleContext;
  34 import javax.accessibility.AccessibleState;
  35 import javax.accessibility.AccessibleStateSet;
  36 
  37 /**
  38  * A {@code TextArea} object is a multi-line region
  39  * that displays text. It can be set to allow editing or
  40  * to be read-only.
  41  * <p>
  42  * The following image shows the appearance of a text area:
  43  * <p>
  44  * <img src="doc-files/TextArea-1.gif" alt="A TextArea showing the word 'Hello!'"
  45  * style="float:center; margin: 7px 10px;">
  46  * <p>
  47  * This text area could be created by the following line of code:
  48  *
  49  * <hr><blockquote><pre>
  50  * new TextArea("Hello", 5, 40);
  51  * </pre></blockquote><hr>
  52  *
  53  * @author      Sami Shaio
  54  * @since       1.0
  55  */
  56 public class TextArea extends TextComponent {
  57 
  58     /**
  59      * The number of rows in the {@code TextArea}.
  60      * This parameter will determine the text area's height.
  61      * Guaranteed to be non-negative.
  62      *
  63      * @serial
  64      * @see #getRows()
  65      * @see #setRows(int)


   1 /*
   2  * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  24  */
  25 package java.awt;
  26 
  27 import java.awt.peer.TextAreaPeer;
  28 import java.io.IOException;
  29 import java.io.ObjectInputStream;
  30 import java.util.HashSet;
  31 import java.util.Set;
  32 
  33 import javax.accessibility.AccessibleContext;
  34 import javax.accessibility.AccessibleState;
  35 import javax.accessibility.AccessibleStateSet;
  36 
  37 /**
  38  * A {@code TextArea} object is a multi-line region
  39  * that displays text. It can be set to allow editing or
  40  * to be read-only.
  41  * <p>
  42  * The following image shows the appearance of a text area:
  43  * <p>
  44  * <img src="doc-files/TextArea-1.gif" alt="A TextArea showing the word
  45  * 'Hello!'" style="margin: 7px 10px;">
  46  * <p>
  47  * This text area could be created by the following line of code:
  48  *
  49  * <hr><blockquote><pre>
  50  * new TextArea("Hello", 5, 40);
  51  * </pre></blockquote><hr>
  52  *
  53  * @author      Sami Shaio
  54  * @since       1.0
  55  */
  56 public class TextArea extends TextComponent {
  57 
  58     /**
  59      * The number of rows in the {@code TextArea}.
  60      * This parameter will determine the text area's height.
  61      * Guaranteed to be non-negative.
  62      *
  63      * @serial
  64      * @see #getRows()
  65      * @see #setRows(int)


< prev index next >