PageRenderTime 57ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/SideKick/sidekick/IAsset.java

#
Java | 89 lines | 15 code | 12 blank | 62 comment | 0 complexity | a0999b858a4ebb09bfd70391101b7635 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. /*
  2. * IAsset.java
  3. * :tabSize=8:indentSize=8:noTabs=false:
  4. * :folding=explicit:collapseFolds=1:
  5. *
  6. * Copyright (C) 2005 Matthieu Casanova
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version 2
  11. * of the License, or any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21. */
  22. package sidekick;
  23. //{{{ Imports
  24. import javax.swing.*;
  25. import javax.swing.text.Position;
  26. //}}}
  27. /**
  28. * A block of code within a file. Assets correspond to nodes in the
  29. * Structure Browser and folds in the SideKick folding mode.
  30. */
  31. public interface IAsset
  32. {
  33. /**
  34. * Returns the icon to be shown for the asset in the structure tree.
  35. */
  36. Icon getIcon();
  37. /**
  38. * Returns a brief description of the asset to be shown in the tree.
  39. * This string is displayed in the jEdit status bar and optionally in
  40. * a tool tip (if the user has the 'show tool tips' option turned on).
  41. */
  42. String getShortString();
  43. /**
  44. * Returns a full description of the asset to be shown in the view's
  45. * status bar on when the mouse is over the asset in the tree. Only
  46. * the first line of this message will be shown in the status bar. The
  47. * full text will be displayed in the built-in status window (if the user
  48. * has the 'show status window' option turned on).
  49. */
  50. String getLongString();
  51. /**
  52. * Returns the name of the Asset.
  53. */
  54. String getName();
  55. /**
  56. * Set the name of the asset
  57. */
  58. void setName(String name);
  59. /**
  60. * Set the start position
  61. */
  62. void setStart(Position start);
  63. /**
  64. * Returns the starting position.
  65. */
  66. Position getStart();
  67. /**
  68. * Set the end position - the position of the first character
  69. * following the asset (or the end of the buffer).
  70. */
  71. void setEnd(Position end);
  72. /**
  73. * Returns the end position - the position of the first character
  74. * following the asset (or the end of the buffer).
  75. */
  76. Position getEnd();
  77. }