コード例 #1
0
 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();
 }
コード例 #2
0
  // 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()
コード例 #3
0
 // 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);
 }