I notice that you have GoBalloon in the .NET product is there anything in the JGo product that can do the same thing?
No, there isn’t.
Thanks for the balloon! I did twist mine into a version of a wiener-dog though and added the following so I could save and load it:
: : : :
public void SVGUpdateReference(String attr, Object referencedObject)
{
super.SVGUpdateReference(attr, referencedObject);
if (attr.equals(“polyobj”)) {
myPoly = (JGoPolygon)referencedObject;
}
else if (attr.equals(“label”)) {
myLabel = (JGoText)referencedObject;
}
else if (attr.equals(“anchor”)) {
myAnchor = (JGoObject)referencedObject;
}
}
public void SVGWriteObject(DomDoc svgDoc, DomElement jGoElementGroup)
{
// Add Comment element
if (svgDoc.JGoXMLOutputEnabled()) {
DomElement jBalloon = svgDoc.createJGoClassElement(
“com.cloudshield.vppc.Balloon”, jGoElementGroup);
jBalloon.setAttribute(“partid”, Integer.toString(myPartID));
// The following elements are all children of this area and so will be writen out
// by JGoArea.SVGWriteObject(). We just need to update the references to them.
if (myPoly != null) {
svgDoc.registerReferencingNode(jBalloon, “polyobj”, myPoly);
}
if (myLabel != null) {
svgDoc.registerReferencingNode(jBalloon, “label”, myLabel);
}
if (myAnchor != null) {
svgDoc.registerReferencingNode(jBalloon, “anchor”, myAnchor);
}
}
// Have superclass add to the JGoObject group
super.SVGWriteObject(svgDoc, jGoElementGroup);
}
public DomNode SVGReadObject(DomDoc svgDoc, JGoDocument jGoDoc, DomElement svgElement, DomElement jGoChildElement)
{
if (jGoChildElement != null) {
// This is a balloon element
String partid = jGoChildElement.getAttribute(“partid”);
if (partid.length() > 0)
myPartID = Integer.parseInt(partid);
String rectobj = jGoChildElement.getAttribute(“polyobj”);
svgDoc.registerReferencingObject(this, “polyobj”, rectobj);
String label = jGoChildElement.getAttribute(“label”);
svgDoc.registerReferencingObject(this, “label”, label);
String anchor = jGoChildElement.getAttribute(“anchor”);
svgDoc.registerReferencingObject(this, “anchor”, anchor);
super.SVGReadObject(svgDoc, jGoDoc, svgElement, jGoChildElement.getNextSiblingJGoClassElement());
}
return svgElement.getNextSibling();
}
: : : :
Thanks. I have updated the file in the uploads directory.