All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.sciss.syntaxpane.actions.FindNextAction Maven / Gradle / Ivy

Go to download

An extension of Java Swing's JEditorKit that supports syntax highlighting for several languages.

There is a newer version: 1.3.0
Show newest version
package de.sciss.syntaxpane.actions;

import java.awt.event.ActionEvent;
import javax.swing.text.JTextComponent;
import de.sciss.syntaxpane.SyntaxDocument;

/**
 * This class performs a Find Next operation by using the current pattern
 */
public class FindNextAction extends DefaultSyntaxAction {

    public FindNextAction() {
        super("find-next");
    }

    @Override
    public void actionPerformed(JTextComponent target, SyntaxDocument sdoc,
            int dot, ActionEvent e) {
        DocumentSearchData dsd = DocumentSearchData.getFromEditor(target);
        if (dsd != null) {
            if(!dsd.doFindNext(target)) {
				dsd.msgNotFound(target);
			}
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy