Examples of VLToolBar


Examples of com.vlsolutions.swing.toolbars.VLToolBar

    protected MarathonFailureDetailView createFailureDetailView() {
        return new MarathonFailureDetailView();
    }

    private VLToolBar createToolbar() {
        VLToolBar bar = new VLToolBar("JUnit");
        bar.add(nextFailureAction.getButton());
        bar.add(prevFailureAction.getButton());
        nextFailureAction.setEnabled(false);
        prevFailureAction.setEnabled(false);
        bar.add(testViewAction.getButton());
        bar.addSeparator();
        bar.add(runAction.getButton());
        bar.add(stopAction.getButton());
        stopAction.setEnabled(false);
        bar.add(runSelectedAction.getButton());
        runSelectedAction.setEnabled(false);
        bar.add(testReportViewAction.getButton());
        testReportViewAction.setEnabled(false);
        return bar;
    }
View Full Code Here

Examples of com.vlsolutions.swing.toolbars.VLToolBar

        progressBar = new ProgressBar();
        counterPanel = createCounterPanel();
        failures = new DefaultListModel();
        testViewTab = createTestRunViews();
        failureView = createFailureDetailView();
        VLToolBar toolBar = createToolbar();
        JScrollPane tracePane = new JScrollPane(failureView.getComponent());
        JLabel traceLabel = new JLabel("Trace View", Icons.TRACE, SwingConstants.LEFT);
        JPanel junitPanel = new JPanel(new GridBagLayout());
        GridBagConstraints gbc = getGBC(0, GridBagConstraints.NONE);
        gbc.anchor = GridBagConstraints.EAST;
View Full Code Here

Examples of com.vlsolutions.swing.toolbars.VLToolBar

        tableScrollPane = new JScrollPane(logTable);
        panel1.add(tableScrollPane, BorderLayout.CENTER);
        panel = ToolBarContainer.createDefaultContainer(true, false, false, false, FlowLayout.TRAILING);
        panel.add(panel1);
        ToolBarPanel barPanel = panel.getToolBarPanelAt(BorderLayout.NORTH);
        VLToolBar option = new VLToolBar();
        infoButton = UIUtils.createInfoButton();
        infoButton.setToolTipText("Show all messages");
        infoButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                warnButton.setSelected(false);
                errorButton.setSelected(false);
                infoButton.setSelected(true);
                logger.setLogLevel(ILogger.INFO);
                logTableModel.fireTableDataChanged();
            }
        });
        option.add(infoButton);
        warnButton = UIUtils.createWarnButton();
        warnButton.setToolTipText("Show only warnings and errors");
        warnButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                warnButton.setSelected(true);
                errorButton.setSelected(false);
                infoButton.setSelected(false);
                logger.setLogLevel(ILogger.WARN);
                logTableModel.fireTableDataChanged();
            }
        });
        option.add(warnButton);
        errorButton = UIUtils.createErrorButton();
        errorButton.setToolTipText("Show only errors");
        errorButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                warnButton.setSelected(false);
                errorButton.setSelected(true);
                infoButton.setSelected(false);
                logger.setLogLevel(ILogger.ERROR);
                logTableModel.fireTableDataChanged();
            }
        });
        option.add(errorButton);
        barPanel.add(option, new ToolBarConstraints());
        VLToolBar toolBar = new VLToolBar();
        JButton clear = UIUtils.createClearButton();
        clear.setToolTipText("Clear");
        clear.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                clear();
            }
        });
        showMessage = UIUtils.createShowMessageButton();
        showMessage.setToolTipText("Show message");
        showMessage.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                int row = logTable.getSelectedRow();
                if (row == -1)
                    return;
                LogRecord record = logList.getRecordAt(row);
                showMessage(record);
            }
        });
        toolBar.add(showMessage);
        toolBar.add(clear);
        barPanel.add(toolBar, new ToolBarConstraints());
    }
View Full Code Here

Examples of com.vlsolutions.swing.toolbars.VLToolBar

     * Get the toolbar to be displayed in the Navigator view.
     *
     * @return toolbar, contains the actions
     */
    public VLToolBar getToolBar() {
        VLToolBar bar = new VLToolBar();
        bar.add(getActionButton(new GoUpAction()));
        bar.add(getActionButton(new HomeAction()));
        bar.addSeparator();
        bar.add(getActionButton(new CollapseAllAction()));
        bar.addSeparator();
        bar.add(getActionButton(new CopyAction()));
        bar.add(getActionButton(new PasteAction()));
        return bar;
    }
View Full Code Here

Examples of com.vlsolutions.swing.toolbars.VLToolBar

     *
     * @param container
     */
    private void createToolBar(ToolBarContainer container) {
        ToolBarPanel toolBarPanel = container.getToolBarPanelAt(BorderLayout.NORTH);
        VLToolBar toolBar = new VLToolBar();
        toolBar.add(getActionButton(newTestcaseAction));
        toolBar.add(getActionButton(etAction));
        toolBar.add(getActionButton(newModuleAction));
        toolBar.add(getActionButton(saveAction));
        toolBar.add(getActionButton(saveAsAction));
        toolBar.add(getActionButton(saveAllAction));
        toolBarPanel.add(toolBar, new ToolBarConstraints(0, 0));
        toolBar = new VLToolBar();
        toolBar.add(getActionButton(undoAction));
        toolBar.add(getActionButton(redoAction));
        toolBar.add(getActionButton(cutAction));
        toolBar.add(getActionButton(copyAction));
        toolBar.add(getActionButton(pasteAction));
        toolBar.add(getActionButton(searchAction));
        toolBarPanel.add(toolBar, new ToolBarConstraints(0, 1));
        toolBar = new VLToolBar();
        recordActionButton = getActionButton(recordAction);
        toolBar.add(recordActionButton);
        toolBar.add(getActionButton(pauseAction));
        toolBar.add(getActionButton(resumeRecordingAction));
        toolBar.add(getActionButton(insertScriptAction));
        toolBar.add(getActionButton(insertChecklistAction));
        toolBar.add(getActionButton(stopAction));
        toolBar.add(getActionButton(recorderConsoleAction));
        toolBarPanel.add(toolBar, new ToolBarConstraints(0, 2));
        toolBar = new VLToolBar();
        toolBar.add(getActionButton(openApplicationAction));
        toolBar.add(getActionButton(closeApplicationAction));
        toolBarPanel.add(toolBar, new ToolBarConstraints(0, 3));
        toolBar = new VLToolBar();
        toolBar.add(getActionButton(playAction));
        toolBar.add(getActionButton(slowPlayAction));
        toolBar.add(getActionButton(debugAction));
        toolBar.add(getActionButton(toggleBreakpointAction));
        toolBar.add(getActionButton(resumePlayingAction));
        toolBar.add(getActionButton(stepIntoAction));
        toolBar.add(getActionButton(stepOverAction));
        toolBar.add(getActionButton(stepReturnAction));
        toolBar.add(getActionButton(playerConsoleAction));
        toolBar.add(getActionButton(showReportAction));
        toolBarPanel.add(toolBar, new ToolBarConstraints(0, 4));
        if (actionProvider != null) {
            toolBar = new VLToolBar();
            IMarathonAction[] actions = actionProvider.getActions();
            for (int i = 0; i < actions.length; i++) {
                final IMarathonAction action = actions[i];
                if (!action.isToolBarAction())
                    continue;
                if (action.isSeperator()) {
                    toolBarPanel.add(toolBar, new ToolBarConstraints(0, 5));
                    toolBar = new VLToolBar();
                } else {
                    toolBar.add(getActionButton(createAction(action)));
                }
            }
            toolBarPanel.add(toolBar, new ToolBarConstraints(0, 5));
        }
        showReportAction.setEnabled(false);
View Full Code Here

Examples of com.vlsolutions.swing.toolbars.VLToolBar

        panel1.add(label, BorderLayout.NORTH);
        JScrollPane scrollPane = new JScrollPane(resultTable);
        panel1.add(scrollPane, BorderLayout.CENTER);
        panel.add(panel1);
        ToolBarPanel barPanel = panel.getToolBarPanelAt(BorderLayout.NORTH);
        VLToolBar toolBar = new VLToolBar();
        JButton clear = UIUtils.createClearButton();
        clear.setToolTipText("Clear");
        clear.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                clear();
            }
        });
        JButton showError = UIUtils.createShowMessageButton();
        showError.setToolTipText("Show message");
        showError.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                int row = resultTable.getSelectedRow();
                if (row == -1)
                    return;
                Failure failure = pbResult.getFailureAt(row);
                if (failure != null)
                    showMessage(failure);
            }
        });
        toolBar.add(showError);
        toolBar.add(clear);
        barPanel.add(toolBar, new ToolBarConstraints());
    }
View Full Code Here

Examples of com.vlsolutions.swing.toolbars.VLToolBar

    public TextAreaOutput() {
        DockingUISettings.getInstance().installUI();
        ToolBarContainer container = ToolBarContainer.createDefaultContainer(true, false, false, false, FlowLayout.TRAILING);
        ToolBarPanel barPanel = container.getToolBarPanelAt(BorderLayout.NORTH);
        VLToolBar bar = new VLToolBar();
        JButton clear = UIUtils.createClearButton();
        clear.setToolTipText("Clear");
        clear.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                textPane.clear();
            }
        });
        bar.add(clear);
        JButton export = UIUtils.createExportButton();
        export.setToolTipText("Export to a text file");
        export.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JFileChooser fileChooser = new JFileChooser();
                int dialog = fileChooser.showSaveDialog(component.getParent());
                if (dialog == JFileChooser.APPROVE_OPTION) {
                    File file = fileChooser.getSelectedFile();
                    if (file.exists()) {

                    }
                    try {
                        BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(file));
                        stream.write(textPane.getText().getBytes());
                        stream.close();
                    } catch (FileNotFoundException e1) {
                        e1.printStackTrace();
                    } catch (IOException e2) {
                        e2.printStackTrace();
                    }
                }
            }
        });
        bar.add(export);
        barPanel.add(bar, new ToolBarConstraints());

        textPane.setSize(100, 100);
        textPane.setEditable(false);
        textPane.setEnabled(true);
View Full Code Here

Examples of com.vlsolutions.swing.toolbars.VLToolBar

    }

    private JComponent createTree() {
        ToolBarContainer treePanel = ToolBarContainer.createDefaultContainer(true, true, true, true, FlowLayout.RIGHT);
        treePanel.setBorder(new EtchedBorder());
        VLToolBar bar = new VLToolBar();
        JButton button = UIUtils.createExpandAllButton();
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                expandAll(tree, true);
            }
        });
        bar.add(button);
        button = UIUtils.createCollapseAllButton();
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                expandAll(tree, false);
            }
        });
        bar.add(button);
        button = UIUtils.createRefreshButton();
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                Module module = window.refreshModuleFunctions();
                DefaultMutableTreeNode rootNode = module.createTreeNode(filterByWindowName.isSelected() ? windowName : null);
                DefaultTreeModel model = (DefaultTreeModel) tree.getModel();
                model.setRoot(rootNode);
                root = module;
                expandAll(tree, true);
                tree.setSelectionRows(new int[] {});
                argumentPanel.removeAll();
            }
        });
        bar.add(button);
        treePanel.getToolBarPanelAt(BorderLayout.NORTH).add(bar, new ToolBarConstraints());
        filterByWindowName = new JCheckBox("Filter by window name", true);
        filterByWindowName.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                DefaultMutableTreeNode rootNode = root.refreshNode(filterByWindowName.isSelected() ? windowName : null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.