1 33 34 package com.icesoft.faces.component.menubar; 35 36 import com.icesoft.faces.component.ext.taglib.Util; 37 import com.icesoft.faces.util.CoreUtils; 38 39 40 43 public class MenuItemRadio extends MenuItem { 44 45 private static final String DEFAULT_ICON_UNSELECTED = 46 "/xmlhttp/css/xp/css-images/menu_radio.gif"; 47 private static final String DEFAULT_ICON_SELECTED = 48 "/xmlhttp/css/xp/css-images/menu_radio_selected.gif"; 49 50 private boolean selected; 51 52 56 public String getFamily() { 57 return "com.icesoft.faces.MenuNodeRadio"; 58 } 59 60 63 public String getRendererType() { 64 return "com.icesoft.faces.View"; 65 } 66 67 68 71 public boolean isSelected() { 72 return selected; 73 } 74 75 78 public void setSelected(boolean newValue) { 79 selected = newValue; 80 } 81 82 85 public String getUnselectedIcon() { 86 return CoreUtils.resolveResourceURL(getFacesContext(), 87 DEFAULT_ICON_UNSELECTED); 88 } 89 90 93 public String getSelectedIcon() { 94 return CoreUtils.resolveResourceURL(getFacesContext(), 95 DEFAULT_ICON_SELECTED); 96 } 97 98 99 } 100 | Popular Tags |