Search in sources :

Example 1 with EJRWTMenuTreeRoot

use of org.entirej.applicationframework.rwt.application.components.menu.EJRWTMenuTreeRoot in project rap by entirej.

the class EJRWTApplicationManager method buildApplication.

/**
 * Builds and initialises the application from a stand alone application or
 * an applet
 *
 * @param container
 *            The application container is the outline for the application.
 *            It contains all {@link EJSwingApplicationComponent}'s that
 *            make up this application
 * @param rootFrame
 *            If the application is run as a standalone application or
 *            started as an applet then the rootFrame will be the actual
 *            application frame. This is then used to position dialog
 *            windows or messages etc. This ensures that the dialogs belong
 *            to the main application and do not get hidden behind the
 *            application when navigating through windows
 * @param applicationIcon
 *            The icon to use for the application
 */
public void buildApplication(EJRWTApplicationContainer container, Composite mainWindow) {
    if (container == null) {
        throw new NullPointerException("The ApplicationContainer cannot bu null");
    }
    shell = mainWindow.getShell();
    // build menu
    EJCoreProperties instance = EJCoreProperties.getInstance();
    EJFrameworkExtensionProperties definedProperties = instance.getApplicationDefinedProperties();
    if (definedProperties != null) {
        String menuConfigID = definedProperties.getStringProperty("APPLICATION_MENU");
        if (menuConfigID != null && menuConfigID.length() > 0) {
            EJRWTMenuTreeRoot root = EJRWTDefaultMenuPropertiesBuilder.buildMenuProperties(this, menuConfigID);
            if (root != null) {
                EJRWTDefaultMenuBuilder.createApplicationMenu(this, shell, root);
            }
        }
    }
    _applicationContainer = container;
    _applicationContainer.buildApplication(this, mainWindow, null);
}
Also used : EJFrameworkExtensionProperties(org.entirej.framework.core.properties.definitions.interfaces.EJFrameworkExtensionProperties) EJCoreProperties(org.entirej.framework.core.properties.EJCoreProperties) EJRWTMenuTreeRoot(org.entirej.applicationframework.rwt.application.components.menu.EJRWTMenuTreeRoot)

Aggregations

EJRWTMenuTreeRoot (org.entirej.applicationframework.rwt.application.components.menu.EJRWTMenuTreeRoot)1 EJCoreProperties (org.entirej.framework.core.properties.EJCoreProperties)1 EJFrameworkExtensionProperties (org.entirej.framework.core.properties.definitions.interfaces.EJFrameworkExtensionProperties)1