Example usage for javax.swing JTabbedPane JTabbedPane

List of usage examples for javax.swing JTabbedPane JTabbedPane

Introduction

In this page you can find the example usage for javax.swing JTabbedPane JTabbedPane.

Prototype

public JTabbedPane() 

Source Link

Document

Creates an empty TabbedPane with a default tab placement of JTabbedPane.TOP.

Usage

From source file:org.ayound.js.debug.ui.DebugMainFrame.java

private Component createDebugPane() {
    JTabbedPane debugPane = new JTabbedPane();
    debugPane.addTab(Messages.getString("DebugMainFrame.Varibles"), new DebugContextPanel()); //$NON-NLS-1$
    debugPane.addTab(Messages.getString("DebugMainFrame.BreakPoints"), new BreakPointManagerPanel()); //$NON-NLS-1$
    debugPane.addTab(Messages.getString("DebugMainFrame.Expressions"), new ExpressionManagerPanel()); //$NON-NLS-1$
    return debugPane;

}

From source file:org.ayound.js.debug.ui.DebugMainFrame.java

private Component createDebugContextPane() {
    JPanel debugContextPanel = new JPanel();
    debugContextPanel.setLayout(new VerticalBagLayout());
    JTabbedPane debugTreePane = new JTabbedPane();
    DebugStackPanel treePanel = new DebugStackPanel();
    debugTreePane.addTab(Messages.getString("DebugMainFrame.Debug"), treePanel); //$NON-NLS-1$
    JsResourcePanel resourcePanel = new JsResourcePanel();
    debugTreePane.addTab(Messages.getString("DebugMainFrame.Resources"), resourcePanel); //$NON-NLS-1$
    debugContextPanel.add(debugTreePane);
    return debugContextPanel;
}

From source file:org.bigwiv.blastgraph.gui.BlastGraphFrame.java

private void initComponents() {

    URL icon;//from   w ww . j  a  v  a 2 s .co m
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/icon.png");
    this.setIconImage(Toolkit.getDefaultToolkit().createImage(icon));
    JComponent pane;
    pane = (JComponent) getContentPane();

    // ====================Menu Setting=======================
    newItem = new JMenuItem("New From Blast");
    newItem.setMnemonic('n');
    newItem.addActionListener(commandActionListener);

    openItem = new JMenuItem("Open");
    openItem.setMnemonic('o');
    openItem.addActionListener(commandActionListener);

    appendGraphItem = new JMenuItem("Append Graph");
    appendGraphItem.setMnemonic('a');
    appendGraphItem.addActionListener(commandActionListener);

    saveItem = new JMenuItem("Save");
    saveItem.setMnemonic('s');
    saveItem.addActionListener(commandActionListener);

    saveAsGraphItem = new JMenuItem("Save As");
    saveAsGraphItem.addActionListener(commandActionListener);

    exportGraphItem = new JMenuItem("Export");
    exportGraphItem.addActionListener(commandActionListener);

    saveCurGraphItem = new JMenuItem("Save Current Graph");
    saveCurGraphItem.addActionListener(commandActionListener);

    saveCurImgItem = new JMenuItem("Save Image");
    saveCurImgItem.addActionListener(commandActionListener);

    saveAllVertexAttrItem = new JMenuItem("Save Vertex Attribute");
    saveAllVertexAttrItem.addActionListener(commandActionListener);

    saveCurVertexAttrItem = new JMenuItem("Save Vertex Attribute");
    saveCurVertexAttrItem.addActionListener(commandActionListener);

    saveAsMenu = new JMenu("Save As");
    saveAsMenu.add(saveAsGraphItem);
    saveAsMenu.add(saveAllVertexAttrItem);

    saveCurGraphMenu = new JMenu("Save Current Graph");
    saveCurGraphMenu.add(saveCurGraphItem);
    saveCurGraphMenu.add(saveCurImgItem);
    saveCurGraphMenu.add(saveCurVertexAttrItem);

    printItem = new JMenuItem("Print...");
    printItem.setMnemonic('p');
    printItem.addActionListener(commandActionListener);

    importVertexAttrItem = new JMenuItem("Import Vertex Attribute");
    importVertexAttrItem.addActionListener(commandActionListener);

    closeItem = new JMenuItem("Close");
    closeItem.setMnemonic('c');
    closeItem.addActionListener(commandActionListener);

    exitItem = new JMenuItem("Exit");
    exitItem.setMnemonic('x');
    exitItem.addActionListener(commandActionListener);

    fileMenu = new JMenu("File");
    fileMenu.setMnemonic('f');
    fileMenu.add(newItem);
    fileMenu.add(openItem);
    fileMenu.add(appendGraphItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(closeItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(saveItem);
    fileMenu.add(saveAsMenu);
    fileMenu.add(saveCurGraphMenu);
    fileMenu.add(new JSeparator());
    fileMenu.add(printItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(importVertexAttrItem);
    fileMenu.add(exportGraphItem);
    fileMenu.add(new JSeparator());
    fileMenu.add(exitItem);

    // edit menu
    undoItem = new JMenuItem("Undo");
    redoItem = new JMenuItem("Redo");
    Global.COMMAND_MANAGER.registerUndoRedoItem(undoItem, redoItem);
    removeSingleItem = new JMenuItem("Remove Single Vertices");
    removeSingleItem.addActionListener(commandActionListener);
    filterItem = new JMenuItem("Filt Graph");
    filterItem.addActionListener(commandActionListener);
    settingItem = new JMenuItem("Setting");
    settingItem.addActionListener(commandActionListener);

    markovClusterItem = new JMenuItem("Markov Cluster");
    markovClusterItem.addActionListener(commandActionListener);

    // genomeNumFiltItem = new JMenuItem("GenomeNum Filt");
    // genomeNumFiltItem.addActionListener(commandActionListener);

    // removeSingleLinkageItem = new JMenuItem("Remove Single Linkage");
    // removeSingleLinkageItem.addActionListener(commandActionListener);

    editMenu = new JMenu("Edit");
    editMenu.setMnemonic('e');
    editMenu.add(undoItem);
    editMenu.add(redoItem);
    editMenu.add(filterItem);
    editMenu.add(markovClusterItem);
    editMenu.add(removeSingleItem);
    // editMenu.add(genomeNumFiltItem);
    // editMenu.add(removeSingleLinkageItem);
    editMenu.add(settingItem);

    // Tools Item
    geneContentItem = new JMenuItem("Gene Content Table");
    geneContentItem.addActionListener(commandActionListener);

    batchSaveItem = new JMenuItem("Batch Save");
    batchSaveItem.addActionListener(commandActionListener);

    mstItem = new JMenuItem("Minimum Spanning Tree");
    mstItem.addActionListener(commandActionListener);

    viewNeighborItem = new JMenuItem("View Neighbor of...");
    viewNeighborItem.addActionListener(commandActionListener);

    //
    // tempWorkItem = new JMenuItem("Temp Work");
    // tempWorkItem.addActionListener(commandActionListener);

    toolsMenu = new JMenu("Tools");
    toolsMenu.setMnemonic('t');
    toolsMenu.add(geneContentItem);
    toolsMenu.add(viewNeighborItem);
    toolsMenu.add(mstItem);
    toolsMenu.add(batchSaveItem);
    // toolsMenu.add(tempWorkItem);

    // graph Menu
    graphMenu = new JMenu("Graph");
    previousItem = new JMenuItem("Previous");
    previousItem.addActionListener(commandActionListener);
    nextItem = new JMenuItem("Next");
    nextItem.addActionListener(commandActionListener);
    resortItem = new JMenuItem("Resort graphs");
    resortItem.addActionListener(commandActionListener);

    graphMenu.add(nextItem);
    graphMenu.add(previousItem);
    graphMenu.add(resortItem);

    // help Menu
    helpContentItem = new JMenuItem("Online Manual");
    helpContentItem.addActionListener(commandActionListener);
    aboutItem = new JMenuItem("About BlastGraph");
    aboutItem.addActionListener(commandActionListener);

    helpMenu = new JMenu("Help");
    helpMenu.add(helpContentItem);
    helpMenu.add(aboutItem);

    // menu bar
    menuBar = new JMenuBar();
    menuBar.add(fileMenu);
    menuBar.add(editMenu);
    menuBar.add(graphMenu);
    menuBar.add(toolsMenu);
    menuBar.add(helpMenu);

    setJMenuBar(menuBar);

    // ===================mainPanel Setting===================
    GridBagManager.reset();
    GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
    GridBagManager.GRID_BAG.anchor = GridBagConstraints.FIRST_LINE_START;
    GridBagManager.GRID_BAG.weightx = 0;
    GridBagManager.GRID_BAG.weighty = 0;
    GridBagManager.GRID_BAG.insets = new Insets(2, 2, 1, 1);

    mainPanel = new JPanel();
    mainPanel.setLayout(new BorderLayout());
    pane.add(mainPanel);

    hsplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    hsplitPane.setContinuousLayout(true);
    hsplitPane.setOneTouchExpandable(true);
    hsplitPane.setResizeWeight(0.9);

    // ===================toolBarPanel Setting===================

    // graph file toolbar
    fileToolBar = new JToolBar();
    fileToolBar.setRollover(true);
    newButton = new JButton();
    newButton.setBorderPainted(false);
    newButton.setMnemonic('n');
    newButton.setToolTipText("New From Blast");
    newButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/filenew.png");
    // System.out.println(icon);
    newButton.setIcon(new ImageIcon(icon));

    openButton = new JButton();
    openButton.setBorderPainted(false);
    openButton.setMnemonic('o');
    openButton.setToolTipText("Open");
    openButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/fileopen.png");
    openButton.setIcon(new ImageIcon(icon));

    saveButton = new JButton();
    saveButton.setBorderPainted(false);
    saveButton.setMnemonic('s');
    saveButton.setToolTipText("Save");
    saveButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/filesave.png");
    saveButton.setIcon(new ImageIcon(icon));

    saveCurImgButton = new JButton();
    saveCurImgButton.setBorderPainted(false);
    saveCurImgButton.setToolTipText("Save current image");
    saveCurImgButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/saveimage.png");
    saveCurImgButton.setIcon(new ImageIcon(icon));

    printButton = new JButton();
    printButton.setBorderPainted(false);
    printButton.setToolTipText("Print...");
    printButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/fileprint.png");
    printButton.setIcon(new ImageIcon(icon));

    fileToolBar.add(newButton);
    fileToolBar.add(openButton);
    fileToolBar.add(saveButton);
    fileToolBar.add(saveCurImgButton);
    fileToolBar.add(printButton);

    // graph control toolbar
    graphToolBar = new JToolBar();
    graphToolBar.setRollover(true);

    previousButton = new JButton();
    previousButton.setBorderPainted(false);
    previousButton.setToolTipText("Previous graph");
    previousButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/previous.png");
    previousButton.setIcon(new ImageIcon(icon));

    indexField = new JTextField();
    indexField.setSize(new Dimension(25, 16));
    indexField.setMinimumSize(new Dimension(25, 16));
    indexField.setPreferredSize(new Dimension(25, 16));
    indexField.addKeyListener(keyListener);

    nextButton = new JButton();
    nextButton.setBorderPainted(false);
    nextButton.setToolTipText("Next graph");
    nextButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/next.png");
    nextButton.setIcon(new ImageIcon(icon));

    filterButton = new JButton();
    filterButton.setBorderPainted(false);
    filterButton.setToolTipText("Filt graph");
    filterButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/filter.png");
    filterButton.setIcon(new ImageIcon(icon));

    resortButton = new JButton();
    resortButton.setBorderPainted(false);
    resortButton.setToolTipText("Resort graph");
    resortButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/resort.png");
    resortButton.setIcon(new ImageIcon(icon));

    searchField = new JTextField();
    searchField.setSize(new Dimension(60, 16));
    searchField.setMinimumSize(new Dimension(60, 16));
    searchField.setPreferredSize(new Dimension(60, 16));
    searchField.addKeyListener(keyListener);

    searchButton = new JButton();
    searchButton.setBorderPainted(false);
    searchButton.setToolTipText("Search");
    searchButton.addActionListener(commandActionListener);
    icon = getClass().getResource("/org/bigwiv/blastgraph/icons/search.png");
    searchButton.setIcon(new ImageIcon(icon));

    graphToolBar.add(filterButton);
    graphToolBar.add(resortButton);
    // graphToolBar.add(new JToolBar.Separator());
    graphToolBar.add(previousButton);
    graphToolBar.add(indexField);
    graphToolBar.add(nextButton);
    graphToolBar.add(searchField);
    graphToolBar.add(searchButton);

    // view toolbar (modebox & layoutbox)
    viewToolBar = new JToolBar();
    viewToolBar.setRollover(true);
    modeBox = graphMouse.getModeComboBox();
    modeBox.addItemListener(new ItemListener() {

        @Override
        public void itemStateChanged(ItemEvent e) {
            int index = modeBox.getSelectedIndex();
            if (index == 2) {
                int annotCount = annotationToolBar.getComponentCount();
                for (int i = 0; i < annotCount; i++) {
                    annotationToolBar.getComponent(i).setEnabled(true);
                }
            } else {
                int annotCount = annotationToolBar.getComponentCount();
                for (int i = 0; i < annotCount; i++) {
                    annotationToolBar.getComponent(i).setEnabled(false);
                }
            }

        }
    });
    layoutBox = this.getLayoutComboBox();
    viewToolBar.add(modeBox);
    viewToolBar.add(layoutBox);

    colorComboBox = new JComboBox(new String[] { "vertex color", "index", "strand", "genomeAcc", "organism" });
    viewToolBar.add(colorComboBox);

    // add additional menu to graphMenu
    modeMenu = graphMouse.getModeMenu();
    modeMenu.setText("Mode");
    layoutMenu = getLayoutMenu();
    layoutMenu.setText("Layout");
    graphMenu.add(modeMenu);
    graphMenu.add(layoutMenu);

    // annotation toolbar
    AnnotationControls<HitVertex, ValueEdge> annotationControls = new AnnotationControls<HitVertex, ValueEdge>(
            annotatingPlugin);
    annotationToolBar = annotationControls.getAnnotationsToolBar();
    ((JButton) annotationToolBar.getComponent(1)).setBorderPainted(false);
    ((JToggleButton) annotationToolBar.getComponent(2)).setBorderPainted(false);

    // add toolbars to toolBarPanel
    toolBarPanel = new JPanel();
    toolBarPanel.setLayout(new ModifiedFlowLayout(ModifiedFlowLayout.LEFT, 0, 0));
    toolBarPanel.setBorder(new EtchedBorder());
    toolBarPanel.add(fileToolBar);
    toolBarPanel.add(graphToolBar);
    toolBarPanel.add(viewToolBar);
    toolBarPanel.add(annotationToolBar);

    mainPanel.add(toolBarPanel, BorderLayout.NORTH);
    mainPanel.add(hsplitPane, BorderLayout.CENTER);

    // GridBagManager.add(mainPanel, toolBarPanel, 0, 0, 1, 1);
    // GridBagManager.add(mainPanel, hsplitPane, 0, 1, 1, 1);

    // mainPanel.add(toolBarPanel, BorderLayout.NORTH);

    // ===================vsplitPane Setting=================
    vsplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    vsplitPane.setContinuousLayout(true);
    vsplitPane.setOneTouchExpandable(true);
    vsplitPane.setResizeWeight(0.9);

    hsplitPane.setLeftComponent(vsplitPane);
    // GridBagManager.GRID_BAG.weightx = 0.9;
    // GridBagManager.GRID_BAG.weighty = 1;
    // GridBagManager.add(mainPanel, vsplitPane, 0, 1, 1, 2);
    // mainPanel.add(vsplitPane, BorderLayout.CENTER);

    // ===================vvPanel Setting===================

    vvPanel = new GraphZoomScrollPane(vv);
    vsplitPane.setTopComponent(vvPanel);

    // ===================Tab Panel Setting=======================
    // progressPanel = new ProgressPanel();

    verticesTable = new VerticesTable();
    verticesTable.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseClicked(MouseEvent e) {
            int row = verticesTable.rowAtPoint(e.getPoint());
            int col = verticesTable.columnAtPoint(e.getPoint());
            // System.out.println(row + " " + col);
            String value = verticesTable.getValueAt(row, col).toString();
            // System.out.println(value);
            if (Global.graph.containsVertex(new HitVertex(value))) {
                for (int i = 0; i < subSetList.size(); i++) {
                    if (subSetList.get(i).contains(new HitVertex(value))) {
                        curGraph = FilterUtils.createInducedSubgraph(subSetList.get(i), Global.graph);
                        PickedState<HitVertex> pickedVertexState = vv.getPickedVertexState();

                        // picked is a reference to picked vertices
                        // use a temp set to avoid concurrent modification
                        Set<HitVertex> picked = pickedVertexState.getPicked();
                        Set<HitVertex> temp = new HashSet<HitVertex>();
                        for (HitVertex hitVertex : picked) {
                            temp.add(hitVertex);
                        }
                        for (HitVertex hv : temp) {
                            pickedVertexState.pick(hv, false);
                        }

                        pickedVertexState.pick(new HitVertex(value), true);
                        // refreshSubGraphView();
                        return;
                    }
                }
            }
        }
    });

    verticesTable.addMouseMotionListener(new MouseMotionAdapter() {
        @Override
        public void mouseMoved(MouseEvent e) {
            int row = verticesTable.rowAtPoint(e.getPoint());
            int col = verticesTable.columnAtPoint(e.getPoint());
            String value = verticesTable.getValueAt(row, col).toString();
            // System.out.println(value);
            if (Global.graph.containsVertex(value)) {
                Cursor normalCursor = new Cursor(Cursor.HAND_CURSOR);
                setCursor(normalCursor);
            } else {
                Cursor normalCursor = new Cursor(Cursor.DEFAULT_CURSOR);
                setCursor(normalCursor);
            }
        }
    });
    verticesPanel = new JPanel();
    verticesPanel.setLayout(new GridLayout());
    verticesPanel.add(new JScrollPane(verticesTable));

    edgesTable = new EdgesTable();
    edgesPanel = new JPanel();
    edgesPanel.setLayout(new GridLayout());
    edgesPanel.add(new JScrollPane(edgesTable));

    tabbedPane = new JTabbedPane();
    tabbedPane.addTab("Vertices", verticesPanel);
    tabbedPane.addTab("Edges", edgesPanel);
    vsplitPane.setBottomComponent(tabbedPane);

    graphMouse.addPichedChangeListener(verticesTable, edgesTable);

    // ===================Info Panel Setting===================
    infoPanel = new JPanel(new GridBagLayout());
    GridBagManager.GRID_BAG.weightx = 0.1;
    GridBagManager.GRID_BAG.weighty = 1;
    hsplitPane.setRightComponent(infoPanel);

    JPanel mainInfoPanel = new JPanel(new GridBagLayout());
    mainInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Main Info"));

    JPanel currentInfoPanel = new JPanel(new GridBagLayout());
    currentInfoPanel.setBorder(
            BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Current Graph"));
    JPanel selectedInfoPanel = new JPanel(new GridBagLayout());
    selectedInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Selected"));

    JPanel statisticsInfoPanel = new JPanel(new GridBagLayout());
    statisticsInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Statistics"));

    JPanel progressInfoPanel = new JPanel(new GridBagLayout());
    progressInfoPanel
            .setBorder(BorderFactory.createTitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "Progress"));

    GridBagManager.GRID_BAG.anchor = GridBagConstraints.NORTH;
    GridBagManager.GRID_BAG.fill = GridBagConstraints.HORIZONTAL;
    GridBagManager.GRID_BAG.weighty = 0;
    GridBagManager.add(infoPanel, mainInfoPanel, 0, 1, 1, 1);
    GridBagManager.add(infoPanel, currentInfoPanel, 0, 2, 1, 1);
    GridBagManager.add(infoPanel, selectedInfoPanel, 0, 3, 1, 1);
    GridBagManager.GRID_BAG.weighty = 0.5;
    GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
    GridBagManager.add(infoPanel, statisticsInfoPanel, 0, 4, 1, 1);
    GridBagManager.add(infoPanel, progressInfoPanel, 0, 5, 1, 1);

    // mainInfoPanel
    {
        JLabel vertices = new JLabel("Vertices:");
        vertexCountLabel = new JLabel("0");
        JLabel edges = new JLabel("Edges:");
        edgeCountLabel = new JLabel("0");
        JLabel subGraphs = new JLabel("SubGraphs:");
        subGraphCountLabel = new JLabel("0");
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.WEST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(mainInfoPanel, vertices, 0, 0, 1, 1);
        GridBagManager.add(mainInfoPanel, edges, 0, 1, 1, 1);
        GridBagManager.add(mainInfoPanel, subGraphs, 0, 2, 1, 1);
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.EAST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(mainInfoPanel, vertexCountLabel, 1, 0, 1, 1);
        GridBagManager.add(mainInfoPanel, edgeCountLabel, 1, 1, 1, 1);
        GridBagManager.add(mainInfoPanel, subGraphCountLabel, 1, 2, 1, 1);

    } // end of mainInfoPanel

    // currentInfoPanel
    {
        JLabel vertices = new JLabel("Vertices:");
        currentVertexCountLabel = new JLabel("0");

        JLabel edges = new JLabel("Edges:");
        currentEdgeCountLabel = new JLabel("0");

        JLabel acc = new JLabel("ACC:");
        currentAccLabel = new JLabel("0");

        GridBagManager.GRID_BAG.anchor = GridBagConstraints.WEST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(currentInfoPanel, vertices, 0, 0, 1, 1);
        GridBagManager.add(currentInfoPanel, edges, 0, 1, 1, 1);
        GridBagManager.add(currentInfoPanel, acc, 0, 2, 1, 1);
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.EAST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(currentInfoPanel, currentVertexCountLabel, 1, 0, 1, 1);
        GridBagManager.add(currentInfoPanel, currentEdgeCountLabel, 1, 1, 1, 1);
        GridBagManager.add(currentInfoPanel, currentAccLabel, 1, 2, 1, 1);

    } // end of currentInfoPanel

    // selectedInfoPanel
    {
        JLabel vertices = new JLabel("Vertices:");
        selectedVertexCountLabel = new JLabel("0");
        JLabel edges = new JLabel("Edges:");
        selectedEdgeCountLabel = new JLabel("0");
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.WEST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(selectedInfoPanel, vertices, 0, 0, 1, 1);
        GridBagManager.add(selectedInfoPanel, edges, 0, 1, 1, 1);
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.EAST;
        GridBagManager.GRID_BAG.weightx = 0.5;
        GridBagManager.add(selectedInfoPanel, selectedVertexCountLabel, 1, 0, 1, 1);
        GridBagManager.add(selectedInfoPanel, selectedEdgeCountLabel, 1, 1, 1, 1);
        CollectionChangeListener<HitVertex> svListener = new CollectionChangeListener<HitVertex>() {

            @Override
            public void onCollectionChange(Set<HitVertex> set) {
                selectedVertexCountLabel.setText("" + set.size());
            }
        };

        CollectionChangeListener<ValueEdge> veListener = new CollectionChangeListener<ValueEdge>() {

            @Override
            public void onCollectionChange(Set<ValueEdge> set) {
                selectedEdgeCountLabel.setText("" + set.size());
            }
        };

        graphMouse.addPichedChangeListener(svListener, veListener);

    } // end of selectedInfoPanel

    {// statistics Panel
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.NORTH;
        GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
        GridBagManager.add(statisticsInfoPanel, graphStatisticsPanel, 0, 0, 1, 1);
    } // statistics Panel

    {// progressInfoPanel
        GridBagManager.GRID_BAG.anchor = GridBagConstraints.NORTH;
        GridBagManager.GRID_BAG.fill = GridBagConstraints.BOTH;
        GridBagManager.add(progressInfoPanel, progressPanel, 0, 0, 1, 1);
    } // progressInfoPanel
      // set frame size
    Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    setSize((screen.width * 3) / 4, (screen.height * 9) / 10);
    setLocation(screen.width / 6, screen.height / 16);

    refreshUI(false);
}

From source file:org.broad.igv.cbio.FilterGeneNetworkUI.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    // Generated using JFormDesigner non-commercial license
    tabbedPane = new JTabbedPane();
    dialogPane = new JPanel();
    panel1 = new JPanel();
    addRow = new JButton();
    contentPane = new JPanel();
    scrollPane1 = new JScrollPane();
    geneTable = new JTable();
    buttonBar = new JPanel();
    totNumGenes = new JLabel();
    keepIsolated = new JCheckBox();
    okButton = new JButton();
    refFilter = new JButton();
    cancelButton = new JButton();
    helpButton = new JButton();
    saveButton = new JButton();
    thresholds = new JPanel();
    contentPanel = new JPanel();
    label2 = new JLabel();
    label3 = new JLabel();
    delInput = new JTextField();
    label4 = new JLabel();
    expUpInput = new JTextField();
    label7 = new JLabel();
    expDownInput = new JTextField();
    ampInput = new JTextField();
    label1 = new JLabel();
    mutInput = new JTextField();
    label6 = new JLabel();
    label8 = new JLabel();
    separator1 = new JSeparator();
    separator3 = new JSeparator();
    separator2 = new JSeparator();
    panel2 = new JPanel();
    textArea1 = new JTextArea();

    //======== this ========
    setMinimumSize(new Dimension(600, 22));
    setModalityType(Dialog.ModalityType.DOCUMENT_MODAL);
    Container contentPane2 = getContentPane();
    contentPane2.setLayout(new BorderLayout());

    //======== tabbedPane ========
    {/*from   w w  w  . ja v  a  2 s . c om*/
        tabbedPane.setPreferredSize(new Dimension(550, 346));
        tabbedPane.setMinimumSize(new Dimension(550, 346));
        tabbedPane.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
                tabbedPaneStateChanged(e);
            }
        });

        //======== dialogPane ========
        {
            dialogPane.setBorder(new EmptyBorder(12, 12, 12, 12));
            dialogPane.setMinimumSize(new Dimension(443, 300));
            dialogPane.setPreferredSize(new Dimension(443, 300));
            dialogPane.setLayout(new GridBagLayout());
            ((GridBagLayout) dialogPane.getLayout()).columnWidths = new int[] { 0, 0 };
            ((GridBagLayout) dialogPane.getLayout()).rowHeights = new int[] { 0, 0, 0, 0, 0, 0 };
            ((GridBagLayout) dialogPane.getLayout()).columnWeights = new double[] { 1.0, 1.0E-4 };
            ((GridBagLayout) dialogPane.getLayout()).rowWeights = new double[] { 0.0, 0.0, 1.0, 0.0, 0.0,
                    1.0E-4 };

            //======== panel1 ========
            {
                panel1.setLayout(new GridBagLayout());
                ((GridBagLayout) panel1.getLayout()).columnWidths = new int[] { 0, 0, 0 };
                ((GridBagLayout) panel1.getLayout()).rowHeights = new int[] { 0, 0 };
                ((GridBagLayout) panel1.getLayout()).columnWeights = new double[] { 0.0, 0.0, 1.0E-4 };
                ((GridBagLayout) panel1.getLayout()).rowWeights = new double[] { 0.0, 1.0E-4 };

                //---- addRow ----
                addRow.setText("Add Filter");
                addRow.setMaximumSize(new Dimension(200, 28));
                addRow.setMinimumSize(new Dimension(100, 28));
                addRow.setPreferredSize(new Dimension(150, 28));
                addRow.setVisible(false);
                addRow.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        addRowActionPerformed(e);
                    }
                });
                panel1.add(addRow, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
            }
            dialogPane.add(panel1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                    GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

            //======== contentPane ========
            {
                contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
            }
            dialogPane.add(contentPane, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                    GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

            //======== scrollPane1 ========
            {

                //---- geneTable ----
                geneTable.setAutoCreateRowSorter(true);
                scrollPane1.setViewportView(geneTable);
            }
            dialogPane.add(scrollPane1, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                    GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

            //======== buttonBar ========
            {
                buttonBar.setBorder(new EmptyBorder(12, 0, 0, 0));
                buttonBar.setLayout(new GridBagLayout());
                ((GridBagLayout) buttonBar.getLayout()).columnWidths = new int[] { 0, 85, 85, 80 };
                ((GridBagLayout) buttonBar.getLayout()).columnWeights = new double[] { 1.0, 0.0, 0.0, 0.0 };

                //---- totNumGenes ----
                totNumGenes.setText("Total Genes: #");
                buttonBar.add(totNumGenes, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
                        GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

                //---- keepIsolated ----
                keepIsolated.setText("Keep Isolated Genes");
                keepIsolated.setVisible(false);
                buttonBar.add(keepIsolated, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0,
                        GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

                //---- okButton ----
                okButton.setText("View Network");
                okButton.setToolTipText("Display the network in a web browser");
                okButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        okButtonActionPerformed(e);
                    }
                });
                buttonBar.add(okButton, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));

                //---- refFilter ----
                refFilter.setText("Refresh Filter");
                refFilter.setVisible(false);
                refFilter.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        refFilterActionPerformed(e);
                    }
                });
                buttonBar.add(refFilter, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                        GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));

                //---- cancelButton ----
                cancelButton.setText("Cancel");
                cancelButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        cancelButtonActionPerformed(e);
                    }
                });
                buttonBar.add(cancelButton, new GridBagConstraints(3, 4, 1, 1, 0.0, 0.0,
                        GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

                //---- helpButton ----
                helpButton.setText("Help");
                helpButton.setVisible(false);
                buttonBar.add(helpButton, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0,
                        GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 0), 0, 0));

                //---- saveButton ----
                saveButton.setText("Save Table");
                saveButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        saveButtonActionPerformed(e);
                    }
                });
                buttonBar.add(saveButton, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0,
                        GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0));
            }
            dialogPane.add(buttonBar, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
                    GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
        }
        tabbedPane.addTab("Filter", dialogPane);

        //======== thresholds ========
        {
            thresholds.setPreferredSize(new Dimension(550, 196));
            thresholds.setMinimumSize(new Dimension(550, 196));
            thresholds.setLayout(null);

            //======== contentPanel ========
            {
                contentPanel.setBorder(new EtchedBorder());
                contentPanel.setLayout(null);

                //---- label2 ----
                label2.setText("Amplification:");
                label2.setHorizontalAlignment(SwingConstants.RIGHT);
                label2.setLabelFor(ampInput);
                label2.setToolTipText("Amplification score, on a log-normalized scale");
                label2.setPreferredSize(new Dimension(90, 18));
                contentPanel.add(label2);
                label2.setBounds(140, 96, label2.getPreferredSize().width, 18);

                //---- label3 ----
                label3.setText("Deletion:");
                label3.setHorizontalAlignment(SwingConstants.RIGHT);
                label3.setLabelFor(delInput);
                label3.setToolTipText("Deletion score, on a log-normalized scale");
                label3.setPreferredSize(new Dimension(60, 16));
                contentPanel.add(label3);
                label3.setBounds(360, 96, label3.getPreferredSize().width, 18);

                //---- delInput ----
                delInput.setText("0.7");
                delInput.setMinimumSize(new Dimension(34, 28));
                delInput.setPreferredSize(new Dimension(45, 28));
                delInput.setMaximumSize(new Dimension(50, 2147483647));
                contentPanel.add(delInput);
                delInput.setBounds(new Rectangle(new Point(240, 162), delInput.getPreferredSize()));

                //---- label4 ----
                label4.setText("Up:");
                label4.setHorizontalAlignment(SwingConstants.RIGHT);
                label4.setLabelFor(expUpInput);
                label4.setToolTipText("Expression score, log-normalized scale");
                label4.setPreferredSize(new Dimension(100, 18));
                contentPanel.add(label4);
                label4.setBounds(130, 168, label4.getPreferredSize().width, 18);

                //---- expUpInput ----
                expUpInput.setText("0.1");
                expUpInput.setMinimumSize(new Dimension(34, 28));
                expUpInput.setPreferredSize(new Dimension(45, 28));
                contentPanel.add(expUpInput);
                expUpInput.setBounds(new Rectangle(new Point(430, 91), expUpInput.getPreferredSize()));

                //---- label7 ----
                label7.setText("Down:");
                label7.setHorizontalAlignment(SwingConstants.RIGHT);
                label7.setLabelFor(expDownInput);
                label7.setToolTipText("Expression score, log-normalized scale");
                label7.setPreferredSize(new Dimension(120, 16));
                contentPanel.add(label7);
                label7.setBounds(300, 168, label7.getPreferredSize().width, 18);

                //---- expDownInput ----
                expDownInput.setText("0.1");
                expDownInput.setPreferredSize(new Dimension(45, 28));
                expDownInput.setMinimumSize(new Dimension(34, 28));
                expDownInput.setMaximumSize(new Dimension(50, 2147483647));
                contentPanel.add(expDownInput);
                expDownInput.setBounds(new Rectangle(new Point(430, 162), expDownInput.getPreferredSize()));

                //---- ampInput ----
                ampInput.setText("0.7");
                ampInput.setMinimumSize(new Dimension(34, 28));
                ampInput.setPreferredSize(new Dimension(45, 28));
                contentPanel.add(ampInput);
                ampInput.setBounds(new Rectangle(new Point(240, 91), ampInput.getPreferredSize()));

                //---- label1 ----
                label1.setText("Mutation:");
                label1.setHorizontalAlignment(SwingConstants.RIGHT);
                label1.setLabelFor(mutInput);
                label1.setToolTipText("Minimum number of mutations found");
                label1.setPreferredSize(new Dimension(66, 18));
                contentPanel.add(label1);
                label1.setBounds(50, 26, label1.getPreferredSize().width, 18);

                //---- mutInput ----
                mutInput.setText("1");
                mutInput.setAutoscrolls(false);
                mutInput.setMinimumSize(new Dimension(34, 28));
                mutInput.setPreferredSize(new Dimension(45, 28));
                contentPanel.add(mutInput);
                mutInput.setBounds(new Rectangle(new Point(240, 21), mutInput.getPreferredSize()));

                //---- label6 ----
                label6.setText("Copy Number:");
                contentPanel.add(label6);
                label6.setBounds(30, 96, label6.getPreferredSize().width, 18);

                //---- label8 ----
                label8.setText("Expression:");
                label8.setHorizontalAlignment(SwingConstants.RIGHT);
                contentPanel.add(label8);
                label8.setBounds(30, 168, 86, 18);
                contentPanel.add(separator1);
                separator1.setBounds(0, 135, 500, 10);
                contentPanel.add(separator3);
                separator3.setBounds(0, 65, 500, 10);

                //---- separator2 ----
                separator2.setPreferredSize(new Dimension(10, 210));
                separator2.setOrientation(SwingConstants.VERTICAL);
                contentPanel.add(separator2);
                separator2.setBounds(new Rectangle(new Point(120, 0), separator2.getPreferredSize()));

                { // compute preferred size
                    Dimension preferredSize = new Dimension();
                    for (int i = 0; i < contentPanel.getComponentCount(); i++) {
                        Rectangle bounds = contentPanel.getComponent(i).getBounds();
                        preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                        preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                    }
                    Insets insets = contentPanel.getInsets();
                    preferredSize.width += insets.right;
                    preferredSize.height += insets.bottom;
                    contentPanel.setMinimumSize(preferredSize);
                    contentPanel.setPreferredSize(preferredSize);
                }
            }
            thresholds.add(contentPanel);
            contentPanel.setBounds(12, 80, 500, 210);

            //======== panel2 ========
            {
                panel2.setLayout(null);

                { // compute preferred size
                    Dimension preferredSize = new Dimension();
                    for (int i = 0; i < panel2.getComponentCount(); i++) {
                        Rectangle bounds = panel2.getComponent(i).getBounds();
                        preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                        preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                    }
                    Insets insets = panel2.getInsets();
                    preferredSize.width += insets.right;
                    preferredSize.height += insets.bottom;
                    panel2.setMinimumSize(preferredSize);
                    panel2.setPreferredSize(preferredSize);
                }
            }
            thresholds.add(panel2);
            panel2.setBounds(new Rectangle(new Point(55, 25), panel2.getPreferredSize()));

            //---- textArea1 ----
            textArea1.setText(
                    "Samples are considered to have a given \"event\" if the value is above the thresholds below.");
            textArea1.setEditable(false);
            textArea1.setLineWrap(true);
            textArea1.setBackground(UIManager.getColor("Button.background"));
            thresholds.add(textArea1);
            textArea1.setBounds(15, 10, 430, 40);

            { // compute preferred size
                Dimension preferredSize = new Dimension();
                for (int i = 0; i < thresholds.getComponentCount(); i++) {
                    Rectangle bounds = thresholds.getComponent(i).getBounds();
                    preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
                    preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
                }
                Insets insets = thresholds.getInsets();
                preferredSize.width += insets.right;
                preferredSize.height += insets.bottom;
                thresholds.setMinimumSize(preferredSize);
                thresholds.setPreferredSize(preferredSize);
            }
        }
        tabbedPane.addTab("Thresholds", thresholds);

    }
    contentPane2.add(tabbedPane, BorderLayout.NORTH);
    pack();
    setLocationRelativeTo(getOwner());
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}

From source file:org.datanucleus.ide.idea.ui.DNEConfigForm.java

/**
 * Method generated by IntelliJ IDEA GUI Designer
 * >>> IMPORTANT!! <<<
 * DO NOT edit this method OR call it in your code!
 *
 * @noinspection ALL/*from  w  ww.java2  s. c o m*/
 */
private void $$$setupUI$$$() {
    createUIComponents();
    parentPanel.setLayout(new GridLayoutManager(2, 1, new Insets(1, 0, 0, 0), -1, -1));
    configTabbedPane = new JTabbedPane();
    parentPanel.add(configTabbedPane,
            new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null,
                    null, 0, false));
    configPanel = new JPanel();
    configPanel.setLayout(new GridLayoutManager(5, 3, new Insets(6, 2, 2, 2), -1, -1));
    configTabbedPane.addTab("Enhancer", configPanel);
    indexNotReadyPanel = new JPanel();
    indexNotReadyPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    configPanel.add(indexNotReadyPanel,
            new GridConstraints(3, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null,
                    null, 0, false));
    final JLabel label1 = new JLabel();
    label1.setText("Please wait until indexing is finished");
    indexNotReadyPanel.add(label1,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    contentPanel = new JPanel();
    contentPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
    configPanel.add(contentPanel,
            new GridConstraints(4, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null,
                    null, 0, false));
    final JPanel panel1 = new JPanel();
    panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    contentPanel.add(panel1,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(new Color(-3355444)),
            "Affected Modules"));
    final JScrollPane scrollPane1 = new JScrollPane();
    panel1.add(scrollPane1,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    affectedModulesTable = new JTable();
    affectedModulesTable.setEnabled(true);
    affectedModulesTable.setFillsViewportHeight(false);
    affectedModulesTable.setPreferredScrollableViewportSize(new Dimension(450, 30));
    scrollPane1.setViewportView(affectedModulesTable);
    final JPanel panel2 = new JPanel();
    panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    contentPanel.add(panel2,
            new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    panel2.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(new Color(-3355444)),
            "Metadata and annotated classes for enhancement", TitledBorder.DEFAULT_JUSTIFICATION,
            TitledBorder.DEFAULT_POSITION, null, new Color(-16777216)));
    infoPanel = new JPanel();
    infoPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    panel2.add(infoPanel,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    final JLabel label2 = new JLabel();
    label2.setText("Please click 'Make Project' to see affected files");
    infoPanel.add(label2,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    metaDataAndClassesScrollPane = new JScrollPane();
    panel2.add(metaDataAndClassesScrollPane,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    metadataAndClassesTable = new JTable();
    metadataAndClassesTable.setFillsViewportHeight(false);
    metadataAndClassesTable.setFont(new Font(metadataAndClassesTable.getFont().getName(),
            metadataAndClassesTable.getFont().getStyle(), metadataAndClassesTable.getFont().getSize()));
    metadataAndClassesTable.setPreferredScrollableViewportSize(new Dimension(450, 100));
    metaDataAndClassesScrollPane.setViewportView(metadataAndClassesTable);
    modifiersPanel = new JPanel();
    modifiersPanel.setLayout(new GridLayoutManager(2, 3, new Insets(0, 2, 0, 0), -1, -1));
    configPanel.add(modifiersPanel,
            new GridConstraints(1, 0, 2, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    final JLabel label3 = new JLabel();
    label3.setText(" Metadata file extensions (use ';' to separate)");
    modifiersPanel.add(label3,
            new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    includeTestClassesCheckBox = new JCheckBox();
    includeTestClassesCheckBox.setText("Include Test classes");
    modifiersPanel.add(includeTestClassesCheckBox,
            new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    metadataExtensionTextField.setAlignmentX(0.5f);
    metadataExtensionTextField.setAutoscrolls(true);
    metadataExtensionTextField.setMargin(new Insets(1, 1, 1, 1));
    modifiersPanel.add(metadataExtensionTextField,
            new GridConstraints(1, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,
                    new Dimension(150, -1), null, 0, false));
    addToCompilerResourceCheckBox = new JCheckBox();
    addToCompilerResourceCheckBox.setText("Add to compiler resource patterns");
    modifiersPanel.add(addToCompilerResourceCheckBox,
            new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    dependenciesPanel = new JPanel();
    dependenciesPanel.setLayout(new GridLayoutManager(3, 1, new Insets(6, 2, 2, 2), -1, -1));
    configTabbedPane.addTab("Dependencies", dependenciesPanel);
    final JPanel panel3 = new JPanel();
    panel3.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), 5, 5));
    dependenciesPanel.add(panel3,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null,
                    null, 0, false));
    depProjectModuleRadioButton.setText("Project Module Dependencies");
    panel3.add(depProjectModuleRadioButton,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    depManualRadioButton.setText("Manual Dependencies");
    panel3.add(depManualRadioButton,
            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final Spacer spacer1 = new Spacer();
    panel3.add(spacer1,
            new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    depManualUnsupportedLabel = new JLabel();
    depManualUnsupportedLabel.setText("(Not supported by plugin extension)");
    panel3.add(depManualUnsupportedLabel,
            new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    manualDependenciesDisabledInfoPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
    dependenciesPanel.add(manualDependenciesDisabledInfoPanel,
            new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    final JLabel label4 = new JLabel();
    label4.setHorizontalAlignment(0);
    label4.setHorizontalTextPosition(0);
    label4.setText("Using Enhancer and it's Dependencies from Project Module");
    manualDependenciesDisabledInfoPanel.add(label4,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    dependenciesPanel.add(dependenciesAddDeletePanel,
            new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null,
                    null, 0, false));
    generalPanel = new JPanel();
    generalPanel.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
    parentPanel.add(generalPanel,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
                    null, 0, false));
    enableEnhancerCheckBox = new JCheckBox();
    enableEnhancerCheckBox.setText("Enable Enhancer");
    generalPanel.add(enableEnhancerCheckBox,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final JPanel panel4 = new JPanel();
    panel4.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
    generalPanel.add(panel4,
            new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null,
                    null, 0, false));
    jDORadioButton.setText("JDO");
    panel4.add(jDORadioButton,
            new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    jPARadioButton = new JRadioButton();
    jPARadioButton.setText("JPA");
    panel4.add(jPARadioButton,
            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
                    GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
                    GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
    final Spacer spacer2 = new Spacer();
    panel4.add(spacer2,
            new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    generalPanel.add(persistenceImplComboBox,
            new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
                    GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
                    false));
    ButtonGroup buttonGroup;
    buttonGroup = new ButtonGroup();
    buttonGroup.add(jDORadioButton);
    buttonGroup.add(jPARadioButton);
    buttonGroup = new ButtonGroup();
    buttonGroup.add(depProjectModuleRadioButton);
    buttonGroup.add(depManualRadioButton);
}

From source file:org.drugis.mtc.gui.GeneratedCodeWindow.java

private void initComponents() {
    setLayout(new BorderLayout());

    add(createToolBar(), BorderLayout.NORTH);

    JTabbedPane tabbedPane = new JTabbedPane();
    for (GeneratedFile file : d_files) {
        tabbedPane.addTab(file.extension, new JScrollPane(new JTextArea(file.text)));
    }/*from w  w w .  ja  v a2  s  .c o  m*/
    add(tabbedPane, BorderLayout.CENTER);
}

From source file:org.eurocarbdb.application.glycoworkbench.plugin.s3.gui.StartupDialog.java

/**
 * Initialises all GUI elements.//from  w w  w  . jav  a  2 s  .  c o  m
 */
private void initGui() {
    this.setResizable(false);
    this.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);

    cancelButton = new JButton("Don't log in");
    cancelButton.setActionCommand("Cancel");
    cancelButton.addActionListener(this);
    storeCredentialsButton = new JButton("Store Credentials");
    storeCredentialsButton.setActionCommand("StoreCredentials");
    storeCredentialsButton.addActionListener(this);
    okButton = new JButton("Log in");
    okButton.setActionCommand("LogIn");
    okButton.addActionListener(this);

    // Set default ENTER and ESCAPE buttons.
    this.getRootPane().setDefaultButton(okButton);
    this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"),
            "ESCAPE");
    this.getRootPane().getActionMap().put("ESCAPE", new AbstractAction() {
        private static final long serialVersionUID = -1742280851624947873L;

        public void actionPerformed(ActionEvent actionEvent) {
            setVisible(false);
        }
    });

    JPanel buttonsPanel = new JPanel(new GridBagLayout());
    buttonsPanel.add(cancelButton, new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.WEST,
            GridBagConstraints.NONE, insetsZero, 0, 0));
    buttonsPanel.add(storeCredentialsButton, new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.EAST,
            GridBagConstraints.NONE, insetsZero, 0, 0));
    buttonsPanel.add(okButton, new GridBagConstraints(2, 0, 1, 1, 0, 0, GridBagConstraints.EAST,
            GridBagConstraints.NONE, insetsZero, 0, 0));

    loginPassphrasePanel = new LoginPassphrasePanel(hyperlinkListener);
    loginLocalFolderPanel = new LoginLocalFolderPanel(ownerFrame, hyperlinkListener);
    loginCredentialsPanel = new LoginCredentialsPanel(false, hyperlinkListener);

    // Tabbed Pane.
    tabbedPane = new JTabbedPane();
    tabbedPane.addChangeListener(this);
    tabbedPane.add(loginPassphrasePanel, "S3 Online");
    tabbedPane.add(loginLocalFolderPanel, "Local Folder");
    tabbedPane.add(loginCredentialsPanel, "Direct Login");

    int row = 0;
    this.getContentPane().setLayout(new GridBagLayout());
    this.getContentPane().add(tabbedPane, new GridBagConstraints(0, row++, 2, 1, 1, 1,
            GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsZero, 0, 0));
    this.getContentPane().add(buttonsPanel, new GridBagConstraints(0, row++, 2, 1, 1, 0,
            GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insetsDefault, 0, 0));

    this.pack();
    this.setSize(500, 400);
    this.setLocationRelativeTo(this.getOwner());
}

From source file:org.executequery.gui.editor.LobDataItemViewerPanel.java

private void init() {

    Border emptyBorder = BorderFactory.createEmptyBorder(2, 2, 2, 2);

    JPanel textPanel = new JPanel(new BorderLayout());
    textPanel.setBorder(emptyBorder);/* w w  w  . j  av  a 2 s  .c  o m*/

    textArea = createTextArea();
    textArea.setLineWrap(false);
    textArea.setMargin(new Insets(2, 2, 2, 2));
    textPanel.add(new JScrollPane(textArea), BorderLayout.CENTER);

    JPanel imagePanel = null;

    imagePanel = new JPanel(new BorderLayout());
    imagePanel.setBorder(emptyBorder);

    if (isImage()) {

        ImageIcon image = loadImageData();
        if (image != null) {

            JLabel imageLabel = new JLabel(image);
            imagePanel.add(new JScrollPane(imageLabel), BorderLayout.CENTER);
        }

        setTextAreaText(textArea, CANNOT_DISPLAY_BINARY_DATA_AS_TEXT);

    } else {

        imagePanel.add(new JLabel("Unsupported format", JLabel.CENTER));

        loadTextData();
    }

    JPanel binaryPanel = new JPanel(new BorderLayout());
    binaryPanel.setBorder(emptyBorder);

    binaryStringTextArea = createTextArea();
    binaryPanel.add(new JScrollPane(binaryStringTextArea), BorderLayout.CENTER);

    tabbedPane = new JTabbedPane();
    tabbedPane.addChangeListener(this);
    tabbedPane.addTab("Text", textPanel);
    tabbedPane.addTab("Image", imagePanel);
    tabbedPane.addTab("Binary", binaryPanel);

    JPanel contentPanel = new JPanel(new BorderLayout());
    contentPanel.setPreferredSize(new Dimension(400, 300));
    contentPanel.add(tabbedPane, BorderLayout.CENTER);

    JLabel descriptionLabel = new JLabel(formatDescriptionString());
    descriptionLabel.setBorder(BorderFactory.createEmptyBorder(5, 2, 5, 0));

    contentPanel.add(descriptionLabel, BorderLayout.SOUTH);

    JButton closeButton = new JButton("Close");
    closeButton.setActionCommand("close");

    JButton saveButton = new JButton("Save As");
    saveButton.setActionCommand("save");

    saveButton.addActionListener(this);
    closeButton.addActionListener(this);

    addActionButton(saveButton);
    addActionButton(closeButton);

    setPreferredSize(new Dimension(500, 420));

    addContentPanel(contentPanel);

    textArea.requestFocus();
}

From source file:org.freeplane.core.resources.components.OptionPanel.java

/**
 * This method builds the preferences panel.
 * A list of IPropertyControl is iterated through and
 * if the IPropertyControl is an instance of TabProperty,
 * it creates a new "tab" that can be clicked to reveal the appropriate panel.
 * If the previous selected tab was saved on close,
 * the appropriate tab is reopened./*from  www .  j a  v  a  2  s  . c  o m*/
 *
 * @param controlsTree  This is the data that needs to be built
 */
public void buildPanel(final DefaultMutableTreeNode controlsTree) {
    final JPanel centralPanel = new JPanel();
    centralPanel.setLayout(new GridLayout(1, 1));
    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    FormLayout bottomLayout = null;
    DefaultFormBuilder bottomBuilder = null;
    initControls(controlsTree);
    final Iterator<IPropertyControl> iterator = controls.iterator();
    int tabIndex = 0;
    while (iterator.hasNext()) {
        final IPropertyControl control = iterator.next();
        if (control instanceof TabProperty) {
            final TabProperty newTab = (TabProperty) control;
            bottomLayout = new FormLayout(newTab.getName(), "");
            bottomBuilder = new DefaultFormBuilder(bottomLayout);
            bottomBuilder.setDefaultDialogBorder();
            final JScrollPane bottomComponent = new JScrollPane(bottomBuilder.getPanel());
            UITools.setScrollbarIncrement(bottomComponent);
            final String tabName = TextUtils.getOptionalText(newTab.getLabel());
            tabStringToIndexMap.put(tabName, tabIndex);
            tabIndexToStringMap.put(tabIndex, tabName);
            tabbedPane.addTab(tabName, bottomComponent);
            tabIndex++;
        } else {
            control.layout(bottomBuilder);
        }
    }
    tabbedPane.addChangeListener(new ChangeListener() {
        public void stateChanged(final ChangeEvent event) {
            final JTabbedPane c = (JTabbedPane) event.getSource();
            selectedPanel = tabIndexToStringMap.get(c.getSelectedIndex());
        }
    });
    centralPanel.add(tabbedPane);
    if (selectedPanel != null && tabStringToIndexMap.containsKey(selectedPanel)) {
        // Without the containsKey call the loading of the tab "behaviour"/"behavior" gives a nullpointer exception
        tabbedPane.setSelectedIndex(tabStringToIndexMap.get(selectedPanel));
    }
    topDialog.getContentPane().add(centralPanel, BorderLayout.CENTER);
    final JButton cancelButton = new JButton();
    MenuBuilder.setLabelAndMnemonic(cancelButton, TextUtils.getRawText("cancel"));
    cancelButton.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent arg0) {
            closeWindow();
        }
    });
    final JButton okButton = new JButton();
    MenuBuilder.setLabelAndMnemonic(okButton, TextUtils.getRawText("ok"));
    okButton.addActionListener(new ActionListener() {
        public void actionPerformed(final ActionEvent arg0) {
            if (validate()) {
                closeWindow();
                feedback.writeProperties(getOptionProperties());
            }
        }
    });
    topDialog.getRootPane().setDefaultButton(okButton);
    topDialog.getContentPane().add(ButtonBarFactory.buildOKCancelBar(cancelButton, okButton),
            BorderLayout.SOUTH);
}

From source file:org.gtdfree.GTDFree.java

/**
 * This method initializes jContentPane//from w  w  w .  ja  va  2  s.  com
 * 
 * @return javax.swing.JPanel
 */
private JPanel getJContentPane() {
    if (jContentPane == null) {
        jContentPane = new JPanel();
        jContentPane.setLayout(new BorderLayout());

        tabbedPane = new JTabbedPane();

        if (getEngine().getGlobalProperties().getBoolean(GlobalProperties.SHOW_OVERVIEW_TAB, true)) {
            tabbedPane.addTab(Messages.getString("GTDFree.Overview"), //$NON-NLS-1$
                    ApplicationHelper.getIcon(ApplicationHelper.icon_name_small_overview), getOverviewPane());
        }

        inBasketPane = new InBasketPane();
        //inBasketPane.setEngine(getEngine());
        tabbedPane.addTab(Messages.getString("GTDFree.Collect"), //$NON-NLS-1$
                ApplicationHelper.getIcon(ApplicationHelper.icon_name_small_collecting), inBasketPane);

        processPane = new ProcessPane();
        //processPane.setEngine(getEngine());
        tabbedPane.addTab(Messages.getString("GTDFree.Process"), //$NON-NLS-1$
                ApplicationHelper.getIcon(ApplicationHelper.icon_name_small_processing), processPane);

        organizePane = new OrganizePane();
        //organizePane.setEngine(getEngine());
        tabbedPane.addTab(Messages.getString("GTDFree.Organize"), //$NON-NLS-1$
                ApplicationHelper.getIcon(ApplicationHelper.icon_name_small_review), organizePane);

        executePane = new ExecutePane();
        //executePane.setEngine(getEngine());
        tabbedPane.addTab(Messages.getString("GTDFree.Execute") + " (" + getSummaryBean().getQueueCount() + ")", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
                ApplicationHelper.getIcon(ApplicationHelper.icon_name_small_queue_execute), executePane);
        executeTabIndex = tabbedPane.getTabCount() - 1;

        getSummaryBean().addPropertyChangeListener("queueCount", new PropertyChangeListener() { //$NON-NLS-1$
            @Override
            public void propertyChange(PropertyChangeEvent evt) {
                tabbedPane.setTitleAt(executeTabIndex,
                        Messages.getString("GTDFree.Execute") + " (" + getSummaryBean().getQueueCount() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
            }
        });

        if (Boolean.valueOf(getEngine().getConfiguration().getProperty("journal.enabled", "false"))) { //$NON-NLS-1$ //$NON-NLS-2$
            journalPane = new JournalPane();
            journalPane.setEngine(getEngine());
            tabbedPane.addTab("Journal", //$NON-NLS-1$
                    ApplicationHelper.getIcon(ApplicationHelper.icon_name_large_journaling), journalPane);
        }

        tabbedPane.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
                enableQuickCollectPanel();

                Component c = tabbedPane.getSelectedComponent();
                if (c instanceof WorkflowPane && !((WorkflowPane) c).isInitialized()) {
                    ((WorkflowPane) c).initialize(getEngine());
                }
                if (c instanceof GTDFreePane) {
                    getEngine().setActivePane((GTDFreePane) c);
                } else {
                    getEngine().setActivePane(null);
                }
            }
        });

        jContentPane.add(tabbedPane);

        quickCollectPanel = new QuickCollectPanel();
        quickCollectPanel.setEngine(getEngine());
        enableQuickCollectPanel();
        jContentPane.add(quickCollectPanel, BorderLayout.SOUTH);

    }
    return jContentPane;
}