int expanded,
boolean isLastSibling,
String onclick
) throws IOException
{
Icon icon = null;
String iconURI = null;
String backgroundIconURI;
String nodeBackgroundIconURI;
boolean isAbsoluteImageURI = true;
String iconHeight = null;
Object altText = null;
String text = null;
boolean isMacOS =
Agent.PLATFORM_MACOS.equals(rc.getAgent().getPlatformName());
// add in the expandability
switch (expanded)
{
case NO_CHILDREN:
icon = rc.getIcon(SkinSelectors.AF_TREE_NO_CHILDREN_ICON);
if (icon == null || icon.getImageURI(context, rc) == null)
{
iconURI = TRANSPARENT_GIF;
iconHeight = _ICON_HEIGHT;
isAbsoluteImageURI = false;
}
break;
case EXPAND_CLOSED:
// "\u21D2"; // Double Arrow right
if (isMacOS)
// single arrow left
text = rc.isRightToLeft() ? "\u2190" : "\u2192"; // single arrow right
else if (isPDA(rc))
//for PDAs use a simple "+" or "-" since miscellaneous unicode characters
//are not supported
text = "[+]"; //plus sign
else // triangle left
text = rc.isRightToLeft() ? "\u25C4" : "\u25BA"; // triangle right
altText = rc.getTranslatedString(_EXPAND_TIP_KEY);
icon = rc.getIcon(SkinSelectors.AF_TREE_COLLAPSED_ICON);
break;
case EXPAND_OPEN:
//"\u21D3"; // double arrow down
if (isMacOS)
text = "\u2193"; // single arrow down
else if (isPDA(rc))
//for PDAs use a simple "+" or "-" since miscellaneous unicode characters
//are not supported
text = "[-]"; //plus sign
else
text = "\u25BC"; // triangle down
altText = rc.getTranslatedString(_COLLAPSE_TIP_KEY);
icon = rc.getIcon(SkinSelectors.AF_TREE_EXPANDED_ICON);
break;
case EXPAND_ALWAYS:
if (isMacOS)
text = "\u2193"; // single arrow down
else if (isPDA(rc))
text = "[-]"; //plus sign
else
text = "\u25BC"; // triangle down
//for PDAs use a simple "+" or "-" since miscellaneous unicode character
//s are not supported
altText = rc.getTranslatedString(_DISABLED_COLLAPSE_TIP_KEY);
icon = rc.getIcon(SkinSelectors.AF_TREE_EXPANDED_ICON);
break;
}
if (iconURI == null && icon != null)
{
//This can be null so we need to check for it before doing toString
Object o = icon.getImageURI(context, rc);
if(o != null)
{
iconURI = o.toString();
}
}