예제 #1
0
  private void openAppView(AppUser user) {

    if (closeAppView()) {

      m_principalapp = new JPrincipalApp(this, user);

      // The user status notificator
      jPanel3.add(m_principalapp.getNotificator());
      jPanel3.revalidate();

      // The main panel
      m_jPanelContainer.add(m_principalapp, "_" + m_principalapp.getUser().getId());
      showView("_" + m_principalapp.getUser().getId());

      m_principalapp.activate();
    }
  }
예제 #2
0
  public boolean closeAppView() {

    if (m_principalapp == null) {
      return true;
    } else if (!m_principalapp.deactivate()) {
      return false;
    } else {
      // the status label
      jPanel3.remove(m_principalapp.getNotificator());
      jPanel3.revalidate();
      jPanel3.repaint();

      // remove the card
      m_jPanelContainer.remove(m_principalapp);
      m_principalapp = null;

      showLogin();

      return true;
    }
  }