public class PTreeMenuCreator
extends java.awt.event.MouseAdapter
Constructor and Description |
---|
PTreeMenuCreator()
Create a new menu factory that contains no menu item factories.
|
Modifier and Type | Method and Description |
---|---|
void |
addMenuItemFactory(MenuItemFactory factory)
Add a menu item factory to this creator.
|
void |
clear()
Remove all MenuItemFactories from the factory list.
|
java.util.List |
menuItemFactoryList()
Return the list of menu item factories.
|
void |
mousePressed(java.awt.event.MouseEvent e)
Create an instance of the menu associated with this factory.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Create an instance of the menu associated with this factory.
|
void |
removeMenuItemFactory(MenuItemFactory factory)
Remove the given menu item factory from the factory list.
|
public PTreeMenuCreator()
public void addMenuItemFactory(MenuItemFactory factory)
factory
- The menu item factory to add.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class java.awt.event.MouseAdapter
e
- The mouse event. If the mouse event is
a popup event, then menu is created and shown.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class java.awt.event.MouseAdapter
e
- The mouse event. If the mouse event is
a popup event, then menu is created and shown.public java.util.List menuItemFactoryList()
public void removeMenuItemFactory(MenuItemFactory factory)
factory
- The factory to be removed.public void clear()