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

org.fife.ui.search.FindInFilesEvent Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 2.0.7
Show newest version
/*
 * 08/11/2004
 *
 * FindInFilesEvent.java - Event fired from FindInFileDialogs when the user
 *                                   selects a match.
 * Copyright (C) 2004 Robert Futrell
 * robert_futrell at users.sourceforge.net
 * http://fifesoft.com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package org.fife.ui.search;

import java.util.EventObject;


/**
 * Event fired by FindInFileDialogs 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;
	}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy