org.openide.util 8.6.1

org.openide.util.actions
Class ActionPresenterProvider

java.lang.Object
  extended by org.openide.util.actions.ActionPresenterProvider

public abstract class ActionPresenterProvider
extends Object

Provider of action presentations. Based on type of the action should be able to derive its menu, popup menu and toolbar presenter.

In order to provide greater flexibility this is made as a pluggable component to allow other parts of the system to provide more enhanced visualizations.

Since:
8.1

Constructor Summary
protected ActionPresenterProvider()
          Subclass constructor.
 
Method Summary
abstract  Component[] convertComponents(Component comp)
          Used for implementation of DynamicMenuContent.
abstract  JPopupMenu createEmptyPopup()
          Creates a default empty implementation of popup menu.
abstract  JMenuItem createMenuPresenter(Action action)
          Creates a menu item that can present this action in a JMenu.
abstract  JMenuItem createPopupPresenter(Action action)
          Get a menu item that can present this action in a JPopupMenu.
abstract  Component createToolbarPresenter(Action action)
          Get a component that can present this action in a JToolBar.
static ActionPresenterProvider getDefault()
          Gets the default implementation from lookup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionPresenterProvider

protected ActionPresenterProvider()
Subclass constructor.

Method Detail

getDefault

public static ActionPresenterProvider getDefault()
Gets the default implementation from lookup.

Returns:
the presenter

createEmptyPopup

public abstract JPopupMenu createEmptyPopup()
Creates a default empty implementation of popup menu.

Returns:
popup menu

createMenuPresenter

public abstract JMenuItem createMenuPresenter(Action action)
Creates a menu item that can present this action in a JMenu.

Parameters:
action - the action to represent
Returns:
the representation for this action

createPopupPresenter

public abstract JMenuItem createPopupPresenter(Action action)
Get a menu item that can present this action in a JPopupMenu.

Parameters:
action - the action to represent
Returns:
the representation for this action

createToolbarPresenter

public abstract Component createToolbarPresenter(Action action)
Get a component that can present this action in a JToolBar.

Parameters:
action - the action to represent
Returns:
the representation for this action

convertComponents

public abstract Component[] convertComponents(Component comp)
Used for implementation of DynamicMenuContent.

Parameters:
comp - a component
Returns:
zero or more components to display in its place

org.openide.util 8.6.1

Built on August 25 2010.  |  Portions Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.