Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

WebChannelWindow.java 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Copyright (c) 2006-2011 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_web.uicomponents;
  23. import com.dmdirc.Channel;
  24. import com.dmdirc.addons.ui_web.DynamicRequestHandler;
  25. import com.dmdirc.addons.ui_web.Event;
  26. import com.dmdirc.addons.ui_web.WebInterfaceUI;
  27. import com.dmdirc.parser.interfaces.ChannelClientInfo;
  28. import com.dmdirc.ui.interfaces.ChannelWindow;
  29. import java.util.Collection;
  30. /**
  31. *
  32. * @author chris
  33. */
  34. public class WebChannelWindow extends WebInputWindow implements ChannelWindow {
  35. private final Channel channel;
  36. public WebChannelWindow(final WebInterfaceUI controller,
  37. final Channel channel) {
  38. super(controller, channel);
  39. this.channel = channel;
  40. }
  41. /** {@inheritDoc} */
  42. @Deprecated
  43. @Override
  44. public void updateNames(final Collection<ChannelClientInfo> clients) {
  45. updateNames();
  46. }
  47. /** {@inheritDoc} */
  48. @Deprecated
  49. @Override
  50. public void addName(final ChannelClientInfo client) {
  51. DynamicRequestHandler.addEvent(new Event("addnicklist",
  52. client.getClient().getNickname()));
  53. }
  54. /** {@inheritDoc} */
  55. @Deprecated
  56. @Override
  57. public void removeName(final ChannelClientInfo client) {
  58. updateNames();
  59. }
  60. /** {@inheritDoc} */
  61. @Deprecated
  62. @Override
  63. public void updateNames() {
  64. DynamicRequestHandler.addEvent(new Event("clearnicklist", null));
  65. for (ChannelClientInfo cci : channel.getChannelInfo()
  66. .getChannelClients()) {
  67. DynamicRequestHandler.addEvent(new Event("addnicklist",
  68. cci.getClient().getNickname()));
  69. }
  70. }
  71. /**
  72. * {@inheritDoc}
  73. *
  74. * @deprecated Use {@link #getContainer()}
  75. */
  76. @Override
  77. @Deprecated
  78. public Channel getChannel() {
  79. return channel;
  80. }
  81. /** {@inheritDoc} */
  82. @Override
  83. @Deprecated
  84. public void redrawNicklist() {
  85. // Do nothing
  86. }
  87. }