Search in sources :

Example 51 with TitledBorder

use of javax.swing.border.TitledBorder in project binnavi by google.

the class CSearchDialog method createSearchPane.

/**
   * Creates the content of the dialog.
   *
   * @return The content panel.
   */
private JPanel createSearchPane() {
    final JPanel panel = new JPanel();
    panel.setLayout(new GridLayout(3, 2));
    panel.setBorder(new TitledBorder("Search for" + " ..."));
    panel.add(new JLabel("Type"));
    m_typeBox = new JComboBox<ISearcher>();
    m_typeBox.addItem(new AsciiSearcher());
    m_typeBox.addItem(new UnicodeSearcher());
    m_typeBox.addItem(new HexSearcher());
    m_typeBox.setSelectedIndex(0);
    m_typeBox.addActionListener(new InternalTypeListener());
    panel.add(m_typeBox);
    panel.add(new JLabel("Value"));
    m_inputField = new JFormattedTextField();
    m_inputField.getDocument().addDocumentListener(new InternalTextListener());
    panel.add(m_inputField);
    m_otherLabel = new JLabel("Hex");
    panel.add(m_otherLabel);
    m_altField.setEnabled(false);
    panel.add(m_altField);
    panel.setSize(500, 300);
    return panel;
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) JFormattedTextField(javax.swing.JFormattedTextField) JLabel(javax.swing.JLabel) TitledBorder(javax.swing.border.TitledBorder)

Example 52 with TitledBorder

use of javax.swing.border.TitledBorder in project binnavi by google.

the class CTagNodeComponent method createGui.

/**
   * Creates the GUI of the component.
   */
private void createGui() {
    final JPanel outerNamePanel = new JPanel(new BorderLayout());
    outerNamePanel.setBorder(new TitledBorder("Tag"));
    final JPanel namePanel = new JPanel(new BorderLayout());
    namePanel.setBorder(new EmptyBorder(0, 0, 5, 0));
    final JLabel nameLabel = new CHelpLabel("Name" + ":", new CNameHelp());
    nameLabel.setPreferredSize(new Dimension(110, 25));
    namePanel.add(nameLabel, BorderLayout.WEST);
    namePanel.add(m_nameTextField, BorderLayout.CENTER);
    outerNamePanel.add(namePanel, BorderLayout.CENTER);
    final JPanel outerDescriptionPanel = new JPanel(new BorderLayout());
    outerDescriptionPanel.setBorder(new EmptyBorder(5, 0, 0, 0));
    final JPanel descriptionPanel = new JPanel(new BorderLayout());
    descriptionPanel.setBorder(new TitledBorder("Description"));
    descriptionPanel.setMinimumSize(new Dimension(0, 120));
    descriptionPanel.add(new JScrollPane(m_descriptionField));
    outerDescriptionPanel.add(descriptionPanel, BorderLayout.CENTER);
    final JPanel buttonPanel = new JPanel(new GridLayout(1, 2));
    buttonPanel.add(new JPanel());
    buttonPanel.setBorder(new EmptyBorder(5, 0, 5, 2));
    buttonPanel.add(m_saveButton);
    final JPanel topPanel = new JPanel(new BorderLayout());
    topPanel.add(outerNamePanel, BorderLayout.NORTH);
    topPanel.add(outerDescriptionPanel, BorderLayout.CENTER);
    topPanel.add(buttonPanel, BorderLayout.SOUTH);
    final JPanel bottomPanel = new JPanel(new BorderLayout());
    bottomPanel.setBorder(m_tableBorder);
    final JScrollPane scrollPane = new JScrollPane(m_childrenTagTable);
    bottomPanel.add(scrollPane, BorderLayout.CENTER);
    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) JLabel(javax.swing.JLabel) CHelpLabel(com.google.security.zynamics.binnavi.Help.CHelpLabel) Dimension(java.awt.Dimension) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder) JSplitPane(javax.swing.JSplitPane) CNameHelp(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Tag.Component.Help.CNameHelp)

Example 53 with TitledBorder

use of javax.swing.border.TitledBorder in project binnavi by google.

the class DataSectionComponent method createOptionsPanel.

private final JPanel createOptionsPanel() {
    final JPanel optionsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    optionsPanel.setBorder(new TitledBorder("Options"));
    optionsPanel.add(createVirtualAddressCheckBox());
    optionsPanel.add(createSectionSelectionPanel());
    return optionsPanel;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) TitledBorder(javax.swing.border.TitledBorder)

Example 54 with TitledBorder

use of javax.swing.border.TitledBorder in project binnavi by google.

the class CIndegreeCriteriumPanel method initPanel.

/**
   * Creates the GUI of the panel.
   */
private void initPanel() {
    final JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.setBorder(new TitledBorder("Edit Indegree Condition"));
    final JPanel operatorPanel = new JPanel(new BorderLayout());
    operatorPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    operatorPanel.add(m_operatorBox, BorderLayout.CENTER);
    final JPanel inputPanel = new JPanel(new BorderLayout());
    inputPanel.setBorder(new EmptyBorder(5, 0, 5, 5));
    inputPanel.add(m_inputField, BorderLayout.CENTER);
    final JPanel containerPanel = new JPanel(new BorderLayout());
    containerPanel.add(operatorPanel, BorderLayout.WEST);
    containerPanel.add(inputPanel, BorderLayout.CENTER);
    mainPanel.add(containerPanel, BorderLayout.NORTH);
    add(mainPanel, BorderLayout.CENTER);
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder)

Example 55 with TitledBorder

use of javax.swing.border.TitledBorder in project binnavi by google.

the class CColorCriteriumPanel method initPanel.

/**
   * Creates the GUI of the panel.
   *
   * @param graph The graph whose node colors are determined.
   */
private void initPanel(final ZyGraph graph) {
    final JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.setBorder(new TitledBorder("Edit Color Condition"));
    final JPanel selectedColorPanel = new JPanel(new BorderLayout());
    selectedColorPanel.setBorder(new EmptyBorder(0, 5, 3, 5));
    selectedColorPanel.add(m_selectedColorPanel);
    final List<Color> colors = getColors(graph);
    final JPanel colorGrid = new JPanel(new GridLayout(1 + colors.size() / 4, 4));
    colorGrid.setBorder(new TitledBorder(""));
    for (final Color color : colors) {
        final JPanel outerColorPanel = new JPanel(new BorderLayout());
        outerColorPanel.setBorder(new EmptyBorder(3, 3, 3, 3));
        final ColorPanel colorPanel = new ColorPanel(color, false);
        outerColorPanel.add(colorPanel, BorderLayout.CENTER);
        m_colorPanels.add(colorPanel);
        colorPanel.addListener(m_colorPanelListener);
        colorPanel.addMouseListener(m_colorPanelListener);
        colorGrid.add(outerColorPanel, BorderLayout.NORTH);
    }
    m_selectedColorPanel.setColor(colors.isEmpty() ? new Color(255, 255, 255) : colors.get(0));
    mainPanel.add(selectedColorPanel, BorderLayout.NORTH);
    final JPanel gridContainer = new JPanel(new BorderLayout());
    gridContainer.add(colorGrid, BorderLayout.NORTH);
    gridContainer.setBorder(new EmptyBorder(3, 5, 0, 5));
    mainPanel.add(gridContainer, BorderLayout.CENTER);
    add(mainPanel, BorderLayout.CENTER);
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) BorderLayout(java.awt.BorderLayout) ColorPanel(com.google.security.zynamics.zylib.gui.ColorPanel.ColorPanel) Color(java.awt.Color) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder)

Aggregations

TitledBorder (javax.swing.border.TitledBorder)96 JPanel (javax.swing.JPanel)58 BorderLayout (java.awt.BorderLayout)30 GridBagConstraints (java.awt.GridBagConstraints)27 JLabel (javax.swing.JLabel)25 JScrollPane (javax.swing.JScrollPane)21 GridBagLayout (java.awt.GridBagLayout)20 Insets (java.awt.Insets)20 JButton (javax.swing.JButton)19 Dimension (java.awt.Dimension)18 EmptyBorder (javax.swing.border.EmptyBorder)18 GridLayout (java.awt.GridLayout)17 ActionEvent (java.awt.event.ActionEvent)17 ActionListener (java.awt.event.ActionListener)15 JCheckBox (javax.swing.JCheckBox)10 Color (java.awt.Color)9 Border (javax.swing.border.Border)9 FlowLayout (java.awt.FlowLayout)7 EtchedBorder (javax.swing.border.EtchedBorder)7 JTextField (javax.swing.JTextField)6