congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
TreePopupListener
Code IndexAdd Tabnine to your IDE (free)

How to use
TreePopupListener
in
jadex.base.gui.asynctree

Best Java code snippets using jadex.base.gui.asynctree.TreePopupListener (Showing top 5 results out of 315)

origin: net.sourceforge.jadex/jadex-tools-base-swing

public void	mousePressed(MouseEvent e)	{doPopup(e);}
public void	mouseReleased(MouseEvent e)	{doPopup(e);}
origin: net.sourceforge.jadex/jadex-tools-base-swing

this.tree	= new JTree(model);
tree.setCellRenderer(new AsyncTreeCellRenderer());
tree.addMouseListener(new TreePopupListener());
tree.setShowsRootHandles(true);
tree.setToggleClickCount(0);
origin: net.sourceforge.jadex/jadex-tools-base-swing

tree.addMouseListener(new TreePopupListener());
tree.setShowsRootHandles(true);
tree.setToggleClickCount(0);
origin: net.sourceforge.jadex/jadex-tools-base-swing

public void	mouseReleased(MouseEvent e)	{doPopup(e);}
public void	mouseClicked(MouseEvent e)
origin: net.sourceforge.jadex/jadex-tools-base-swing

public void	mouseClicked(MouseEvent e)
{
  if(!doPopup(e) && e.getClickCount()==2)
  {
    JTree    tree    = (JTree)e.getSource();
    TreePath[]    paths    = tree.getSelectionPaths();
    if(paths!=null)
    {
      AsyncSwingTreeModel    model    = (AsyncSwingTreeModel)tree.getModel();
      INodeHandler[]    handlers    = model.getNodeHandlers();
      if(handlers!=null)
      {
        for(int i=0; paths!=null && i<paths.length; i++)
        {
          Action    a    = null;
          for(int j=handlers.length-1; a==null && j>=0; j--)
          {
            a    = ((ISwingNodeHandler) handlers[j]).getDefaultAction((ISwingTreeNode)paths[i].getLastPathComponent());
          }
          if(a!=null)
          {
            a.actionPerformed(new ActionEvent(tree, 0, null));
          }
        }
      }
    }
  }
}
jadex.base.gui.asynctreeTreePopupListener

Javadoc

A mouse listener to add popup-menus to a component tree. Uses the actions given by the selected nodes.

Most used methods

  • <init>
  • doPopup
    Open a popup menu.

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now