de.decidr.workflowinstanceviewer.client.menu.Menu.java Source code

Java tutorial

Introduction

Here is the source code for de.decidr.workflowinstanceviewer.client.menu.Menu.java

Source

/*
 * The DecidR Development Team licenses this file to you under
 * the Apache License, Version 2.0 (the "License"); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package de.decidr.workflowinstanceviewer.client.menu;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.MenuBar;

import de.decidr.workflowinstanceviewer.client.WorkflowInstanceViewerWidget;
import de.decidr.workflowinstanceviewer.client.resources.ViewerMessages;

/**
 * Menu for the instance viewer.
 * 
 * @author Wolfgang Fellger
 */
public class Menu extends MenuBar {

    public Menu(WorkflowInstanceViewerWidget widget) {
        // argument false = non vertical
        super(false);

        this.addStyleName("menu-std");

        ViewerMessages msg = GWT.create(ViewerMessages.class);
        addItem(msg.refresh(), new RefreshMenuItem(widget));
        addSeparator();
        addItem(msg.legend(), new ActivityStatusLegendMenuItem());
        addItem(msg.variables(), new VariablesMenuItem(widget));
    }
}