You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DummyStatusBar.java 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a copy
  5. * of this software and associated documentation files (the "Software"), to deal
  6. * in the Software without restriction, including without limitation the rights
  7. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. * copies of the Software, and to permit persons to whom the Software is
  9. * furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  20. * SOFTWARE.
  21. */
  22. package com.dmdirc.addons.ui_dummy;
  23. import com.dmdirc.ui.interfaces.StatusBar;
  24. import com.dmdirc.ui.interfaces.StatusBarComponent;
  25. import com.dmdirc.ui.interfaces.StatusMessageNotifier;
  26. /**
  27. * Dummy status bar, used for testing.
  28. */
  29. public final class DummyStatusBar implements StatusBar {
  30. /** Instantiates DummyStatusBar. */
  31. public DummyStatusBar() {
  32. //Do nothing.
  33. }
  34. /** {@inheritDoc} */
  35. @Override
  36. public void setMessage(final String newMessage) {
  37. System.out.println("DummyStatusBar: " + newMessage);
  38. }
  39. /** {@inheritDoc} */
  40. @Override
  41. public void setMessage(final String newMessage,
  42. final StatusMessageNotifier newNotifier) {
  43. System.out.println("DummyStatusBar: " + newMessage);
  44. }
  45. /** {@inheritDoc} */
  46. @Override
  47. public void setMessage(final String newMessage,
  48. final StatusMessageNotifier newNotifier, final int timeout) {
  49. System.out.println("DummyStatusBar: " + newMessage);
  50. }
  51. @Override
  52. public void setMessage(String iconType, String newMessage) {
  53. System.out.println("DummyStatusBar: " + newMessage);
  54. }
  55. @Override
  56. public void setMessage(String iconType, String newMessage,
  57. StatusMessageNotifier newNotifier) {
  58. System.out.println("DummyStatusBar: " + newMessage);
  59. }
  60. @Override
  61. public void setMessage(String iconType, String newMessage,
  62. StatusMessageNotifier newNotifier, int timeout) {
  63. System.out.println("DummyStatusBar: " + newMessage);
  64. }
  65. /** {@inheritDoc} */
  66. @Override
  67. public void clearMessage() {
  68. System.out.println("DummyStatusBar: message cleared");
  69. }
  70. /** {@inheritDoc} */
  71. @Override
  72. public void addComponent(final StatusBarComponent component) {
  73. // Do nothing
  74. }
  75. /** {@inheritDoc} */
  76. @Override
  77. public void removeComponent(final StatusBarComponent component) {
  78. // Do nothing
  79. }
  80. }