/plugins/Console/tags/release-4-1-2/console/Output.java

# · Java · 47 lines · 9 code · 5 blank · 33 comment · 0 complexity · a5a1413e639d710b3999111f387ee9ad MD5 · raw file

  1. /*
  2. * Output.java - Console output interface
  3. * Copyright (C) 2001, 2004 Slava Pestov
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version 2
  8. * of the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. package console;
  20. import java.awt.Color;
  21. import javax.swing.text.AttributeSet;
  22. public interface Output
  23. {
  24. /**
  25. * Prints a string of text with the specified color.
  26. * @param color The color. If null, the default color will be used
  27. * @param msg The message
  28. */
  29. void print(Color color, String msg);
  30. /**
  31. * Prints a string of text with the specified color, without the
  32. * terminating newline.
  33. * @param attrs Character attributes
  34. * @param msg The message
  35. * @since Console 4.0
  36. */
  37. void writeAttrs(AttributeSet attrs, String msg);
  38. /**
  39. * Call when the command finishes executing.
  40. */
  41. void commandDone();
  42. }