com.sas.actionprovider
Class SwingActionProvider

com.sas.actionprovider.SwingActionProvider
All Implemented Interfaces:
com.sas.collection.ContentsChangedSource

public class SwingActionProvider
implements com.sas.collection.ContentsChangedSource

The SwingActionProvider class, in conjunction with other parts of the ActionProvider Framework (APF), is used by Swing components as a mechanism for acquiring renderable Actions for specific viewable areas of the component.

Components that implement the SwingActionProviderViewInterface may query a SwingActionProvider for Actions via its getActions() method.

The acquired Actions encapsulate the information needed by the component to represent the Action visually and to have its associated command, when present, executed.

Additionally, this class allows users to customize the Actions available to a particular component type or instance.

Many implementations of SwingActionProviderViewInterface instantiate their own SwingActionProvider internally. For those that do not, one may be given to the Component as follows:

SwingActionProvider ap = new SwingActionProvider();
((SwingActionProviderViewInterface)viewer).setActionProvider(ap);


A basic understanding of the ActionProviderFramework, of which this class is a part, is recommended before attempting to use this class.


Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

Since:
3.0

Constructor Summary
SwingActionProvider()
          Default constructor
 
Method Summary
 void fireContentsChanged(ActionProviderEvent event)
          Sends a ContentsChangedEvent event to all the ContentsChangedListener objects in the listener list.
 
Methods inherited from class com.sas.actionprovider.BaseActionProvider
addContentsChangedListener, getAction, getActionOrderList, getActions, getDefaultAction, getLocale, getName, listActionTypes, listAreaTypes, listDefaultActions, newActionInstance, removeContentsChangedListener, setAction, setActionOrderList, setLocale, setName
 

Constructor Detail

SwingActionProvider

public SwingActionProvider()
Default constructor

Method Detail

fireContentsChanged

public void fireContentsChanged(ActionProviderEvent event)
Sends a ContentsChangedEvent event to all the ContentsChangedListener objects in the listener list.

The event is sent only to each item which is in the list at the time this method is called, even if adds or removes are performed after the this method has started. Also sends the event, which extends PropertyChangeEvent, to all registered property change listeners.

Parameters:
event - the event to send
See Also:
BaseActionProvider.addContentsChangedListener(com.sas.collection.ContentsChangedListener), BaseActionProvider.removeContentsChangedListener(com.sas.collection.ContentsChangedListener)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.