01: package org.gjt.sp.jedit.msg;
02:
03: import org.gjt.sp.jedit.EBMessage;
04: import org.gjt.sp.jedit.View;
05:
06: /** Message sent when a file system tree node,
07: * or a ProjectViewer tree node, is selected.
08: * @since jEdit 4.3pre11
09: */
10: public class VFSPathSelected extends EBMessage {
11: /**
12: * @param source the View that is considered the "source" of this event
13: * @param isDirectory true if the path is pointing to a folder, false if it's a regular file
14: * @param path The selected path.
15: */
16: public VFSPathSelected(View source, String path, boolean isDirectory) {
17: super (source);
18: this .path = path;
19: this .isDir = isDirectory;
20: }
21:
22: public View getView() {
23: return (View) getSource();
24: }
25:
26: /**
27: * @return The selected URL (or file path).
28: */
29: public String getPath() {
30: return path;
31: }
32:
33: /**
34: *
35: * @return true if this is a directory node
36: */
37: public boolean isDirectory() {
38: return isDir;
39: }
40:
41: private final String path;
42: private boolean isDir;
43: }
|