Application events

Information about development with ProjX.

Application events

Postby Development@SIB » Tue Apr 08, 2014 3:25 pm

If you need more information about the application and what's going on in the application, you should add an event listener. The application sends events in different situations:

Code: Select all
public void beforeSave(ProjX pApplication);
public void afterSave(ProjX pApplication);
public void beforeReload(ProjX pApplication);
public void afterReload(ProjX pApplication);
public void beforeUndo(ProjX pApplication);
public void afterUndo(ProjX pApplication);
public void beforeRedo(ProjX pApplication);
public void afterRedo(ProjX pApplication);
public void vetoOpenWorkScreen(ProjX pApplication, String pClassName, Modality pModality);
public void beforeOpenWorkScreen(ProjX pApplication, String pClassName,
                                 Modality pModality, AbstractConnection pConnection);
public void afterOpenWorkScreen(ProjX pApplication, IWorkScreen pScreen);
public void beforeCloseWorkScreen(ProjX pApplication, IWorkScreen pScreen);
public void afterCloseWorkScreen(ProjX pApplication, IWorkScreen pScreen);
public void beforeConfigureMenu(ProjX pApplication, Menu pMenu);
public void afterConfigureMenu(ProjX pApplication, Menu pMenu);
public void beforeOpenConnection(ProjX pApplication, AbstractConnection pConnection);
public void afterOpenConnection(ProjX pApplication, AbstractConnection pConnection);
public void autoLoginException(ProjX pApplication, MasterConnection pConnection,
                               Throwable pThrowable);
public void beforeTabMode(ProjX pApplication, boolean pTabMode);
public void afterTabMode(ProjX pApplication, boolean pTabMode);
public void beforeOpenError(ProjX pApplication, Error pError);
public void afterCloseError(ProjX pApplication);
public void updateLanguage(ProjX pApplication);
public void beforeLogin(ProjX pApplication);
public void beforeLogout(ProjX pApplication);
public void openContainer(ProjX pApplication, IContainer pContainer, IContent pContent);


No worries, there are event methods in the application. It's not needed to implement all of above methods, only what you need, e.g.

Code: Select all
application.eventAfterLogin().addListener(this, "doAfterLogin");
User avatar
Development@SIB
 
Posts: 311
Joined: Mon Sep 28, 2009 1:54 pm

Return to Documentation