uk.ac.soton.itinnovation.grid.client.job
Class JobClientPlugin

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.client.job.JobClientPlugin
All Implemented Interfaces:
PluginHook, PluginHookExtensions, GridClientPluginProvider

public class JobClientPlugin
extends Object
implements GridClientPluginProvider, PluginHook, PluginHookExtensions

Grid client plugin for the job service. This plugin extends the Grid client to allow it to use the Grid job service. It registers the objects relating to the service and also extends the client's Swing interface to add menu actions for these resources.

See Also:
for details of the client's plugin system

Nested Class Summary
 class JobClientPlugin.JobDetailsThread
           
 class JobClientPlugin.JobMonitorDetailsThread
           
 class JobClientPlugin.JobServiceDetailsThread
           
 class JobClientPlugin.NewJobJSDLThread
           
 class JobClientPlugin.NewJobThread
           
 
Constructor Summary
JobClientPlugin()
           
 
Method Summary
 void addFilters(ConversationBrowser browser)
          Add Filters for this Plugin
 void addPluginMenu(ConversationBrowser browser, JMenu menu)
          Add Menu for this Plugin
 void addProperties(ResourcePropertiesPanel panel)
          Create a Panel to display a resource
 int compare(StorableInStateRepository s1, StorableInStateRepository s2)
          Compare
 boolean doDoubleClick(ConversationBrowser browser, StorableInStateRepository item)
          Do a double click on a resource.
 boolean doDragDrop(ConversationBrowser browser, Object source, Object target)
          Object 'source' has been dragged on to 'target'.
 String getState(ConversationBrowser browser, StorableInStateRepository s)
          gets the status of a resource
 Icon getTreeIcon(ConversationBrowser browser, StorableInStateRepository item)
          Get an icon representing this resource
 void initPlugin()
          Initialise the plugin.
 void showPopupMenu(ConversationBrowser browser, JPopupMenu menu, Object[] items)
          Add extra menu items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobClientPlugin

public JobClientPlugin()
Method Detail

initPlugin

public void initPlugin()
Description copied from interface: GridClientPluginProvider
Initialise the plugin. At start-up, the Grid client calls this method on each plugin to initialise it.

The plugin should register itself with other components as appropriate.

Specified by:
initPlugin in interface GridClientPluginProvider
See Also:
RemoteServiceImpl.registerPortType(javax.xml.namespace.QName, Class), ImplementationFactory.registerImplementation(Class, Class), ConversationBrowser.addPlugin(uk.ac.soton.ecs.iam.grid.client.swing.PluginHook)

showPopupMenu

public void showPopupMenu(ConversationBrowser browser,
                          JPopupMenu menu,
                          Object[] items)
Description copied from interface: PluginHook
Add extra menu items. This is called when the user opens the popup menu. All selected items have the same class.

Specified by:
showPopupMenu in interface PluginHook
Parameters:
browser - the browser opening the menu
menu - the menu being created
items - the objects currently selected

addProperties

public void addProperties(ResourcePropertiesPanel panel)
Description copied from interface: PluginHook
Create a Panel to display a resource

Specified by:
addProperties in interface PluginHook

doDoubleClick

public boolean doDoubleClick(ConversationBrowser browser,
                             StorableInStateRepository item)
Description copied from interface: PluginHook
Do a double click on a resource.

Specified by:
doDoubleClick in interface PluginHook
Returns:
true if the click was handled

getTreeIcon

public Icon getTreeIcon(ConversationBrowser browser,
                        StorableInStateRepository item)
Description copied from interface: PluginHook
Get an icon representing this resource

Specified by:
getTreeIcon in interface PluginHook
Returns:
the icon

addFilters

public void addFilters(ConversationBrowser browser)
Description copied from interface: PluginHookExtensions
Add Filters for this Plugin

Specified by:
addFilters in interface PluginHookExtensions

addPluginMenu

public void addPluginMenu(ConversationBrowser browser,
                          JMenu menu)
Description copied from interface: PluginHookExtensions
Add Menu for this Plugin

Specified by:
addPluginMenu in interface PluginHookExtensions

getState

public String getState(ConversationBrowser browser,
                       StorableInStateRepository s)
Description copied from interface: PluginHookExtensions
gets the status of a resource

Specified by:
getState in interface PluginHookExtensions

compare

public int compare(StorableInStateRepository s1,
                   StorableInStateRepository s2)
Description copied from interface: PluginHookExtensions
Compare

Specified by:
compare in interface PluginHookExtensions

doDragDrop

public boolean doDragDrop(ConversationBrowser browser,
                          Object source,
                          Object target)
Description copied from interface: PluginHook
Object 'source' has been dragged on to 'target'. Source and target are often, but not always, of type StorableInStateRepository.

Specified by:
doDragDrop in interface PluginHook
source - the item being dropped, this may be another object in the repository, a URI, a local File, etc.
target - the item which source was dropped on
Returns:
true if the drag has been handled, or false to try other handlers


Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.