/*
 * @(#)MultiShowMenuBuilder.java  1.0  2011-01-14
 * 
 * Copyright (c) 2011 Werner Randelshofer
 * Staldenmattweg 2, Immensee, CH-6405, Switzerland.
 * All rights reserved.
 * 
 * The copyright of this software is owned by Werner Randelshofer. 
 * You may not use, copy or modify this software, except in  
 * accordance with the license agreement you entered into with  
 * Werner Randelshofer. For details see accompanying license terms.
 */

package ch.randelshofer.multishow;

import ch.randelshofer.app.action.DebugAction;
import ch.randelshofer.app.action.LoadNextAction;
import ch.randelshofer.app.action.LoadPreviousAction;
import javax.swing.ActionMap;
import javax.swing.JMenu;
import org.jhotdraw.app.Application;
import org.jhotdraw.app.DefaultMenuBuilder;
import org.jhotdraw.app.View;
import org.jhotdraw.util.ResourceBundleUtil;

/**
 * {@code MultiShowMenuBuilder}.
 *
 * @author Werner Randelshofer
 * @version 1.0 2011-01-14 Created.
 */
public class MultiShowMenuBuilder extends DefaultMenuBuilder {

  public MultiShowMenuBuilder() {
setSuppressIcons(true);
  }



    @Override
    public void addLoadFileItems(JMenu m, Application app, View v) {
        super.addLoadFileItems(m, app, v);
        ActionMap am = app.getActionMap(v);
        add(m, am.get(LoadNextAction.ID));
        add(m, am.get(LoadPreviousAction.ID));

    }

    @Override
    public void addOtherViewItems(JMenu m, Application app, View v) {
        m.addSeparator();
                new ViewMenuHandler(app, v, m);

    }

    @Override
    public void addHelpItems(JMenu m, Application app, View v) {
        super.addAboutItems(m, app, v);
        ActionMap am = app.getActionMap(v);
        add(m,am.get(DebugAction.ID));

    }

}
