Keine Cache-Version

Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.
javax.swing.text

Class NavigationFilter


  • public class NavigationFilter
    extends Object
    NavigationFilter can be used to restrict where the cursor can be positioned. When the default cursor positioning actions attempt to reposition the cursor they will call into the NavigationFilter, assuming the JTextComponent has a non-null NavigationFilter set. In this manner the NavigationFilter can effectively restrict where the cursor can be positioned. Similarly DefaultCaret will call into the NavigationFilter when the user is changing the selection to further restrict where the cursor can be positioned.

    Subclasses can conditionally call into supers implementation to restrict where the cursor can be placed, or call directly into the FilterBypass.

    Since:
    1.4
    See Also:
    Caret, DefaultCaret, View
    • Constructor Detail

      • public NavigationFilter()
    • Method Detail

      • setDot

        public void setDot(NavigationFilter.FilterBypass fb,
                  int dot,
                  Position.Bias bias)
        Invoked prior to the Caret setting the dot. The default implementation calls directly into the FilterBypass with the passed in arguments. Subclasses may wish to conditionally call super with a different location, or invoke the necessary method on the FilterBypass
        Parameters:
        fb - FilterBypass that can be used to mutate caret position
        dot - the position >= 0
        bias - Bias to place the dot at
      • moveDot

        public void moveDot(NavigationFilter.FilterBypass fb,
                   int dot,
                   Position.Bias bias)
        Invoked prior to the Caret moving the dot. The default implementation calls directly into the FilterBypass with the passed in arguments. Subclasses may wish to conditionally call super with a different location, or invoke the necessary methods on the FilterBypass.
        Parameters:
        fb - FilterBypass that can be used to mutate caret position
        dot - the position >= 0
        bias - Bias for new location
      • getNextVisualPositionFrom

        public int getNextVisualPositionFrom(JTextComponent text,
                                    int pos,
                                    Position.Bias bias,
                                    int direction,
                                    Position.Bias[] biasRet)
                                      throws BadLocationException
        Returns the next visual position to place the caret at from an existing position. The default implementation simply forwards the method to the root View. Subclasses may wish to further restrict the location based on additional criteria.
        Parameters:
        text - JTextComponent containing text
        pos - Position used in determining next position
        bias - Bias used in determining next position
        direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This will be one of the following values:
        • SwingConstants.WEST
        • SwingConstants.EAST
        • SwingConstants.NORTH
        • SwingConstants.SOUTH
        biasRet - Used to return resulting Bias of next position
        Returns:
        the location within the model that best represents the next location visual position
        Throws:
        BadLocationException
        IllegalArgumentException - if direction doesn't have one of the legal values above

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/swing/text/navigationfilter.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut