}
}
public void updateCircle()
{
ItsNatDocument itsNatDoc = getItsNatDocument();
int newRadio = -1;
String valueStr = inputRadio.getAttribute("value");
try
{
newRadio = Integer.parseInt(valueStr);
}
catch(NumberFormatException ex)
{
itsNatDoc.addCodeToSend("alert('Not an integer number');");
return;
}
Document childDoc;
try
{
if (container instanceof HTMLAppletElement)
childDoc = ((ItsNatHTMLAppletElement)container).getContentDocument();
else if (container instanceof HTMLObjectElement)
childDoc = ((HTMLObjectElement)container).getContentDocument();
else
childDoc = ((ItsNatHTMLEmbedElement)container).getContentDocument();
}
catch(NoSuchMethodError ex)
{
// Cause: Xerces compatibility package of Tomcat 5.5
// misses this standard DOM method in HTMLIFrameElement
// and HTMLObjectElement interfaces
// Don't worry, our required method is there.
try
{
Method method = container.getClass().getMethod("getContentDocument",(Class<?>[])null);
childDoc = (Document)method.invoke(container,(Object[])null);
}
catch(Exception ex2) { throw new RuntimeException(ex2); }
}
if (childDoc == null)
{
itsNatDoc.addCodeToSend("alert('Not loaded yet');");
return;
}
ItsNatDocument childItsNatDoc = ((ItsNatNode)childDoc).getItsNatDocument(); // This method is multithread
synchronized(childItsNatDoc) // NEEDED!!!
{
ChildSVGBatikAutoBindingDocument childUserDoc =
(ChildSVGBatikAutoBindingDocument)childItsNatDoc.getUserValue("user_object");
Element circle = childUserDoc.getSelectedCircle();
if (circle == null)
{
itsNatDoc.addCodeToSend("alert('No selected circle');");
return;