PageRenderTime 32ms CodeModel.GetById 7ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/SideKick/sidekick/util/SideKickElement.java

#
Java | 59 lines | 12 code | 11 blank | 36 comment | 0 complexity | 69776f964b3bba7dc50316330cff2e94 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. Copyright (c) 2006, Dale Anson
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without modification,
  5. are permitted provided that the following conditions are met:
  6. * Redistributions of source code must retain the above copyright notice,
  7. this list of conditions and the following disclaimer.
  8. * Redistributions in binary form must reproduce the above copyright notice,
  9. this list of conditions and the following disclaimer in the documentation
  10. and/or other materials provided with the distribution.
  11. * Neither the name of the <ORGANIZATION> nor the names of its contributors
  12. may be used to endorse or promote products derived from this software without
  13. specific prior written permission.
  14. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  15. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  16. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  17. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
  18. ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  19. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  20. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  21. ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  23. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. */
  25. package sidekick.util;
  26. import javax.swing.text.Position;
  27. /**
  28. * danson: an interface for objects that need to provide both Location and
  29. * Position information. This is useful for objects created by javacc parsers.
  30. * All the javacc parsers I've written so far for sidekick create objects that
  31. * provide Location information. These objects also need to provide Position
  32. * information for sidekick. By generalizing to an interface, these various
  33. * objects can be handled by utilities that need to manipulate this data without
  34. * regard for the actual object type.
  35. */
  36. public interface SideKickElement {
  37. public void setStartLocation( Location loc );
  38. public Location getStartLocation();
  39. public void setEndLocation( Location loc );
  40. public Location getEndLocation();
  41. public void setStartPosition( Position s );
  42. public Position getStartPosition();
  43. public void setEndPosition( Position s );
  44. public Position getEndPosition();
  45. }