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

jsyntaxpane.actions.FindNextAction Maven / Gradle / Ivy

There is a newer version: 5.3.2
Show newest version
package jsyntaxpane.actions;

import java.awt.event.ActionEvent;
import javax.swing.text.JTextComponent;
import jsyntaxpane.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 - 2024 Weber Informatics LLC | Privacy Policy