Пример #1
0
 public void actionPerformed(ActionEvent evt) {
   // String sPassword = m_actionuser.getPassword();
   if (m_actionuser.authenticate()) {
     // p'adentro directo, no tiene password
     openAppView(m_actionuser);
   } else {
     // comprobemos la clave antes de entrar...
     String sPassword =
         JPasswordDialog.showEditPassword(
             JRootApp.this,
             AppLocal.getIntString("Label.Password"),
             m_actionuser.getName(),
             m_actionuser.getIcon());
     if (sPassword != null) {
       if (m_actionuser.authenticate(sPassword)) {
         openAppView(m_actionuser);
       } else {
         MessageInf msg =
             new MessageInf(
                 MessageInf.SGN_WARNING, AppLocal.getIntString("message.BadPassword"));
         msg.show(JRootApp.this);
       }
     }
   }
 }
Пример #2
0
 public AppUserAction(AppUser user) {
   m_actionuser = user;
   putValue(Action.SMALL_ICON, m_actionuser.getIcon());
   putValue(Action.NAME, m_actionuser.getName());
 }