com.sas.util
Interface ContextCommandsConsumerInterface

All Known Implementing Classes:
CommandManager, PopupMenuAdapter, PopupMenuAdapter

public interface ContextCommandsConsumerInterface

Defines an interface for context command consumers. A context command consumer is an object that has the following responsibilities:

Most implementations will want to utilize the one provided by CommandManager.

See Also:
ContextCommandsInterface, CommandManager

Method Summary
 void addContextCommandsProducer(ContextCommandsInterface producer)
          Registers a new context commands producer.
 ContextCommandsInterface[] getContextCommandsProducers()
          Returns the set of context command producers that have been registered via addContextCommandsProducer().
 void removeContextCommandsProducer(ContextCommandsInterface producer)
          Unregisters a context commands producer.
 

Method Detail

getContextCommandsProducers

ContextCommandsInterface[] getContextCommandsProducers()
Returns the set of context command producers that have been registered via addContextCommandsProducer(). The order of the set will reflect the order of registration.

Implementation note: If the implementing class is itself a producer of context commands, it should add itself by calling addContextCommandsProducer(this) in initialize(). Thus the object would be included in the list returned by getContextCommandsProducers(), and would allow a user of the object to remove it via removeContextCommandsProducer().

Returns:
The set of producers; an empty set will be represented by a zero-length array.
See Also:
addContextCommandsProducer(com.sas.util.ContextCommandsInterface)

addContextCommandsProducer

void addContextCommandsProducer(ContextCommandsInterface producer)
Registers a new context commands producer. Does nothing if the producer has already been registered. The producer will be queried for commands whenever this component needs context commands, such as when populating a popup menu.

Parameters:
producer - An object that implements ContextCommandsInterface.
See Also:
removeContextCommandsProducer(com.sas.util.ContextCommandsInterface)

removeContextCommandsProducer

void removeContextCommandsProducer(ContextCommandsInterface producer)
Unregisters a context commands producer. Does nothing if the producer was not registered.

Parameters:
producer - An object previously passed to addContextCommandsProducer().
See Also:
addContextCommandsProducer(com.sas.util.ContextCommandsInterface)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.