OME
Class ViewContext

java.lang.Object
  |
  +--OME.ViewContext

public class ViewContext
extends java.lang.Object

This class is convey certain information about the state of a particular view to a PluginMethod when the latter is called. At the moment the information conveyed includes

  • the objects within the view that are selected
  • the location of the mouse-click that caused the to be called.
  • an object in the view to be associated with this call to the PluginMethod.


    Method Summary
     View.Location associatedLocation()
              Returns the View.Location associated with the initiation of the call to the method (typically a mouse click).
     ViewObject associatedObject()
              Returns the ViewObject that is at the associatedLocation (if any).
     java.util.Collection selectedObjects()
              Returns a Collection of ViewObjects that were selected when the method was intiated.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Method Detail

    associatedLocation

    public View.Location associatedLocation()
    Returns the View.Location associated with the initiation of the call to the method (typically a mouse click). This method returns null if no Location can be associated with the event.

    associatedObject

    public ViewObject associatedObject()
    Returns the ViewObject that is at the associatedLocation (if any).

    selectedObjects

    public java.util.Collection selectedObjects()
    Returns a Collection of ViewObjects that were selected when the method was intiated.