Example #1
0
  /**
   * Creates a new table model to display the projects of a database.
   *
   * @param database The database that contains the projects.
   */
  public CProjectsModel(final IDatabase database) {
    Preconditions.checkNotNull(database, "IE01989: Database argument can't be null");

    m_database = database;

    database.addListener(m_databaseListener);

    if (database.isLoaded()) {
      final List<INaviProject> projects = database.getContent().getProjects();

      for (final INaviProject project : projects) {
        project.addListener(m_projectListener);
      }
    }
  }
Example #2
0
 /**
  * Creates a new operation object.
  *
  * @param database Database to be loaded.
  */
 public CDatabaseLoaderOperation(final IDatabase database) {
   m_database = database;
   m_loadProgressPanel.start();
   database.addListener(m_databaseListener);
   CGlobalProgressManager.instance().add(this);
 }