com.novell.application.console.snapin.scope
Class GlobalViewScope

java.lang.Object
  |
  +--com.novell.application.console.snapin.scope.GlobalViewScope
All Implemented Interfaces:
Scope, java.io.Serializable

public class GlobalViewScope
extends java.lang.Object
implements Scope

Defines a scope that is global but restricted to when a certain view is active.

Menu, Toolbar, Status Bar, Popup Menu and Dynamic snap-ins may be registered with the GlobalViewScope scope. When registered, the functionality provided by these snap-ins becomes active when a view with the specified unique ID is selected by the user.

The following code snippet is an example of registering a toolbar item snap-in with the GlobalViewScope scope.


      public RegistrationItem[] getRegistration()
      {
          GlobalViewScope scope;
          scope = new GlobalViewScope(Shell.SNAPIN_TOOLBARITEM, "View UniqueID");
          return new RegistrationItem[]
          {
              new RegistrationItem(scope, getClass().getName())
          };
      }
 

See Also:
Scope

Constructor Summary
GlobalViewScope(java.lang.Object snapinType, java.lang.String viewUniqueID)
          Builds a GlobalViewScope for the specified snapinType, but restricted to view objects with the specified view uniqueID.
 
Method Summary
 java.lang.Object getSnapinType()
          Returns the snap-in type object that was passed in the constructor.
 java.lang.String getViewUniqueID()
          Return the view unique ID for this scope instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalViewScope

public GlobalViewScope(java.lang.Object snapinType,
                       java.lang.String viewUniqueID)
Builds a GlobalViewScope for the specified snapinType, but restricted to view objects with the specified view uniqueID.

The snap-in types that can be used for the GlobalViewScope are:

Parameters:
snapinType - The type of the snap-in as defined above.
viewUniqueID - The uniqueID that uniquely identifies the view. It is returned from the getViewUniqueID() method.
Method Detail

getSnapinType

public java.lang.Object getSnapinType()
Returns the snap-in type object that was passed in the constructor.
Specified by:
getSnapinType in interface Scope
Returns:
The snap-in type object.

getViewUniqueID

public java.lang.String getViewUniqueID()
Return the view unique ID for this scope instance.
Returns:
The view unique ID.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
ConsoleOne is a registered trademark of Novell Inc.
Generated December 9 2003 1727.