|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.pluginsimpl.local.ui.UIManagerImpl
public class UIManagerImpl
Field Summary | |
---|---|
protected static AEMonitor |
class_mon
|
protected static java.util.List<BasicPluginConfigModel> |
configModels
|
protected static boolean |
initialisation_complete
|
protected MenuManager |
menu_manager
|
protected PluginInterface |
pi
|
protected TableManager |
table_manager
|
protected static java.util.List<UIManagerEventAdapter> |
ui_event_history
|
protected static CopyOnWriteList<UIManagerEventListener> |
ui_event_listeners
|
protected static java.util.List<UIInstanceFactory> |
ui_factories
|
protected static CopyOnWriteList<java.lang.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) and
UIManagerListener.UIDetached(UIInstance) events. |
void |
attachUI(UIInstanceFactory factory)
attach a new UI |
void |
attachUI(UIInstanceFactory factory,
IUIIntializer init)
|
void |
copyToClipBoard(java.lang.String data)
|
BasicPluginConfigModel |
createBasicPluginConfigModel(java.lang.String section_name)
|
BasicPluginConfigModel |
createBasicPluginConfigModel(java.lang.String parent_section,
java.lang.String section_name)
Creates a basic plugin view model and adds it to the plugin in one step. |
BasicPluginViewModel |
createBasicPluginViewModel(java.lang.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 BasicPluginViewModel object primarily to be used for
storing logging output. |
UIMessage |
createMessage()
Retrieves a UIMessage from 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,
java.lang.Object data)
|
static boolean |
fireEvent(UIManagerEventAdapter event)
|
java.lang.Object |
getDataSource()
|
UIInputReceiver |
getInputReceiver()
Retrieves a UIInputReceiver from 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(java.io.File file)
Opens up the file using the associated application. |
void |
openTorrent(Torrent torrent)
|
void |
openURL(java.net.URL url)
|
void |
removeDataSourceListener(UIDataSourceListener l)
|
void |
removeUIEventListener(UIManagerEventListener listener)
|
void |
removeUIListener(UIManagerListener listener)
Remove an existing UIManagerListener |
void |
setEverythingHidden(boolean hidden)
|
boolean |
showConfigSection(java.lang.String sectionID)
Open Config View to the section specified |
void |
showFile(java.io.File file)
Shows the file in a file explorer application in its parent folder. |
long |
showMessageBox(java.lang.String title_resource,
java.lang.String message_resource,
long message_map)
|
long |
showMessageBox(java.lang.String title_resource,
java.lang.String message_resource,
long message_map,
java.util.Map<java.lang.String,java.lang.Object> params)
|
long |
showMessageBox(java.lang.String title_resource,
java.lang.String message_resource,
long message_map,
java.lang.Object[] params)
|
void |
showTextMessage(java.lang.String title_resource,
java.lang.String message_resource,
java.lang.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<java.lang.Object[]> ui_listeners
protected static CopyOnWriteList<UIManagerEventListener> ui_event_listeners
protected static java.util.List<UIInstanceFactory> ui_factories
protected static java.util.List<UIManagerEventAdapter> ui_event_history
protected static java.util.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(java.lang.String name)
UIManager
createBasicPluginViewModel
in interface UIManager
name
- The name for the view (this should be localised text, rather
than a message string).
public void destroy(BasicPluginViewModel model)
public BasicPluginConfigModel createBasicPluginConfigModel(java.lang.String section_name)
createBasicPluginConfigModel
in interface UIManager
public BasicPluginConfigModel createBasicPluginConfigModel(java.lang.String parent_section, java.lang.String section_name)
UIManager
createBasicPluginConfigModel
in interface UIManager
section_name
- see ConfigSection
.SECTION_*
public void destroy(BasicPluginConfigModel model)
public PluginConfigModel[] getPluginConfigModels()
getPluginConfigModels
in interface UIManager
public void copyToClipBoard(java.lang.String data) throws UIException
copyToClipBoard
in interface UIManager
UIException
public void openURL(java.net.URL url) throws UIException
openURL
in interface UIManager
UIException
public TableManager getTableManager()
UIManager
getTableManager
in interface UIManager
public MenuManager getMenuManager()
UIManager
getMenuManager
in interface UIManager
public static void initialisationComplete()
public void attachUI(UIInstanceFactory factory) throws UIException
UIManager
attachUI
in interface UIManager
UIException
public void attachUI(UIInstanceFactory factory, IUIIntializer init)
public void detachUI(UIInstanceFactory factory) throws UIException
UIManager
detachUI
in interface UIManager
UIException
public void addUIListener(UIManagerListener listener)
UIManager
UIManagerListener.UIAttached(UIInstance)
and
UIManagerListener.UIDetached(UIInstance)
events. Typically,
you hook this listener so you can access UISWTInstance
when it
gets created.
addUIListener
in interface UIManager
public void removeUIListener(UIManagerListener listener)
UIManager
UIManagerListener
removeUIListener
in interface UIManager
listener
- Listener to removepublic void addUIEventListener(UIManagerEventListener listener)
addUIEventListener
in interface UIManager
public void removeUIEventListener(UIManagerEventListener listener)
removeUIEventListener
in interface UIManager
public boolean hasUIInstances()
UIManager
hasUIInstances
in interface UIManager
public UIInstance[] getUIInstances()
UIManager
getUIInstances
in interface UIManager
public static boolean fireEvent(PluginInterface pi, int type, java.lang.Object data)
public static boolean fireEvent(UIManagerEventAdapter event)
public void showTextMessage(java.lang.String title_resource, java.lang.String message_resource, java.lang.String contents)
showTextMessage
in interface UIManager
public long showMessageBox(java.lang.String title_resource, java.lang.String message_resource, long message_map)
showMessageBox
in interface UIManager
message_map
- - see UIManagerEvent.MT_x
public long showMessageBox(java.lang.String title_resource, java.lang.String message_resource, long message_map, java.lang.Object[] params)
showMessageBox
in interface UIManager
message_map
- - see UIManagerEvent.MT_xparams
- - [ remember-id (String), remember-by-default (Boolean), remember-resource (String) ]
public long showMessageBox(java.lang.String title_resource, java.lang.String message_resource, long message_map, java.util.Map<java.lang.String,java.lang.Object> params)
showMessageBox
in interface UIManager
public void openTorrent(Torrent torrent)
openTorrent
in interface UIManager
public void openFile(java.io.File file)
UIManager
openFile
in interface UIManager
file
- The file to open.public void showFile(java.io.File file)
UIManager
showFile
in interface UIManager
file
- The file to show.public boolean showConfigSection(java.lang.String sectionID)
UIManager
showConfigSection
in interface UIManager
sectionID
- ID of section to open to.
ConfigSection
.SECTION_* constants
public UIInputReceiver getInputReceiver()
UIManager
UIInputReceiver
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 UIManager
UIInstance.getInputReceiver()
public UIMessage createMessage()
UIManager
UIMessage
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 UIManager
UIInstance.createMessage()
public BasicPluginViewModel createLoggingViewModel(LoggerChannel channel, boolean use_plugin_name)
UIManager
BasicPluginViewModel
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 UIManager
channel
- 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 UIManager
public static void unload(PluginInterface pi)
public void addDataSourceListener(UIDataSourceListener l, boolean triggerNow)
addDataSourceListener
in interface UIManager
public void removeDataSourceListener(UIDataSourceListener l)
removeDataSourceListener
in interface UIManager
public java.lang.Object getDataSource()
getDataSource
in interface UIManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |