Package dan.swing.menus

Examples of dan.swing.menus.FlexibleMenuBar


    this.jobManagers = jobManagers;
    this.workflowBuilder = new WorkflowBuilderPanel(iconManager);

    //menu:
    FlexibleMenuBar menuBar = new FlexibleMenuBar();

    menuBar.add("File");
    JMenuItem mnuiSaveWorkflow = new JMenuItem("Save Workflow");
    menuBar.add("File", mnuiSaveWorkflow);

    InputFormFactory factory = new InputFormFactory(iconManager, new InputParameterWidgetFactory());
    ShowInputFormAction showInputForm = new ShowInputFormAction(workflowBuilder, factory);

    JMenuItem mnuiUseWorkflow = new JMenuItem(showInputForm);
    mnuiUseWorkflow.setText("Use Workflow");
    menuBar.add("File", mnuiUseWorkflow);

    menuBar.addSeparator("File");

    JMenuItem mnuiExit = new JMenuItem(new CloseFrameAction(this));
    mnuiExit.setText("Exit");
    menuBar.add("File", mnuiExit);


    menuBar.add("Job Managers");

    JMenu mnuManagersDisplay = new JMenu("Display");
    JobManagerMenuItems items = new JobManagerMenuItems(jobManagers, workflowBuilder.taskSelectPanel);
    items.addAll(mnuManagersDisplay);
    List entries = jobManagers.getJobManagerEntries();
    if (entries.size() > 0)
      items.selectJobManager(((JobManagerEntry)entries.get(0)).getId());
    menuBar.add("Job Managers", mnuManagersDisplay);


    setJMenuBar(menuBar);

    //content:
View Full Code Here


    //frame:
    JFrame frame = new JFrame("Test");

    //menu bar:
    FlexibleMenuBar menuBar = new FlexibleMenuBar();

    menuBar.add("File");
    menuBar.addSeparator("File");

    //Action exitAction = new SimpleExitAction();
    Action exitAction = new SafeExitAction(panel, submitListener.getStatusFrame());
    JMenuItem mnuiExit = new JMenuItem(exitAction);
    mnuiExit.setText("Exit");
    menuBar.add("File", mnuiExit);

    JMenuItem mnuiPrintJobs = new JMenuItem(new PrintJobsAction(jobManagers));
    mnuiPrintJobs.setText("Print Jobs");
    menuBar.add("Test", mnuiPrintJobs);

    JMenuItem mnuiShowJobs = new JMenuItem(new ShowFrameAction(submitListener.getStatusFrame()));
    mnuiShowJobs.setText("Show Jobs");
    menuBar.add("Test", mnuiShowJobs);

    frame.setJMenuBar(menuBar);

    addJobs(jobManagers, submitListener);
View Full Code Here

TOP

Related Classes of dan.swing.menus.FlexibleMenuBar

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.