Package annotation

Examples of annotation.Menu


       
        Method[] m = c.getDeclaredMethods();
        for(int j=0; j<m.length ; j++)
        {
          System.out.println("Methode : "+m[j].getName());
          Menu menu = m[j].getAnnotation(Menu.class);
          if(menu != null)
          {
            JMenuItem item;
            if(menu.libelle() == null)
            {
              item = new JMenuItem(m[j].getName());
            }
            else
            {
              item = new JMenuItem(menu.libelle());
            }
            plugin.add(item);
            item.addActionListener(new ActionListener() {
             
              @Override
View Full Code Here


    JMenuItem item=null;
    boolean test = false;
     
    for(int j=0; j<m.length ; j++)
    {
      Menu menu = m[j].getAnnotation(Menu.class);
      if(menu != null)
      {
        test = true;
        if(menu.libelle() == null)
        {
          item = new JMenuItem(m[j].getName());
        }
        else
        {
          item = new JMenuItem(menu.libelle());
        }
      }
    }
    if(!test)
    {
View Full Code Here

TOP

Related Classes of annotation.Menu

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.