Package org.latexlab.docs.client.widgets.ExtendedMenuBar

Examples of org.latexlab.docs.client.widgets.ExtendedMenuBar.ExtendedMenuItem


  public ExtendedMenuItem getMenuItem(String[] path) {
  ExtendedMenuBar curMenu = menu;
  int l = path.length - 1;
  for (int i=0; i<path.length; i++) {
    String title = path[i];
    ExtendedMenuItem item = curMenu.getItem(title);
    if (i == l || item == null) {
    return item;
    } else {
    if (item.getSubMenu() != null) {
      curMenu = (ExtendedMenuBar) item.getSubMenu();
    } else {
      return null;
    }
    }
  }
View Full Code Here


   *
   * @param title the menu item's title
   * @param enabled whether the item is enabled
   */
  public void setMenuItemEnabled(String[] title, boolean enabled) {
  ExtendedMenuItem item = getMenuItem(title);
    if (item != null) {
      if (enabled){
      item.removeStyleDependentName("Disabled");
      } else {
      item.addStyleDependentName("Disabled");
      }
    }
  }
View Full Code Here

   *
   * @param title the menu item's title
   * @param highlighted whether the item is highlighted
   */
  public void setMenuItemHighlighted(String[] title, boolean highlighted) {
  ExtendedMenuItem item = getMenuItem(title);
    if (item != null) {
      if (highlighted){
      item.addStyleDependentName("Highlighted");
      } else {
      item.removeStyleDependentName("Highlighted");
      }
    }
  }
View Full Code Here

   *
   * @param title the title of the menu item for which to set the icon image
   * @param icon the icon image
   */
  public void setMenuItemIcon(String[] title, AbstractImagePrototype icon) {
  ExtendedMenuItem item = getMenuItem(title);
    if (item != null) {
      item.setIcon(icon);
    }
  }
View Full Code Here

TOP

Related Classes of org.latexlab.docs.client.widgets.ExtendedMenuBar.ExtendedMenuItem

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.