PageRenderTime 81ms CodeModel.GetById 77ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/jEdit/tags/jedit-4-5-pre1/org/gjt/sp/jedit/msg/VFSPathSelected.java

#
Java | 49 lines | 26 code | 7 blank | 16 comment | 0 complexity | 3cc31df0b5467c3c10c72f5ff668af20 MD5 | raw file
 1package org.gjt.sp.jedit.msg;
 2
 3import org.gjt.sp.jedit.EBMessage;
 4import org.gjt.sp.jedit.View;
 5
 6/** Message sent when a file system tree node,
 7 * or a ProjectViewer tree node, is selected.
 8 * @since jEdit 4.3pre11
 9 */
10public class VFSPathSelected extends EBMessage
11{
12	/**
13	 * @param source the View that is considered the "source" of this event
14	 * @param isDirectory true if the path is pointing to a folder, false if it's a regular file
15	 * @param path The selected path.
16	 */
17	public VFSPathSelected(View source, String path, boolean isDirectory)
18	{
19		super(source);
20		this.path = path;
21		this.isDir = isDirectory;
22	}
23
24	public View getView()
25	{
26		return (View) getSource();
27	}
28
29	/**
30	 *  @return The selected URL (or file path).
31	 */
32	public String getPath()
33	{
34		return path;
35	}
36
37	/**
38	 * 
39	 * @return true if this is a directory node
40	 */
41	public boolean isDirectory()
42	{
43		return isDir;
44	}
45
46	private final String path;
47	private boolean isDir;
48}
49