jimmc.roots
Class TextPopup

java.lang.Object
  |
  +--java.awt.MenuComponent
        |
        +--java.awt.MenuItem
              |
              +--java.awt.Menu
                    |
                    +--java.awt.PopupMenu
                          |
                          +--jimmc.roots.TextPopup
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.MenuContainer, java.io.Serializable

public class TextPopup
extends java.awt.PopupMenu

A popup menu for use in Text areas. It includes a select command that picks the key value (id field) out of the text under the cursor.

See Also:
Serialized Form

Inner classes inherited from class java.awt.PopupMenu
java.awt.PopupMenu.AccessibleAWTPopupMenu
 
Inner classes inherited from class java.awt.Menu
java.awt.Menu.AccessibleAWTMenu
 
Inner classes inherited from class java.awt.MenuItem
java.awt.MenuItem.AccessibleAWTMenuItem
 
Inner classes inherited from class java.awt.MenuComponent
java.awt.MenuComponent.AccessibleAWTMenuComponent
 
Constructor Summary
TextPopup(TextPopupListener ww)
          Create the popup.
 
Method Summary
protected  void addMenuItems()
          Add the menu items to the popup.
protected  void enableIdMenus(boolean enable)
          Enable or disable the menus that depend on a valid ID.
protected  java.lang.String getWordAround(java.lang.String text, int pos)
          Get the word in the given single line around the specified position.
protected  void setRecord(JTextAreaWithPopup tf, int x, int y)
          Set stuff in the popup menu based on x,y position
protected  void setRecord(TextAreaWithPopup tf, int x, int y)
          Set stuff in the popup menu based on x,y position
 
Methods inherited from class java.awt.PopupMenu
addNotify, getAccessibleContext, show
 
Methods inherited from class java.awt.Menu
add, add, addSeparator, countItems, getItem, getItemCount, insert, insert, insertSeparator, isTearOff, paramString, remove, remove, removeAll, removeNotify
 
Methods inherited from class java.awt.MenuItem
addActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getLabel, getListeners, getShortcut, isEnabled, processActionEvent, processEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcut
 
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, setFont, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

TextPopup

public TextPopup(TextPopupListener ww)
Create the popup.
Method Detail

addMenuItems

protected void addMenuItems()
Add the menu items to the popup.

enableIdMenus

protected void enableIdMenus(boolean enable)
Enable or disable the menus that depend on a valid ID.

setRecord

protected void setRecord(TextAreaWithPopup tf,
                         int x,
                         int y)
Set stuff in the popup menu based on x,y position

setRecord

protected void setRecord(JTextAreaWithPopup tf,
                         int x,
                         int y)
Set stuff in the popup menu based on x,y position

getWordAround

protected java.lang.String getWordAround(java.lang.String text,
                                         int pos)
Get the word in the given single line around the specified position.