| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gudy.azureus2.pluginsimpl.local.ui.UIManagerImpl
public class UIManagerImpl
| Field Summary | |
|---|---|
| protected static AEMonitor | class_mon | 
| protected static List<BasicPluginConfigModel> | configModels | 
| protected static boolean | initialisation_complete | 
| protected  MenuManager | menu_manager | 
| protected  PluginInterface | pi | 
| protected  TableManager | table_manager | 
| protected static List<UIManagerEventAdapter> | ui_event_history | 
| protected static CopyOnWriteList<UIManagerEventListener> | ui_event_listeners | 
| protected static List<UIInstanceFactory> | ui_factories | 
| protected static CopyOnWriteList<Object[]> | ui_listeners | 
| Fields inherited from interface org.gudy.azureus2.plugins.ui.UIManager | 
|---|
| MB_PARAM_AUTO_CLOSE_MS, MB_PARAM_REMEMBER_BY_DEF, MB_PARAM_REMEMBER_ID, MB_PARAM_REMEMBER_RES | 
| Constructor Summary | |
|---|---|
| UIManagerImpl(PluginInterface _pi) | |
| Method Summary | |
|---|---|
|  void | addDataSourceListener(UIDataSourceListener l,
                      boolean triggerNow) | 
|  void | addUIEventListener(UIManagerEventListener listener) | 
|  void | addUIListener(UIManagerListener listener)Listen for UIManagerListener.UIAttached(UIInstance)andUIManagerListener.UIDetached(UIInstance)events. | 
|  void | attachUI(UIInstanceFactory factory)attach a new UI | 
|  void | attachUI(UIInstanceFactory factory,
         IUIIntializer init) | 
|  void | copyToClipBoard(String data) | 
|  BasicPluginConfigModel | createBasicPluginConfigModel(String section_name) | 
|  BasicPluginConfigModel | createBasicPluginConfigModel(String parent_section,
                             String section_name)Creates a basic plugin view model and adds it to the plugin in one step. | 
|  BasicPluginViewModel | createBasicPluginViewModel(String name)Creates a basic plugin view model and adds it to the plugin in one step. | 
|  BasicPluginViewModel | createLoggingViewModel(LoggerChannel channel,
                       boolean use_plugin_name)Creates a BasicPluginViewModelobject primarily to be used for
 storing logging output. | 
|  UIMessage | createMessage()Retrieves a UIMessagefrom any interface available, or
 returns null if one is not available. | 
|  void | destroy(BasicPluginConfigModel model) | 
|  void | destroy(BasicPluginViewModel model) | 
|  void | detachUI(UIInstanceFactory factory)detach a UI - can fail if the UI doesn't support detaching | 
| static boolean | fireEvent(PluginInterface pi,
          int type,
          Object data) | 
| static boolean | fireEvent(UIManagerEventAdapter event) | 
|  Object | getDataSource() | 
|  UIInputReceiver | getInputReceiver()Retrieves a UIInputReceiverfrom any interface available, or
 returns null if one is not available. | 
|  MenuManager | getMenuManager()Retrieve the menu manager. | 
|  PluginConfigModel[] | getPluginConfigModels() | 
|  PluginInterface | getPluginInterface() | 
|  TableManager | getTableManager()Retrieve the Table Manager | 
|  UIInstance[] | getUIInstances()Returns an array of all currently attached user interfaces. | 
|  boolean | hasUIInstances()Returns true if there any user interfaces currently attached to Azureus. | 
| static void | initialisationComplete() | 
|  void | openFile(File file)Opens up the file using the associated application. | 
|  void | openTorrent(Torrent torrent) | 
|  void | openURL(URL url) | 
|  void | removeDataSourceListener(UIDataSourceListener l) | 
|  void | removeUIEventListener(UIManagerEventListener listener) | 
|  void | removeUIListener(UIManagerListener listener)Remove an existing UIManagerListener | 
|  void | setEverythingHidden(boolean hidden) | 
|  boolean | showConfigSection(String sectionID)Open Config View to the section specified | 
|  void | showFile(File file)Shows the file in a file explorer application in its parent folder. | 
|  long | showMessageBox(String title_resource,
               String message_resource,
               long message_map) | 
|  long | showMessageBox(String title_resource,
               String message_resource,
               long message_map,
               Map<String,Object> params) | 
|  long | showMessageBox(String title_resource,
               String message_resource,
               long message_map,
               Object[] params) | 
|  void | showTextMessage(String title_resource,
                String message_resource,
                String contents) | 
| static void | unload(PluginInterface pi) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected static AEMonitor class_mon
protected static boolean initialisation_complete
protected static CopyOnWriteList<Object[]> ui_listeners
protected static CopyOnWriteList<UIManagerEventListener> ui_event_listeners
protected static List<UIInstanceFactory> ui_factories
protected static List<UIManagerEventAdapter> ui_event_history
protected static List<BasicPluginConfigModel> configModels
protected PluginInterface pi
protected TableManager table_manager
protected MenuManager menu_manager
| Constructor Detail | 
|---|
public UIManagerImpl(PluginInterface _pi)
| Method Detail | 
|---|
public PluginInterface getPluginInterface()
public BasicPluginViewModel createBasicPluginViewModel(String name)
UIManager
createBasicPluginViewModel in interface UIManagername - The name for the view (this should be localised text, rather
     than a message string).
public void destroy(BasicPluginViewModel model)
public BasicPluginConfigModel createBasicPluginConfigModel(String section_name)
createBasicPluginConfigModel in interface UIManager
public BasicPluginConfigModel createBasicPluginConfigModel(String parent_section,
                                                           String section_name)
UIManager
createBasicPluginConfigModel in interface UIManagersection_name - see ConfigSection.SECTION_*
public void destroy(BasicPluginConfigModel model)
public PluginConfigModel[] getPluginConfigModels()
getPluginConfigModels in interface UIManager
public void copyToClipBoard(String data)
                     throws UIException
copyToClipBoard in interface UIManagerUIException
public void openURL(URL url)
             throws UIException
openURL in interface UIManagerUIExceptionpublic TableManager getTableManager()
UIManager
getTableManager in interface UIManagerpublic MenuManager getMenuManager()
UIManager
getMenuManager in interface UIManagerpublic static void initialisationComplete()
public void attachUI(UIInstanceFactory factory)
              throws UIException
UIManager
attachUI in interface UIManagerUIException
public void attachUI(UIInstanceFactory factory,
                     IUIIntializer init)
public void detachUI(UIInstanceFactory factory)
              throws UIException
UIManager
detachUI in interface UIManagerUIExceptionpublic void addUIListener(UIManagerListener listener)
UIManagerUIManagerListener.UIAttached(UIInstance) and
 UIManagerListener.UIDetached(UIInstance) events.  Typically,
 you hook this listener so you can access UISWTInstance when it
 gets created.
addUIListener in interface UIManagerpublic void removeUIListener(UIManagerListener listener)
UIManagerUIManagerListener
removeUIListener in interface UIManagerlistener - Listener to removepublic void addUIEventListener(UIManagerEventListener listener)
addUIEventListener in interface UIManagerpublic void removeUIEventListener(UIManagerEventListener listener)
removeUIEventListener in interface UIManagerpublic boolean hasUIInstances()
UIManager
hasUIInstances in interface UIManagerpublic UIInstance[] getUIInstances()
UIManager
getUIInstances in interface UIManager
public static boolean fireEvent(PluginInterface pi,
                                int type,
                                Object data)
public static boolean fireEvent(UIManagerEventAdapter event)
public void showTextMessage(String title_resource,
                            String message_resource,
                            String contents)
showTextMessage in interface UIManager
public long showMessageBox(String title_resource,
                           String message_resource,
                           long message_map)
showMessageBox in interface UIManagermessage_map - - see UIManagerEvent.MT_x
public long showMessageBox(String title_resource,
                           String message_resource,
                           long message_map,
                           Object[] params)
showMessageBox in interface UIManagermessage_map - - see UIManagerEvent.MT_xparams - - [ remember-id (String), remember-by-default (Boolean), remember-resource (String) ]
public long showMessageBox(String title_resource,
                           String message_resource,
                           long message_map,
                           Map<String,Object> params)
showMessageBox in interface UIManagerpublic void openTorrent(Torrent torrent)
openTorrent in interface UIManagerpublic void openFile(File file)
UIManager
openFile in interface UIManagerfile - The file to open.public void showFile(File file)
UIManager
showFile in interface UIManagerfile - The file to show.public boolean showConfigSection(String sectionID)
UIManager
showConfigSection in interface UIManagersectionID - ID of section to open to.
         ConfigSection.SECTION_* constants
public UIInputReceiver getInputReceiver()
UIManagerUIInputReceiver from any interface available, or
 returns null if one is not available. This is a convenience
 method to allow you to grab an instance without having to iterate over
 any attached interfaces.
getInputReceiver in interface UIManagerUIInstance.getInputReceiver()public UIMessage createMessage()
UIManagerUIMessage from any interface available, or
 returns null if one is not available. This is a convenience
 method to allow you to grab an instance without having to iterate over
 any attached interfaces.
createMessage in interface UIManagerUIInstance.createMessage()
public BasicPluginViewModel createLoggingViewModel(LoggerChannel channel,
                                                   boolean use_plugin_name)
UIManagerBasicPluginViewModel object primarily to be used for
 storing logging output. This is just a shortcut way of creating a log
 view for the logger channel.
createLoggingViewModel in interface UIManagerchannel - The LoggerChannel to associate with.use_plugin_name - If set to true, the log view will be
   taken from the plugin name, if false, it will be taken from
   the channel name.public void setEverythingHidden(boolean hidden)
setEverythingHidden in interface UIManagerpublic static void unload(PluginInterface pi)
public void addDataSourceListener(UIDataSourceListener l,
                                  boolean triggerNow)
addDataSourceListener in interface UIManagerpublic void removeDataSourceListener(UIDataSourceListener l)
removeDataSourceListener in interface UIManagerpublic Object getDataSource()
getDataSource in interface UIManager| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||