
de.sciss.syntaxpane.actions.FindNextAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of syntaxpane Show documentation
Show all versions of syntaxpane Show documentation
An extension of Java Swing's JEditorKit that supports syntax highlighting for several languages.
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