}
public String getFullStyleClass(FacesContext context, UIComponent component) {
StringBuffer classBuffer = new StringBuffer("");
UIPanelMenuItem item = (UIPanelMenuItem)component;
UIPanelMenu parentMenu = findMenu(item);
if (!parentMenu.isDisabled() && !item.isDisabled()) {
if (calculateLevel(item) == 0) {
String topItemClass = parentMenu.getTopItemClass();
if(topItemClass != null && !topItemClass.equals("")){
classBuffer.append(topItemClass).append(" ");
}
classBuffer.append("rich-pmenu-top-item ");
} else {
String parentItemClass = parentMenu.getItemClass();
if(parentItemClass != null && !parentItemClass.equals("")){
classBuffer.append(parentItemClass).append(" ");
}
}
String itemClass = item.getStyleClass();
if(itemClass != null && !itemClass.equals("")){
classBuffer.append(itemClass);
}
} else {
String pmDisabledItemClass = parentMenu.getDisabledItemClass();
if (pmDisabledItemClass != null && !pmDisabledItemClass.equals("")) {
classBuffer.append(pmDisabledItemClass).append(" ");
}
String itemDisabledClass = item.getDisabledClass();
if (itemDisabledClass != null && !itemDisabledClass.equals("")) {
classBuffer.append(itemDisabledClass);
}
}
return classBuffer.toString();