Search in sources :

Example 1 with JFrameView

use of com.jsql.view.swing.JFrameView in project jsql-injection by ron190.

the class MainApplication method main.

/**
 * Application starting point.
 * @param args CLI parameters (not used)
 * @throws URISyntaxException
 */
public static void main(String[] args) throws URISyntaxException {
    // Configure global environnement settings
    CertificateUtil.ignoreCertificationChain();
    ExceptionUtil.setUncaughtExceptionHandler();
    ProxyUtil.setProxy();
    AuthenticationUtil.setKerberosCifs();
    // Initialize MVC
    InjectionModel model = new InjectionModel();
    MediatorModel.register(model);
    try {
        JFrameView view = new JFrameView();
        MediatorGui.register(view);
        model.addObserver(view.getObserver());
    } catch (HeadlessException e) {
        LOGGER.error("HeadlessException, command line execution in jSQL not supported yet: " + e.getMessage(), e);
        return;
    } catch (AWTError e) {
        // Fix #22668: Assistive Technology not found
        LOGGER.error("Java Access Bridge missing or corrupt, check your access bridge definition in JDK_HOME/jre/lib/accessibility.properties: " + e.getMessage(), e);
        return;
    }
    model.displayVersion();
    // Check application status
    if (!ProxyUtil.isChecked(ShowOnConsole.YES)) {
        return;
    }
    if (PreferencesUtil.isCheckUpdateActivated()) {
        GitUtil.checkUpdate(ShowOnConsole.NO);
    }
    I18n.checkCurrentLanguage();
    GitUtil.showNews();
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    int width = (int) screenSize.getWidth();
    if (width >= 3840 && !PreferencesUtil.is4K()) {
        LOGGER.warn("Your screen seems compatible with 4K resolution, please activate high-definition mode in Preferences");
    }
}
Also used : InjectionModel(com.jsql.model.InjectionModel) JFrameView(com.jsql.view.swing.JFrameView) HeadlessException(java.awt.HeadlessException) AWTError(java.awt.AWTError) Dimension(java.awt.Dimension)

Aggregations

InjectionModel (com.jsql.model.InjectionModel)1 JFrameView (com.jsql.view.swing.JFrameView)1 AWTError (java.awt.AWTError)1 Dimension (java.awt.Dimension)1 HeadlessException (java.awt.HeadlessException)1