uk.ac.soton.ecs.iam.grid.client.swing
Class ConversationBrowser

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by uk.ac.soton.ecs.iam.grid.client.swing.ConversationBrowser
All Implemented Interfaces:
DragGestureListener, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants, InvocationListener, StateRepositoryListener

public class ConversationBrowser
extends JFrame
implements DragGestureListener, ActionListener, InvocationListener, StateRepositoryListener

A swing component that allows browsing of a StateRepository.

There are three areas of the ConversationBrowser

ResourceBrowsingPanel - allows users to browser the resources and services in the StateRepository using different Resource Views @see uk.ac.soton.itinnovation.grid.client.swing.ResourceView

ResourceViewingPanel - Provides details of the resource or service selected in the ResourceBrowsingPanel. Each resource or service is display in a ResourcePropertiesPanel @see uk.ac.soton.itinnovation.grid.client.swing.ResourcePropertiesPanel

LoggingPanel - Provides a log of the users interaction with resources and services

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String ACTION_ADD_SERVICE
           
static String ACTION_CLOSE
           
static String ACTION_DISCOVER
           
static String ACTION_FORGET
           
static String ACTION_REFRESH
           
static String ACTION_REFRESH_EPRS
           
static String ACTION_RENAME
           
static String ACTION_UPDATE_EPR
           
static String ACTION_VIEW_EPR
           
static ArrayList<PluginHook> plugins
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ConversationBrowser(StateRepository repos)
          Create a new browser for this StateRepository.
 
Method Summary
 void actionPerformed(ActionEvent event)
           
 void addAvailableFilter(ResourceFilter filter)
          Adds a ResourceFilter to the list of available Resource Filters that can be created by the client
 void addAvailableRule(Class<? extends ResourceRule> rule)
          Adds a ResourceRule Class to the list of available Resource Rules that can be created by the client
 void addFilter(ResourceFilter filter)
          Adds a Filter to the list of pre-fabricated Filters available to the client
 SOAPHeaderElement[] addHeadersForCall(StateRepository repos, StorableInStateRepository proxy, Method method)
           
static void addPlugin(PluginHook plugin)
          Add a plug-in to the list.
 void destroy(WSResourceLifetime c)
           
 void discoverResources(RemoteService service)
           
 void doAction(String action)
           
 void doAction(String action, StorableInStateRepository c)
           
 void dragGestureRecognized(DragGestureEvent dge)
           
 void forget(StorableInStateRepository c)
           
 void getEPR(ResourceMetadata rmd, boolean display)
           
 StateRepository getRepository()
           
 ResourcePropertiesPanel getResourcePropertiesPanel(StorableInStateRepository item)
           
 ArrayList<ResourceView> getResourceViews()
           
 Object getSelectedObject()
          Return the user object for the single selected tree node, or null if there isn't exactly one selected.
 void importGridResource(StorableInStateRepository source, JComponent dropTarget)
           
 void importLocalFile(File localFile)
           
 void invocationDone(StorableInStateRepository object, Method method)
          SOAP call ended.
 void invocationDone(String name)
           
 void invocationStarted(StorableInStateRepository object, Method method)
          SOAP call starting.
 void invocationStarted(String name)
           
 void itemsSelected(Object[] items)
          Notification that items have been selected by the user Update the ResourceViews to show the selected resources
static void removePlugin(PluginHook plugin)
          Remove a plugin previous added with addPlugin(uk.ac.soton.ecs.iam.grid.client.swing.PluginHook).
 void rename(StorableInStateRepository c)
           
 void repositoryChanged(RepositoryChangedEvent event)
           
 void runThread(ThrowingRunnable runnable, String message)
          Execute 'runnable' in a new thread.
 void setBusy(String operation)
          Deprecated. the busy indicator works automatically now
 void showPopupMenu(Object[] items, MouseEvent e)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

plugins

public static ArrayList<PluginHook> plugins

ACTION_REFRESH

public static final String ACTION_REFRESH
See Also:
Constant Field Values

ACTION_REFRESH_EPRS

public static final String ACTION_REFRESH_EPRS
See Also:
Constant Field Values

ACTION_CLOSE

public static final String ACTION_CLOSE
See Also:
Constant Field Values

ACTION_RENAME

public static final String ACTION_RENAME
See Also:
Constant Field Values

ACTION_UPDATE_EPR

public static final String ACTION_UPDATE_EPR
See Also:
Constant Field Values

ACTION_VIEW_EPR

public static final String ACTION_VIEW_EPR
See Also:
Constant Field Values

ACTION_ADD_SERVICE

public static final String ACTION_ADD_SERVICE
See Also:
Constant Field Values

ACTION_DISCOVER

public static final String ACTION_DISCOVER
See Also:
Constant Field Values

ACTION_FORGET

public static final String ACTION_FORGET
See Also:
Constant Field Values
Constructor Detail

ConversationBrowser

public ConversationBrowser(StateRepository repos)
Create a new browser for this StateRepository.

Method Detail

getResourceViews

public ArrayList<ResourceView> getResourceViews()

actionPerformed

public void actionPerformed(ActionEvent event)
Specified by:
actionPerformed in interface ActionListener

repositoryChanged

public void repositoryChanged(RepositoryChangedEvent event)
Specified by:
repositoryChanged in interface StateRepositoryListener

getRepository

public StateRepository getRepository()

getResourcePropertiesPanel

public ResourcePropertiesPanel getResourcePropertiesPanel(StorableInStateRepository item)

importLocalFile

public void importLocalFile(File localFile)
                     throws RemoteException
Throws:
RemoteException

importGridResource

public void importGridResource(StorableInStateRepository source,
                               JComponent dropTarget)
                        throws RemoteException
Throws:
RemoteException

doAction

public void doAction(String action)
              throws RemoteException,
                     ObjectAlreadyExists
Throws:
RemoteException
ObjectAlreadyExists

doAction

public void doAction(String action,
                     StorableInStateRepository c)
              throws RemoteException,
                     ObjectAlreadyExists
Throws:
RemoteException
ObjectAlreadyExists

setBusy

@Deprecated
public void setBusy(String operation)
Deprecated. the busy indicator works automatically now

Indicate to the user than an operation is in progress.

Parameters:
operation - the text to display to the user, or null to indicate that the operation has finished.

forget

public void forget(StorableInStateRepository c)
            throws RemoteException
Throws:
RemoteException

rename

public void rename(StorableInStateRepository c)
            throws RemoteException
Throws:
RemoteException

discoverResources

public void discoverResources(RemoteService service)
                       throws RemoteException,
                              MalformedURLException
Throws:
RemoteException
MalformedURLException

getSelectedObject

public Object getSelectedObject()
Return the user object for the single selected tree node, or null if there isn't exactly one selected.


dragGestureRecognized

public void dragGestureRecognized(DragGestureEvent dge)
Specified by:
dragGestureRecognized in interface DragGestureListener

addFilter

public void addFilter(ResourceFilter filter)
Adds a Filter to the list of pre-fabricated Filters available to the client

Parameters:
filter - the filter to be added

addAvailableFilter

public void addAvailableFilter(ResourceFilter filter)
Adds a ResourceFilter to the list of available Resource Filters that can be created by the client

Parameters:
filter - the resource filter class to be added

addAvailableRule

public void addAvailableRule(Class<? extends ResourceRule> rule)
Adds a ResourceRule Class to the list of available Resource Rules that can be created by the client

Parameters:
rule - the resource rule class to be added

itemsSelected

public void itemsSelected(Object[] items)
Notification that items have been selected by the user Update the ResourceViews to show the selected resources

Parameters:
items - the items that have been selected

addPlugin

public static void addPlugin(PluginHook plugin)
Add a plug-in to the list. Plugin hooks are invoked are various points in the operation of the browser, allowing its functionality to be extended.

Parameters:
plugin - the plugin to add

removePlugin

public static void removePlugin(PluginHook plugin)
Remove a plugin previous added with addPlugin(uk.ac.soton.ecs.iam.grid.client.swing.PluginHook).

Parameters:
plugin - the plugin to be removed

runThread

public void runThread(ThrowingRunnable runnable,
                      String message)
Execute 'runnable' in a new thread. If the method throws an exception, it is displayed in an error box.

Parameters:
runnable - object with run() method
message - message to display while running

invocationStarted

public void invocationStarted(StorableInStateRepository object,
                              Method method)
Description copied from interface: InvocationListener
SOAP call starting. Called by RemoteResourceProxy to indicate that a SOAP invocation is about to start. This can be used to display a 'busy' indicator.

Specified by:
invocationStarted in interface InvocationListener

invocationDone

public void invocationDone(StorableInStateRepository object,
                           Method method)
Description copied from interface: InvocationListener
SOAP call ended. Called by RemoteResourceProxy to indicate that a SOAP invocation has finished. This can be used to hide the 'busy' indicator set by InvocationListener.invocationStarted(uk.ac.soton.ecs.iam.grid.comms.client.StorableInStateRepository, java.lang.reflect.Method).

Specified by:
invocationDone in interface InvocationListener

invocationStarted

public void invocationStarted(String name)

invocationDone

public void invocationDone(String name)

addHeadersForCall

public SOAPHeaderElement[] addHeadersForCall(StateRepository repos,
                                             StorableInStateRepository proxy,
                                             Method method)
Specified by:
addHeadersForCall in interface InvocationListener

showPopupMenu

public void showPopupMenu(Object[] items,
                          MouseEvent e)

getEPR

public void getEPR(ResourceMetadata rmd,
                   boolean display)

destroy

public void destroy(WSResourceLifetime c)


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