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