All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nuiton.jaxx.application.swing.ApplicationUIContext Maven / Gradle / Ivy

There is a newer version: 3.0-alpha-1
Show newest version
package org.nuiton.jaxx.application.swing;

/*
 * #%L
 * JAXX :: Application Swing
 * %%
 * Copyright (C) 2008 - 2014 Code Lutin, Tony Chemit
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 3 of the 
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Lesser Public License for more details.
 * 
 * You should have received a copy of the GNU General Lesser Public 
 * License along with this program.  If not, see
 * .
 * #L%
 */

import org.nuiton.jaxx.application.ApplicationContext;
import org.nuiton.jaxx.application.swing.action.ApplicationActionEngine;
import org.nuiton.jaxx.application.swing.action.ApplicationActionFactory;
import org.nuiton.jaxx.application.swing.action.ApplicationActionUI;
import org.nuiton.jaxx.application.swing.action.ApplicationUIAction;
import org.nuiton.jaxx.application.swing.util.ApplicationErrorHelper;

import java.awt.Color;
import java.awt.Component;

/**
 * Created on 11/24/13.
 *
 * @author Tony Chemit - [email protected]
 * @since 2.8
 */
public interface ApplicationUIContext extends ApplicationContext {

    /**
     * @return the main ui of the application.
     */
    Component getMainUI();

    /**
     * @return the ui used to display long action.
     */
    ApplicationActionUI getActionUI();

    /**
     * Wait until the action ui is not null and then returns it.
     *
     * @return the ui used to display long action.
     */
    ApplicationActionUI getExistingActionUI();

    Component getBodyUI();

    Component getStatusUI();

    boolean isBusy();

    void setBusy(boolean busy);

    boolean isHideBody();

    void setHideBody(boolean b);

    Color getColorBlockingLayer();

    ApplicationActionFactory getActionFactory();

    ApplicationActionEngine getActionEngine();

    ApplicationErrorHelper getErrorHelper();

    String getI18nPrefix();

    String getDateFormat();

    /** Is the action already running? If yes, it will not run again (cf https://forge.nuiton.org/issues/3499) */
    boolean isActionInProgress(ApplicationUIAction action);

    void setActionInProgress(ApplicationUIAction action, boolean actionInProgress);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy