/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
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- package org.gjt.sp.jedit.msg;
- import org.gjt.sp.jedit.EBMessage;
- import org.gjt.sp.jedit.View;
- /** Message sent when a file system tree node,
- * or a ProjectViewer tree node, is selected.
- * @since jEdit 4.3pre11
- */
- public class VFSPathSelected extends EBMessage
- {
- /**
- * @param source the View that is considered the "source" of this event
- * @param isDirectory true if the path is pointing to a folder, false if it's a regular file
- * @param path The selected path.
- */
- public VFSPathSelected(View source, String path, boolean isDirectory)
- {
- super(source);
- this.path = path;
- this.isDir = isDirectory;
- }
- public View getView()
- {
- return (View) getSource();
- }
- /**
- * @return The selected URL (or file path).
- */
- public String getPath()
- {
- return path;
- }
- /**
- *
- * @return true if this is a directory node
- */
- public boolean isDirectory()
- {
- return isDir;
- }
- private final String path;
- private boolean isDir;
- }