選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

UIController.java 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /*
  2. * Copyright (c) 2006-2007 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.ui.interfaces;
  23. import com.dmdirc.Channel;
  24. import com.dmdirc.FrameContainer;
  25. import com.dmdirc.Query;
  26. import com.dmdirc.Server;
  27. import com.dmdirc.WritableFrameContainer;
  28. import com.dmdirc.commandparser.parsers.CommandParser;
  29. import com.dmdirc.updater.Update;
  30. import java.util.List;
  31. /**
  32. * Defines the methods that should be implemented by UI controllers. Controllers
  33. * handle the various aspects of a UI implementation.
  34. *
  35. * @author Chris
  36. */
  37. public interface UIController {
  38. /**
  39. * Retrieves the main window used by this UI.
  40. *
  41. * @return This UI's main window
  42. */
  43. MainWindow getMainWindow();
  44. /**
  45. * Retrieves the status bar component used by this UI.
  46. *
  47. * @return This UI's status bar
  48. */
  49. StatusBar getStatusBar();
  50. /**
  51. * Retrieves the frame manager used by this UI.
  52. *
  53. * @return This UI's frame manager
  54. */
  55. FrameManager getFrameManager();
  56. /**
  57. * Creates a channel window for the specified channel.
  58. *
  59. * @param channel The channel that is requesting a window be made
  60. * @return A new channel window for the specified channel
  61. */
  62. ChannelWindow getChannel(Channel channel);
  63. /**
  64. * Creates a server window for the specified server.
  65. *
  66. * @param server The server that is requesting a window be made
  67. * @return A new server window for the specified server
  68. */
  69. ServerWindow getServer(Server server);
  70. /**
  71. * Creates a query window for the specified query.
  72. *
  73. * @param query The query that is requesting a window be made
  74. * @return A new query window for the specified query
  75. */
  76. QueryWindow getQuery(Query query);
  77. /**
  78. * Creates a new custom window instance.
  79. *
  80. * @param owner The owner of the input window
  81. * @return A new custom window
  82. */
  83. Window getWindow(FrameContainer owner);
  84. /**
  85. * Creates a new custom input window instance.
  86. *
  87. * @param owner The owner of the input window
  88. * @param commandParser The command parser to be used
  89. * @return A new custom input window
  90. */
  91. InputWindow getInputWindow(WritableFrameContainer owner, CommandParser commandParser);
  92. /**
  93. * Creates a new preferences panel for the specified parent.
  94. *
  95. * @param parent Preferences panel parent
  96. * @param title Preferences panel title
  97. *
  98. * @return PreferencesPanel
  99. */
  100. PreferencesPanel getPreferencesPanel(PreferencesInterface parent, String title);
  101. /**
  102. * Returns an updater dialog for the specified updates.
  103. *
  104. * @param updates Updates available
  105. *
  106. * @return UpdaterDialog
  107. */
  108. UpdaterDialog getUpdaterDialog(List<Update> updates);
  109. /**
  110. * Shows the first run wizard for the ui.
  111. */
  112. void showFirstRunWizard();
  113. /**
  114. * Shows the (addons) migration wizard for the ui.
  115. */
  116. void showMigrationWizard();
  117. /**
  118. * Shows a channel settigns dialog for specified channel.
  119. *
  120. * @param channel Channel to show the dialog for
  121. */
  122. void showChannelSettingsDialog(Channel channel);
  123. /**
  124. * Shows a server settigns dialog for specified server.
  125. *
  126. * @param server Server to show the dialog for
  127. */
  128. void showServerSettingsDialog(Server server);
  129. /**
  130. * Initialises any settings required by this UI (this is always called
  131. * before any aspect of the UI is instansiated).
  132. */
  133. void initUISettings();
  134. }