private void insertProjects(SrVector children, Db db) throws DbException { db.beginTrans(Db.READ_TRANS); DbObject parent = db.getRoot(); DbEnumeration dbEnum = parent.getComponents().elements(DbProject.metaClass); while (dbEnum.hasMoreElements()) children.addElement(createPrimaryNode(parent, dbEnum.nextElement())); dbEnum.close(); db.commitTrans(); }
// Overridden protected void insertComponents(SrVector children, DbObject dbParent) throws DbException { SemanticalModel model = ApplicationContext.getSemanticalModel(); DbEnumeration dbEnum = dbParent.getComponents().elements(); while (dbEnum.hasMoreElements()) { DbObject dbo = dbEnum.nextElement(); boolean isVisible = model.isVisibleOnScreen(dbParent, dbo, Explorer.class); if (isVisible) { children.addElement(createPrimaryNode(dbParent, dbo)); } // end if } // end while dbEnum.close(); } // end insertComponents()
// Must return the index in the children list if childrenAreSorted(dbParent) // returns false. // Overridden protected int getIndex(DbObject dbParent, DbObject dbo) throws DbException { return dbParent.getComponents().indexOf(dbo); }