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

at.spardat.xma.appshell.MenuAppShell Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     s IT Solutions AT Spardat GmbH - initial API and implementation
 *******************************************************************************/

/*
 * @(#) $Id: MenuAppShell.java 8695 2011-11-21 18:25:16Z laslovd $
 *
 *
 *
 *
 *
 */
package at.spardat.xma.appshell;

import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;

import at.spardat.xma.component.ComponentClient;
import at.spardat.xma.page.PageClient;

/**
 * An AppShell implementing the menu as SWT menu at the shellbar (Windows standard menu).
 * This class is to be thought to be subclassed by an application specific implementation.
 *
 * @author s3460
 * @since version_number
 */
public abstract class MenuAppShell extends ContextAppShell implements IMenuItemCreator {

    /**
     * Initializes an AppShell.
     *
     * @param component the Component containing the DialogPage.
     * @param stateless indicating if this page is stateless on the server.
     * @param style The SWT-Style for the Shell of the DialogPage.
     * @throws IllegalArgumentException if component is null.
     */
    public MenuAppShell(ComponentClient component, boolean stateless, int style) {
        super(component, stateless, style);
        addDelegate(new MenuAppShellDelegate());
    }

    /**
     * Initializes an AppShell inside a given Component.
     *
     * @param component the Component containing the DialogPage.
     * @param parentShell the Shell which shall be the parent of the Shell of the DialogPage.
     * @param style The SWT-Style for the Shell of the DialogPage.
     * @param stateless indicating if this page is stateless on the server.
     * @throws IllegalArgumentException if component is null.
     */
    public MenuAppShell(ComponentClient component, Shell parentShell, boolean stateless, int style) {
        super(component,parentShell,stateless,style);
        addDelegate(new MenuAppShellDelegate());
    }

    /**
     * Initializes an AppShell inside the same Component as the parent PageClient.
     *
     * @param parent the PageClient calling this DialogPage.
     * @param stateless indicating if this page is stateless on the server.
     * @param style The SWT-Style for the Shell of the DialogPage.
     */
    public MenuAppShell(PageClient parent, boolean stateless, int style) {
        super(parent,stateless,style);
        addDelegate(new MenuAppShellDelegate());
    }
    
    // TODO: comment me
    public MenuItem createMenuItem ( Menu parentMenu, int style, int index ) {
        return null;
    }

    // TODO: comment me
    public Menu createMenu ( Shell shell, int dropDown ) {
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy