1 26 package org.objectweb.util.explorer.resolver.lib; 27 28 import org.objectweb.util.explorer.core.menu.api.ItemDescription; 29 import org.objectweb.util.explorer.core.menu.api.MenuDescription; 30 import org.objectweb.util.explorer.core.menu.api.MenuElement; 31 import org.objectweb.util.explorer.core.menu.lib.BasicMenuDescription; 32 33 43 public class ExtendedMenuDescription 44 extends BasicMenuDescription 45 { 46 47 53 59 65 71 82 public void addMenuElements(MenuDescription source, boolean isFirst){ 83 if(inheritTypeMenu_){ 84 MenuElement[] menuElements = source.getMenuElements(); 85 for (int i = 0; i < menuElements.length; i++) { 86 MenuElement element = menuElements[i]; 87 if(!(element instanceof ItemDescription && !((ItemDescription)element).getTypeChildVisible() && !isFirst)){ 88 addMenuElement(element); 89 } 90 } 91 inheritTypeMenu_ = source.getInheritTypeMenu(); 92 } 93 } 94 95 102 public void addChildrenMenuElements(MenuDescription source){ 103 if(inheritTreeMenu_){ 104 addMenuElements(source.getChildrenMenuElements()); 105 inheritTreeMenu_ = source.getInheritTreeMenu(); 106 if(!inheritTreeMenu_){ 107 childMenuElements_.clear(); 108 } 109 } 110 } 111 112 } 113 114 115 | Popular Tags |