jdk/src/java.desktop/share/classes/java/awt/peer/TextAreaPeer.java
author chegar
Sun, 17 Aug 2014 15:54:13 +0100
changeset 25859 3317bb8137f4
parent 23653 jdk/src/share/classes/java/awt/peer/TextAreaPeer.java@a90ac2d7896c
permissions -rw-r--r--
8054834: Modular Source Code Reviewed-by: alanb, chegar, ihse, mduigou Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
23653
a90ac2d7896c 8036103: Cleanup of java.awt and java.awt.peer packages
serb
parents: 22260
diff changeset
     2
 * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1975
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1975
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1975
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1975
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1975
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
package java.awt.peer;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
import java.awt.Dimension;
1975
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    28
import java.awt.TextArea;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
/**
22260
c9185e010e03 8031082: Fix non-missing doclint problems in client libraries
darcy
parents: 5506
diff changeset
    31
 * The peer interface for {@link TextArea}.
1975
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    32
 *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * The peer interfaces are intended only for use in porting
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * the AWT. They are not intended for use by application
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * developers, and developers should not implement peers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * nor invoke any of the peer methods directly on the peer
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * instances.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
public interface TextAreaPeer extends TextComponentPeer {
1975
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    40
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    41
    /**
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    42
     * Inserts the specified text at the specified position in the document.
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    43
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    44
     * @param text the text to insert
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    45
     * @param pos the position to insert
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    46
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    47
     * @see TextArea#insert(String, int)
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    48
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    void insert(String text, int pos);
1975
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    50
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    51
    /**
23653
a90ac2d7896c 8036103: Cleanup of java.awt and java.awt.peer packages
serb
parents: 22260
diff changeset
    52
     * Replaces a range of text by the specified string.
1975
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    53
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    54
     * @param text the replacement string
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    55
     * @param start the begin of the range to replace
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    56
     * @param end the end of the range to replace
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    57
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    58
     * @see TextArea#replaceRange(String, int, int)
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    59
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    void replaceRange(String text, int start, int end);
1975
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    61
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    62
    /**
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    63
     * Returns the preferred size of a textarea with the specified number of
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    64
     * columns and rows.
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    65
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    66
     * @param rows the number of rows
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    67
     * @param columns the number of columns
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    68
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    69
     * @return the preferred size of a textarea
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    70
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    71
     * @see TextArea#getPreferredSize(int, int)
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    72
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    Dimension getPreferredSize(int rows, int columns);
1975
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    74
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    75
    /**
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    76
     * Returns the minimum size of a textarea with the specified number of
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    77
     * columns and rows.
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    78
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    79
     * @param rows the number of rows
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    80
     * @param columns the number of columns
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    81
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    82
     * @return the minimum size of a textarea
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    83
     *
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    84
     * @see TextArea#getMinimumSize(int, int)
b8dae32335f2 6792515: Specify awt peer's API
rkennke
parents: 1964
diff changeset
    85
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
    Dimension getMinimumSize(int rows, int columns);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
}