Search in sources :

Example 31 with JScrollPane

use of javax.swing.JScrollPane in project binnavi by google.

the class CViewSearcherDialog method createGui.

/**
   * Creates the GUI of the dialog.
   */
private void createGui() {
    setLayout(new BorderLayout());
    final JPanel panel = new JPanel(new BorderLayout());
    final JLabel lbl = new JLabel("Address" + ":");
    lbl.setBorder(new EmptyBorder(5, 5, 5, 5));
    panel.add(lbl, BorderLayout.WEST);
    m_offsetField.setSize(400, 20);
    final ActionListener listener = new ActionListener() {

        @Override
        public void actionPerformed(final ActionEvent e) {
            search();
        }
    };
    m_offsetField.addActionListener(listener);
    panel.add(m_offsetField, BorderLayout.CENTER);
    panel.add(new JButton(CActionProxy.proxy(new SearchAction(this))), BorderLayout.EAST);
    add(panel, BorderLayout.NORTH);
    m_table = new JTable(tableModel);
    m_table.addMouseListener(m_listener);
    add(new JScrollPane(m_table), BorderLayout.CENTER);
    add(new CPanelTwoButtons(CActionProxy.proxy(new InternalActionListener()), "OK", "Cancel"), BorderLayout.SOUTH);
    setSize(500, 300);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JTable(javax.swing.JTable) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) CPanelTwoButtons(com.google.security.zynamics.zylib.gui.CPanelTwoButtons) EmptyBorder(javax.swing.border.EmptyBorder)

Example 32 with JScrollPane

use of javax.swing.JScrollPane in project binnavi by google.

the class CProjectNodeComponent method createGui.

/**
   * Creates the elements of this component.
   */
private void createGui() {
    final JPanel topPanel = new JPanel(new BorderLayout());
    final JPanel innerTopPanel = new JPanel(new BorderLayout());
    innerTopPanel.add(m_stdEditPanel);
    topPanel.add(innerTopPanel);
    final JPanel debuggerChooserPanel = new JPanel(new BorderLayout());
    debuggerChooserPanel.setBorder(new TitledBorder("Project Debuggers"));
    m_checkedList = new JCheckedListbox<>(new Vector<DebuggerTemplate>(), false);
    updateCheckedListPanel();
    final JScrollPane debuggerScrollPane = new JScrollPane(m_checkedList);
    m_checkedListPanel.add(debuggerScrollPane);
    debuggerChooserPanel.add(m_checkedListPanel, BorderLayout.CENTER);
    debuggerChooserPanel.setMinimumSize(new Dimension(0, 128));
    debuggerChooserPanel.setPreferredSize(new Dimension(0, 128));
    innerTopPanel.add(debuggerChooserPanel, BorderLayout.SOUTH);
    final JPanel buttonPanel = new JPanel(new GridLayout(1, 2));
    buttonPanel.setBorder(new EmptyBorder(0, 0, 5, 2));
    buttonPanel.add(new JPanel());
    buttonPanel.add(m_saveButton);
    topPanel.add(buttonPanel, BorderLayout.SOUTH);
    final JPanel bottomPanel = new CAddressSpacesTablePanel(m_table);
    final JScrollPane scrollPane = new JScrollPane(m_table);
    bottomPanel.setBorder(m_titledBorder);
    setBorder(new EmptyBorder(0, 0, 0, 1));
    bottomPanel.add(scrollPane);
    final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, topPanel, bottomPanel);
    splitPane.setOneTouchExpandable(true);
    splitPane.setDividerLocation(splitPane.getMinimumDividerLocation());
    splitPane.setResizeWeight(0.5);
    add(splitPane);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) BorderLayout(java.awt.BorderLayout) Dimension(java.awt.Dimension) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder) JSplitPane(javax.swing.JSplitPane) Vector(java.util.Vector) CAddressSpacesTablePanel(com.google.security.zynamics.binnavi.Gui.FilterPanel.Default.CAddressSpacesTablePanel)

Example 33 with JScrollPane

use of javax.swing.JScrollPane in project binnavi by google.

the class CVariablesPanel method visit.

@Override
public void visit(final CGraphModel model, final IGraphPanelExtender extender) {
    graphModel = model;
    if (graphModel.getGraph().getRawView().getConfiguration().getModule() == null) {
        // TODO(timkornau): There is no type system support in projects.
        return;
    }
    extender.addTab("Variables", this);
    final ViewReferencesTableModel treeModel = new ViewReferencesTableModel(model.getGraph().getRawView());
    referencesTable = new ViewReferencesTable(treeModel);
    add(new JScrollPane(referencesTable));
    referencesTable.addTreeSelectionListener(treeSelectionListener);
    // Initialize the handler for showing popup context menus
    referencesTable.addMouseListener(new VariablesPanelMouseAdapter());
}
Also used : JScrollPane(javax.swing.JScrollPane)

Example 34 with JScrollPane

use of javax.swing.JScrollPane in project zaproxy by zaproxy.

the class OptionsConnectionPanel method getPanelProxyChain.

/**
	 * This method initializes panelProxyChain	
	 * 	
	 * @return javax.swing.JPanel	
	 */
private JPanel getPanelProxyChain() {
    if (panelProxyChain == null) {
        panelProxyChain = new JPanel(new BorderLayout());
        panelProxyChain.setName("ProxyChain");
        JPanel innerPanel = new JPanel(new GridBagLayout());
        GridBagConstraints gbc = new GridBagConstraints();
        gbc.gridx = 0;
        gbc.insets = new java.awt.Insets(2, 2, 2, 2);
        gbc.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gbc.weightx = 1.0D;
        innerPanel.add(getPanelGeneral(), gbc);
        innerPanel.add(getDnsPanel(), gbc);
        innerPanel.add(getSecurityProtocolsPanel(), gbc);
        innerPanel.add(getJPanel(), gbc);
        innerPanel.add(getPanelProxyAuth(), gbc);
        JScrollPane scrollPane = new JScrollPane(innerPanel);
        scrollPane.setBorder(BorderFactory.createEmptyBorder());
        panelProxyChain.add(scrollPane, BorderLayout.CENTER);
    }
    return panelProxyChain;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) BorderLayout(java.awt.BorderLayout) GridBagLayout(java.awt.GridBagLayout)

Example 35 with JScrollPane

use of javax.swing.JScrollPane in project zaproxy by zaproxy.

the class LicenseFrame method getJScrollPane.

/**
	 * This method initializes jScrollPane
	 *
	 * @return javax.swing.JScrollPane
	 */
private JScrollPane getJScrollPane() {
    if (jScrollPane == null) {
        jScrollPane = new JScrollPane();
        jScrollPane.setViewportView(getTxtLicense());
        jScrollPane.setName("jScrollPane");
        jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    }
    return jScrollPane;
}
Also used : JScrollPane(javax.swing.JScrollPane)

Aggregations

JScrollPane (javax.swing.JScrollPane)832 JPanel (javax.swing.JPanel)431 Dimension (java.awt.Dimension)271 JLabel (javax.swing.JLabel)269 BorderLayout (java.awt.BorderLayout)260 JButton (javax.swing.JButton)191 GridBagLayout (java.awt.GridBagLayout)149 JTable (javax.swing.JTable)148 BoxLayout (javax.swing.BoxLayout)140 Insets (java.awt.Insets)122 GridBagConstraints (java.awt.GridBagConstraints)121 ActionEvent (java.awt.event.ActionEvent)120 JTextArea (javax.swing.JTextArea)110 ActionListener (java.awt.event.ActionListener)103 FlowLayout (java.awt.FlowLayout)96 JTextField (javax.swing.JTextField)70 FormLayout (com.jgoodies.forms.layout.FormLayout)60 Container (java.awt.Container)55 JSplitPane (javax.swing.JSplitPane)55 MouseEvent (java.awt.event.MouseEvent)52