public void action(int eventType, MouseEvent e) { switch (eventType) { case GeDyn.eEvent_MB1Down: dyn.comp.setColorInverse(1); dyn.repaintNow = true; break; case GeDyn.eEvent_MB1Up: dyn.comp.setColorInverse(0); dyn.repaintNow = true; break; case GeDyn.eEvent_MB3Press: if (refObject.startsWith("!")) { // Name of an attribute that contains the objid of the reference object CdhrObjid reto = dyn.en.gdh.getObjectInfoObjid(refObject.substring(1)); if (reto.oddSts() && !reto.objid.isNull()) { CdhrString rets = dyn.en.gdh.objidToName(reto.objid, Cdh.mName_volumeStrict); System.out.println("str: " + rets.str + " " + rets.getSts()); if (rets.oddSts() && !rets.str.equals("")) new JopMethodsMenu( dyn.session, rets.str, JopUtility.GRAPH, (Component) dyn.comp, e.getX(), e.getY()); } } else { new JopMethodsMenu( dyn.session, refObject, JopUtility.GRAPH, (Component) dyn.comp, e.getX(), e.getY()); } break; } }
// public Vector<GdhrGetXttObj> getAllXttChildren( PwrtObjid objid ) public Vector getAllXttChildren(PwrtObjid objid) { String name = null; String fullName = null; String description = " "; String className = null; CdhrObjid cdhrObjId; CdhrClassId cdhrClassId; int sts = 2; boolean hasChildren = false; // Vector<GdhrGetXttObj> v = new Vector<GdhrGetXttObj>(); Vector v = new Vector(); CdhrObjid classObj; System.out.println("getAllXttChildren"); cdhrObjId = (CdhrObjid) this.getChild(objid); while (cdhrObjId.oddSts()) { // System.out.println("whilegetAllXttChildren"); cdhrClassId = this.getObjectClass(cdhrObjId.objid); if (cdhrClassId.oddSts()) { classObj = this.classIdToObjid(cdhrClassId.classId); if (classObj.oddSts()) { className = this.objidToName(classObj.objid, Cdh.mName_object).str; fullName = this.objidToName(cdhrObjId.objid, Cdh.mName_pathStrict).str; name = this.objidToName(cdhrObjId.objid, Cdh.mName_object).str; CdhrString ret = this.getObjectInfoString(fullName + ".Description"); if (ret.oddSts()) description = ret.str; else description = " "; sts = 1; if (this.getChild(cdhrObjId.objid).oddSts()) { hasChildren = true; } } } v.add( new GdhrGetXttObj( name, fullName, description, className, cdhrObjId, cdhrClassId, sts, hasChildren)); cdhrObjId = this.getNextSibling(cdhrObjId.objid); hasChildren = false; sts = 2; } return v; }
// public Vector<CdhrObjid> getAllSiblings( PwrtObjid objid ) public Vector getAllSiblings(PwrtObjid objid) { CdhrObjid sibling = (CdhrObjid) this.getNextSibling(objid); // Vector<CdhrObjid> v = new Vector<CdhrObjid>(); Vector v = new Vector(); while (sibling.oddSts()) { v.add(sibling); sibling = this.getNextSibling(sibling.objid); } return v; }