src/java.desktop/macosx/classes/sun/lwawt/LWTextAreaPeer.java
changeset 51911 57fa2c1c98d4
parent 47216 71c04702a3d5
equal deleted inserted replaced
51910:4b492ccc0b71 51911:57fa2c1c98d4
     1 /*
     1 /*
     2  * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   217             super.setEnabled(enabled);
   217             super.setEnabled(enabled);
   218         }
   218         }
   219 
   219 
   220         private final class JTextAreaDelegate extends JTextArea {
   220         private final class JTextAreaDelegate extends JTextArea {
   221 
   221 
   222             // Empty non private constructor was added because access to this
       
   223             // class shouldn't be emulated by a synthetic accessor method.
       
   224             JTextAreaDelegate() {
       
   225                 super();
       
   226             }
       
   227 
       
   228             @Override
   222             @Override
   229             public void replaceSelection(String content) {
   223             public void replaceSelection(String content) {
   230                 getDocument().removeDocumentListener(LWTextAreaPeer.this);
   224                 getDocument().removeDocumentListener(LWTextAreaPeer.this);
   231                 super.replaceSelection(content);
   225                 super.replaceSelection(content);
   232                 // post only one text event in this case
   226                 // post only one text event in this case