Search in sources :

Example 71 with BorderLayout

use of java.awt.BorderLayout in project binnavi by google.

the class CViewTypePanel method buildRow.

/**
   * Builds a checkbox row.
   * 
   * @param string String to show next to the checkbox.
   * @param checkBox Check box to add to the panel.
   * 
   * @return The created row.
   */
private JPanel buildRow(final String string, final JCheckBox checkBox) {
    final JPanel panel = new JPanel(new BorderLayout());
    panel.add(new JLabel(string), BorderLayout.WEST);
    panel.add(checkBox, BorderLayout.EAST);
    checkBox.addItemListener(m_checkBoxListener);
    return panel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel)

Example 72 with BorderLayout

use of java.awt.BorderLayout 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 73 with BorderLayout

use of java.awt.BorderLayout in project binnavi by google.

the class CHintCreator method createHintPanel.

/**
   * Adds a hint icon to a component.
   * 
   * @param component The component the hint icon is added to.
   * @param message The message shown by the hint icon when the cursor hovers over it.
   * 
   * @return The new component that contains both the passed component and the hint icon.
   */
public static Component createHintPanel(final Component component, final String message) {
    Preconditions.checkNotNull(component, "IE01256: Component argument can not be null");
    Preconditions.checkNotNull(message, "IE01257: Message argument can not be null");
    final JPanel panel = new JPanel(new BorderLayout());
    panel.add(component, BorderLayout.CENTER);
    final JHintIcon hintPopup = new JHintIcon(message);
    hintPopup.setBorder(new EmptyBorder(0, 3, 0, 0));
    panel.add(hintPopup, BorderLayout.EAST);
    return panel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) EmptyBorder(javax.swing.border.EmptyBorder) JHintIcon(com.google.security.zynamics.zylib.gui.JHint.JHintIcon)

Example 74 with BorderLayout

use of java.awt.BorderLayout 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 75 with BorderLayout

use of java.awt.BorderLayout in project binnavi by google.

the class MinimalCodeDisplayHarness method buildContent.

private void buildContent(JFrame frame) {
    JPanel panel = new JPanel(new BorderLayout());
    CodeDisplayModelExample example = new CodeDisplayModelExample();
    panel.add(new CodeDisplay(example), BorderLayout.CENTER);
    JButton ok = new JButton("OK");
    ok.addActionListener(new ShowDialog(frame));
    panel.add(ok, BorderLayout.SOUTH);
    frame.getContentPane().add(panel);
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JButton(javax.swing.JButton)

Aggregations

BorderLayout (java.awt.BorderLayout)761 JPanel (javax.swing.JPanel)514 JLabel (javax.swing.JLabel)238 JScrollPane (javax.swing.JScrollPane)191 Dimension (java.awt.Dimension)155 JButton (javax.swing.JButton)134 FlowLayout (java.awt.FlowLayout)90 ActionEvent (java.awt.event.ActionEvent)88 JTextField (javax.swing.JTextField)85 EmptyBorder (javax.swing.border.EmptyBorder)73 ActionListener (java.awt.event.ActionListener)70 JCheckBox (javax.swing.JCheckBox)69 Insets (java.awt.Insets)64 BoxLayout (javax.swing.BoxLayout)62 GridBagConstraints (java.awt.GridBagConstraints)57 GridBagLayout (java.awt.GridBagLayout)57 JTable (javax.swing.JTable)57 JTextArea (javax.swing.JTextArea)52 GridLayout (java.awt.GridLayout)49 Box (javax.swing.Box)45