org.fife.ui.search.FindInFilesEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rtext Show documentation
Show all versions of rtext Show documentation
RText is a powerful, cross-platform programmer's text editor written in Java. It is designed
to be easy to use, highly customizable and flexible. Part of RText's design is for the source code
to be simple, easy to understand, and well documented, so that other programmers can look into its
inner-workings and figure out how RText ticks with ease. A good place to start (besides the source
code) is the Javadoc for all classes used in the project.
/*
* 08/11/2004
*
* FindInFilesEvent.java - Event fired from FindInFileDialogs when the user
* selects a match.
* Copyright (C) 2004 Robert Futrell
* http://fifesoft.com/rtext
* Licensed under a modified BSD license.
* See the included license file for details.
*/
package org.fife.ui.search;
import java.util.EventObject;
/**
* Event fired by FindInFileDialog
s when the user clicks on a
* match.
*
* @author Robert Futrell
* @version 0.5
*/
public class FindInFilesEvent extends EventObject {
private static final long serialVersionUID = 1L;
/**
* The name of the file for the match they clicked.
*/
private String fileName;
/**
* The line number of the match they clicked. Note that this value may be
* -1
signifying that no match was found (i.e., they clicked on
* a "verbose" informational line).
*/
private int line;
/**
* Constructor.
*
* @param source The find-in-files dialog that fired this event.
* @param fileName The name of the file of the match they clicked.
* @param line The line number of the match they clicked.
*/
public FindInFilesEvent(Object source, String fileName, int line) {
super(source);
this.fileName = fileName;
this.line = line;
}
/**
* Returns the name of the file for the match of this event.
*
* @return The file name.
*/
public String getFileName() {
return fileName;
}
/**
* Returns the line number for the match of this event.
*
* @return The line number.
*/
public int getLine() {
return line;
}
}