< prev index next >

src/java.desktop/share/classes/javax/swing/text/JTextComponent.java

Print this page


   1 /*
   2  * Copyright (c) 1997, 2014, 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


 518         Insets old = margin;
 519         margin = m;
 520         firePropertyChange("margin", old, m);
 521         invalidate();
 522     }
 523 
 524     /**
 525      * Returns the margin between the text component's border and
 526      * its text.
 527      *
 528      * @return the margin
 529      */
 530     public Insets getMargin() {
 531         return margin;
 532     }
 533 
 534     /**
 535      * Sets the <code>NavigationFilter</code>. <code>NavigationFilter</code>
 536      * is used by <code>DefaultCaret</code> and the default cursor movement
 537      * actions as a way to restrict the cursor movement.

 538      *
 539      * @since 1.4
 540      */
 541     public void setNavigationFilter(NavigationFilter filter) {
 542         navigationFilter = filter;
 543     }
 544 
 545     /**
 546      * Returns the <code>NavigationFilter</code>. <code>NavigationFilter</code>
 547      * is used by <code>DefaultCaret</code> and the default cursor movement
 548      * actions as a way to restrict the cursor movement. A null return value
 549      * implies the cursor movement and selection should not be restricted.
 550      *
 551      * @since 1.4
 552      * @return the NavigationFilter
 553      */
 554     public NavigationFilter getNavigationFilter() {
 555         return navigationFilter;
 556     }
 557 


   1 /*
   2  * Copyright (c) 1997, 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


 518         Insets old = margin;
 519         margin = m;
 520         firePropertyChange("margin", old, m);
 521         invalidate();
 522     }
 523 
 524     /**
 525      * Returns the margin between the text component's border and
 526      * its text.
 527      *
 528      * @return the margin
 529      */
 530     public Insets getMargin() {
 531         return margin;
 532     }
 533 
 534     /**
 535      * Sets the <code>NavigationFilter</code>. <code>NavigationFilter</code>
 536      * is used by <code>DefaultCaret</code> and the default cursor movement
 537      * actions as a way to restrict the cursor movement.
 538      * @param filter the filter
 539      *
 540      * @since 1.4
 541      */
 542     public void setNavigationFilter(NavigationFilter filter) {
 543         navigationFilter = filter;
 544     }
 545 
 546     /**
 547      * Returns the <code>NavigationFilter</code>. <code>NavigationFilter</code>
 548      * is used by <code>DefaultCaret</code> and the default cursor movement
 549      * actions as a way to restrict the cursor movement. A null return value
 550      * implies the cursor movement and selection should not be restricted.
 551      *
 552      * @since 1.4
 553      * @return the NavigationFilter
 554      */
 555     public NavigationFilter getNavigationFilter() {
 556         return navigationFilter;
 557     }
 558 


< prev index next >