org.netbeans.modules.openide.util
Class AWTBridge

java.lang.Object
  extended by org.netbeans.modules.openide.util.AWTBridge

public abstract class AWTBridge
extends java.lang.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 is made as a pluggable component to allow more enhanced parts of the system to provide more enhanced visualitions.


Constructor Summary
AWTBridge()
           
 
Method Summary
abstract  java.awt.Component[] convertComponents(java.awt.Component comp)
           
abstract  javax.swing.JPopupMenu createEmptyPopup()
          Creates a default empty implementation of popup menu.
abstract  javax.swing.JMenuItem createMenuPresenter(javax.swing.Action action)
          Creates a menu item that can present this action in a JMenu.
abstract  javax.swing.JMenuItem createPopupPresenter(javax.swing.Action action)
          Get a menu item that can present this action in a JPopupMenu.
abstract  java.awt.Component createToolbarPresenter(javax.swing.Action action)
          Get a component that can present this action in a JToolBar.
static AWTBridge getDefault()
          Finds out the global implementtion of the object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWTBridge

public AWTBridge()
Method Detail

getDefault

public static AWTBridge getDefault()
Finds out the global implementtion of the object

Returns:
the presenter

createEmptyPopup

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

Returns:
popup menu

createMenuPresenter

public abstract javax.swing.JMenuItem createMenuPresenter(javax.swing.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 javax.swing.JMenuItem createPopupPresenter(javax.swing.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 java.awt.Component createToolbarPresenter(javax.swing.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 java.awt.Component[] convertComponents(java.awt.Component comp)