Package org.wicketstuff.yui.markup.html.menu2

Examples of org.wicketstuff.yui.markup.html.menu2.YuiMenu


  }

  private void initMenu()
  {
    AbstractYuiMenuItem mi = null;

    YuiMenu menu = new YuiMenu("menu")
    {
      @Override
      protected String getOpts()
      {
        Attributes attributes = new Attributes();
        attributes.add(new Attributes("visible", true));
        attributes.add(new Attributes("clicktohide", false));
        attributes.add(new Attributes("fixedcenter", true));
        return attributes.toString();
      }
    };


    menu.addMenuItem(new TestAction("M : L1"));
    menu.addMenuItem(new TestAction("M : L2"));
    mi = menu.addMenuItem(new TestAction("M : L3"));
    menu.addMenuItem(new TestAction("M : L4"));
    menu.addMenuItem(new TestAction("M : L5"));

    YuiMenu subMenu = mi.newSubMenu("m_subMenu1");
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));


    add(menu);
View Full Code Here


  }
 

  private void initMenuGroup1() {
    AbstractYuiMenuItem mi = null;
   
    YuiMenuGroup menuGroup = new YuiMenuGroup( "groupMenu1", "groupMenu1" );
    YuiMenu menu1 = menuGroup.addMenu();


    menu1.addMenuItem(new TestAction("M1 : L1"));
    menu1.addMenuItem(new TestAction("M1 : L2"));
    mi = menu1.addMenuItem(new TestAction("M1 : L3"));
    menu1.addMenuItem(new TestAction("M1 : L4"));
    menu1.addMenuItem(new TestAction("M1 : L5"));
   
    YuiMenu subMenu = mi.newSubMenu( "gm_subMenu1" );
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));
   
    YuiMenu menu2 = menuGroup.addMenu();
    menu2.addMenuItem(new TestAction("M2 : L1"));
View Full Code Here

    add(menuGroup);
  }
 
  private void initMenuGroup2() {
    AbstractYuiMenuItem mi = null;
   
    YuiMenuGroup menuGroup = new YuiMenuGroup( "groupMenu2", "groupMenu2" );
    YuiMenu menu1 = menuGroup.addMenu("Group 1");


    menu1.addMenuItem(new TestAction("M1 : L1"));
    menu1.addMenuItem(new TestAction("M1 : L2"));
    mi = menu1.addMenuItem(new TestAction("M1 : L3"));
    menu1.addMenuItem(new TestAction("M1 : L4"));
    menu1.addMenuItem(new TestAction("M1 : L5"));
   
    YuiMenu subMenu = mi.newSubMenu( "gm_subMenu2" );
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));
   
    YuiMenu menu2 = menuGroup.addMenu("Group 2");
    menu2.addMenuItem(new TestAction("M2 : L1"));
View Full Code Here

    mb.setOutputMarkupId(true);

    YuiMenuBarItem firstMenu = mb.addMenu("First Menu");

    // 1st Menu
    AbstractYuiMenuItem mi = null;
    YuiMenu subMenu = null;

    subMenu = firstMenu.newSubMenu("mb_firstMenu");
    subMenu.addMenuItem(new TestAction("M1 : L1"));
    subMenu.addMenuItem(new TestAction("M1 : L2"));
    mi = subMenu.addMenuItem(new TestAction("M1 : L3"));
    subMenu.addMenuItem(new TestAction("M1 : L4"));
    subMenu.addMenuItem(new TestAction("M1 : L5"));
    subMenu = mi.newSubMenu("subMenu1");
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));

    // 2nd Menu
    YuiMenuBarItem secondMenu = mb.addMenu(new TestAction("Second Menu"));
View Full Code Here

  private void initMenu()
  {
    AbstractYuiMenuItem mi = null;

    YuiMenu menu = new YuiMenu("menu")
    {
      @Override
      protected String getOpts()
      {
        Attributes attributes = new Attributes();
        attributes.add(new Attributes("visible", true));
        attributes.add(new Attributes("clicktohide", false));
        attributes.add(new Attributes("fixedcenter", true));
        return attributes.toString();
      }
    };


    menu.addMenuItem(new TestAction("M : L1"));
    menu.addMenuItem(new TestAction("M : L2"));
    mi = menu.addMenuItem(new TestAction("M : L3"));
    menu.addMenuItem(new TestAction("M : L4"));
    menu.addMenuItem(new TestAction("M : L5"));

    YuiMenu subMenu = mi.newSubMenu("m_subMenu1");
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));


    add(menu);
  }
View Full Code Here

  private void initMenuGroup1() {
    AbstractYuiMenuItem mi = null;
   
    YuiMenuGroup menuGroup = new YuiMenuGroup( "groupMenu1", "groupMenu1" );
    YuiMenu menu1 = menuGroup.addMenu();


    menu1.addMenuItem(new TestAction("M1 : L1"));
    menu1.addMenuItem(new TestAction("M1 : L2"));
    mi = menu1.addMenuItem(new TestAction("M1 : L3"));
    menu1.addMenuItem(new TestAction("M1 : L4"));
    menu1.addMenuItem(new TestAction("M1 : L5"));
   
    YuiMenu subMenu = mi.newSubMenu( "gm_subMenu1" );
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));
   
    YuiMenu menu2 = menuGroup.addMenu();
    menu2.addMenuItem(new TestAction("M2 : L1"));
    menu2.addMenuItem(new TestAction("M2 : L2"));
    menu2.addMenuItem(new TestAction("M2 : L3"));
    menu2.addMenuItem(new TestAction("M2 : L4"));
    menu2.addMenuItem(new TestAction("M2 : L5"));

    add(menuGroup);
  }
View Full Code Here

 
  private void initMenuGroup2() {
    AbstractYuiMenuItem mi = null;
   
    YuiMenuGroup menuGroup = new YuiMenuGroup( "groupMenu2", "groupMenu2" );
    YuiMenu menu1 = menuGroup.addMenu("Group 1");


    menu1.addMenuItem(new TestAction("M1 : L1"));
    menu1.addMenuItem(new TestAction("M1 : L2"));
    mi = menu1.addMenuItem(new TestAction("M1 : L3"));
    menu1.addMenuItem(new TestAction("M1 : L4"));
    menu1.addMenuItem(new TestAction("M1 : L5"));
   
    YuiMenu subMenu = mi.newSubMenu( "gm_subMenu2" );
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));
   
    YuiMenu menu2 = menuGroup.addMenu("Group 2");
    menu2.addMenuItem(new TestAction("M2 : L1"));
    menu2.addMenuItem(new TestAction("M2 : L2"));
    menu2.addMenuItem(new TestAction("M2 : L3"));
    menu2.addMenuItem(new TestAction("M2 : L4"));
    menu2.addMenuItem(new TestAction("M2 : L5"));

    add(menuGroup);
  }
View Full Code Here

    YuiMenuBarItem firstMenu = mb.addMenu("First Menu");

    // 1st Menu
    AbstractYuiMenuItem mi = null;
    YuiMenu subMenu = null;

    subMenu = firstMenu.newSubMenu("mb_firstMenu");
    subMenu.addMenuItem(new TestAction("M1 : L1"));
    subMenu.addMenuItem(new TestAction("M1 : L2"));
    mi = subMenu.addMenuItem(new TestAction("M1 : L3"));
    subMenu.addMenuItem(new TestAction("M1 : L4"));
    subMenu.addMenuItem(new TestAction("M1 : L5"));
    subMenu = mi.newSubMenu("subMenu1");
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));

    // 2nd Menu
    YuiMenuBarItem secondMenu = mb.addMenu(new TestAction("Second Menu"));

    final YuiMenu subMenu2 = secondMenu.newSubMenu("mb_secondMenu");
    subMenu2.setOutputMarkupId(true);
    subMenu2.addMenuItem(new TestAction("M2 : L1"));

    final YuiMenuItem m2L2 = new YuiMenuItem(new TestAction("M2 : L2"));
    subMenu2.addMenuItem(m2L2);

    subMenu2.addMenuItem(new AjaxLinkAction("M2 : L3 (Ajax) - toggles M2 : L2")
    {
      @Override
      public void onClick(AjaxRequestTarget target)
      {
        MenuBar2Page.this.info(getName().getObject());
        m2L2.setDisabled(!m2L2.isDisabled());
        m2L2.setChecked(!m2L2.isDisabled());
        m2L2.setSelected(m2L2.isChecked());
        target.addComponent(feedback);
        target.addComponent(mb);
      }
    });
    subMenu2.addMenuItem(new TestAction("M2 : L4"));
    subMenu2.addMenuItem(new TestAction("M2 : L5"));

    // 3rd Menu
    mb.addMenu(new TestAction("Third Menu"));
    add(mb);
View Full Code Here

  }

  @SuppressWarnings("serial")
  private void initMenuBar()
  {
    mb = new YuiMenuBar("menuBar")
    {
      @Override
      protected String getOpts()
      {
        Attributes attributes = new Attributes();
View Full Code Here

        return attributes.toString();
      }
    };
    mb.setOutputMarkupId(true);

    YuiMenuBarItem firstMenu = mb.addMenu("First Menu");

    // 1st Menu
    AbstractYuiMenuItem mi = null;
    YuiMenu subMenu = null;

    subMenu = firstMenu.newSubMenu("mb_firstMenu");
    subMenu.addMenuItem(new TestAction("M1 : L1"));
    subMenu.addMenuItem(new TestAction("M1 : L2"));
    mi = subMenu.addMenuItem(new TestAction("M1 : L3"));
    subMenu.addMenuItem(new TestAction("M1 : L4"));
    subMenu.addMenuItem(new TestAction("M1 : L5"));
    subMenu = mi.newSubMenu("subMenu1");
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));

    // 2nd Menu
    YuiMenuBarItem secondMenu = mb.addMenu(new TestAction("Second Menu"));

    final YuiMenu subMenu2 = secondMenu.newSubMenu("mb_secondMenu");
    subMenu2.setOutputMarkupId(true);
    subMenu2.addMenuItem(new TestAction("M2 : L1"));

    final YuiMenuItem m2L2 = new YuiMenuItem(new TestAction("M2 : L2"));
    subMenu2.addMenuItem(m2L2);
View Full Code Here

TOP

Related Classes of org.wicketstuff.yui.markup.html.menu2.YuiMenu

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.