Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.yaftp.utils
Class SwingComponentPopup  view SwingComponentPopup download SwingComponentPopup.java

java.lang.Object
  extended bycom.yaftp.utils.SwingComponentPopup

public class SwingComponentPopup
extends java.lang.Object

Adapt Lightweight popup SWING stuff at construction time bind given component with new created popup and accept later submemus dynamically thru addMenuItem later on


Nested Class Summary
(package private)  class SwingComponentPopup._POPUP_ENTERED_
          POPUP memu displayed when righ button entered
 
Field Summary
private  boolean _activated
           
private  javax.swing.JComponent _component
           
private  boolean _firstItem
           
private  javax.swing.JPopupMenu _menu
           
private  java.awt.event.MouseListener _mouseListener
           
 
Constructor Summary
SwingComponentPopup(javax.swing.JComponent parent)
           
 
Method Summary
 javax.swing.JMenuItem addMenuItem(java.lang.String label, java.awt.event.ActionListener action)
          add a new menuItem associated with an action
 javax.swing.JMenuItem addMenuItem(java.lang.String label, java.awt.event.ActionListener action, javax.swing.Icon icon)
          add a new menuItem associated with an action and an icon
 void addSeparator()
           
 void cleanup()
           
static void main(java.lang.String[] arg)
           
private  void menuItemAdd(javax.swing.JMenuItem menuItem, java.awt.event.ActionListener action)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_menu

private transient javax.swing.JPopupMenu _menu

_mouseListener

private transient java.awt.event.MouseListener _mouseListener

_component

private transient javax.swing.JComponent _component

_firstItem

private transient boolean _firstItem

_activated

private transient boolean _activated
Constructor Detail

SwingComponentPopup

public SwingComponentPopup(javax.swing.JComponent parent)
Method Detail

menuItemAdd

private void menuItemAdd(javax.swing.JMenuItem menuItem,
                         java.awt.event.ActionListener action)

addMenuItem

public javax.swing.JMenuItem addMenuItem(java.lang.String label,
                                         java.awt.event.ActionListener action)
add a new menuItem associated with an action


addMenuItem

public javax.swing.JMenuItem addMenuItem(java.lang.String label,
                                         java.awt.event.ActionListener action,
                                         javax.swing.Icon icon)
add a new menuItem associated with an action and an icon


addSeparator

public void addSeparator()

cleanup

public void cleanup()

main

public static void main(java.lang.String[] arg)