Search in sources :

Example 1 with ExtendedBalloonDialog

use of de.janrufmonitor.ui.jface.application.dialog.ExtendedBalloonDialog in project janrufmonitor by tbrandt77.

the class DefaultCallDialogService method receivedValidRule.

public void receivedValidRule(final ICall aCall) {
    ICaller theCaller = aCall.getCaller();
    if (theCaller != null) {
        this.m_logger.info("Opening new dialog instance...");
        final long ms = System.currentTimeMillis();
        this.m_logger.fine("Time measure in ms (init): " + (System.currentTimeMillis() - ms));
        new SWTExecuter(true, this.getID()) {

            protected void execute() {
                if (m_configuration.getProperty(CFG_BALLOON, "false").equalsIgnoreCase("false")) {
                    m_logger.fine("Time measure in ms (SWTExecuter): " + (System.currentTimeMillis() - ms));
                    Dialog j = new Dialog(m_configuration, aCall);
                    m_logger.fine("Time measure in ms (SWTExecuter.open() - before): " + (System.currentTimeMillis() - ms));
                    j.open();
                    m_logger.fine("Time measure in ms (SWTExecuter.open() - after): " + (System.currentTimeMillis() - ms));
                    j = null;
                } else {
                    m_logger.fine("Time measure in ms (SWTExecuter): " + (System.currentTimeMillis() - ms));
                    ExtendedBalloonDialog j = new ExtendedBalloonDialog(m_configuration, aCall);
                    try {
                        Thread.sleep(getDelay());
                    } catch (InterruptedException e) {
                    }
                    j.createDialog();
                    m_logger.fine("Time measure in ms (SWTExecuter.open() - before): " + (System.currentTimeMillis() - ms));
                    j.open();
                    m_logger.fine("Time measure in ms (SWTExecuter.open() - after): " + (System.currentTimeMillis() - ms));
                    j = null;
                }
            }
        }.start();
        this.m_logger.fine("Time measure in ms (end): " + (System.currentTimeMillis() - ms));
    } else {
        this.m_logger.warning("Dialog not opened due to invalid caller data.");
    }
}
Also used : ExtendedBalloonDialog(de.janrufmonitor.ui.jface.application.dialog.ExtendedBalloonDialog) ICaller(de.janrufmonitor.framework.ICaller) ExtendedBalloonDialog(de.janrufmonitor.ui.jface.application.dialog.ExtendedBalloonDialog) Dialog(de.janrufmonitor.ui.jface.application.dialog.Dialog) SWTExecuter(de.janrufmonitor.ui.swt.SWTExecuter)

Aggregations

ICaller (de.janrufmonitor.framework.ICaller)1 Dialog (de.janrufmonitor.ui.jface.application.dialog.Dialog)1 ExtendedBalloonDialog (de.janrufmonitor.ui.jface.application.dialog.ExtendedBalloonDialog)1 SWTExecuter (de.janrufmonitor.ui.swt.SWTExecuter)1