Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


oracle.javatools.controls
Class TextMenuPopupHandler

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by oracle.javatools.controls.TextMenuPopupHandler

All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

public class TextMenuPopupHandler
extends java.awt.event.MouseAdapter
implements java.awt.event.ActionListener

TextMenuPopupHandler creates popup (context) menus for text components. Each popup menu contains CUT, COPY, PASTE, and SELECT ALL commands. Selecting the command from the menu invokes the given command on the JTextComponent being managed by the TextPopupHandler instance.


Constructor Summary
TextMenuPopupHandler(javax.swing.text.JTextComponent comp)
          Constructs a new TextPopupHandler instance.

 

Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Perform the action selected by the user.
protected  void maybeShowPopup(java.awt.event.MouseEvent e)
          Checks to see if the user requested the popup menu, and displays it if so.
 void mousePressed(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been pressed on a component.
 void mouseReleased(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been released on a component.

 

Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

TextMenuPopupHandler

public TextMenuPopupHandler(javax.swing.text.JTextComponent comp)
Constructs a new TextPopupHandler instance.
Parameters:
comp - The JTextComponent for whom this TextPopupHandler should create a context menu.

Method Detail

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component.
Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class java.awt.event.MouseAdapter

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component.
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class java.awt.event.MouseAdapter

maybeShowPopup

protected void maybeShowPopup(java.awt.event.MouseEvent e)
Checks to see if the user requested the popup menu, and displays it if so. Each TextPopupHandler contains a single instance of a JPopupMenu, which is created on demand.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Perform the action selected by the user.
Specified by:
actionPerformed in interface java.awt.event.ActionListener

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


Copyright © 1997, 2011, Oracle. All rights reserved.