Search in sources :

Example 81 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 82 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 83 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 84 with TitledBorder

use of javax.swing.border.TitledBorder in project mc-dev by Bukkit.

the class ServerGUI method c.

private JComponent c() {
    JPanel jpanel = new JPanel(new BorderLayout());
    JTextArea jtextarea = new JTextArea();
    JScrollPane jscrollpane = new JScrollPane(jtextarea, 22, 30);
    jtextarea.setEditable(false);
    jtextarea.setFont(a);
    JTextField jtextfield = new JTextField();
    jtextfield.addActionListener(new ServerGuiCommandListener(this, jtextfield));
    jtextarea.addFocusListener(new ServerGuiFocusAdapter(this));
    jpanel.add(jscrollpane, "Center");
    jpanel.add(jtextfield, "South");
    jpanel.setBorder(new TitledBorder(new EtchedBorder(), "Log and chat"));
    Thread thread = new Thread(new ServerGuiThreadRunnable(this, jtextarea, jscrollpane));
    thread.setDaemon(true);
    thread.start();
    return jpanel;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) EtchedBorder(javax.swing.border.EtchedBorder) JTextArea(javax.swing.JTextArea) BorderLayout(java.awt.BorderLayout) JTextField(javax.swing.JTextField) TitledBorder(javax.swing.border.TitledBorder)

Example 85 with TitledBorder

use of javax.swing.border.TitledBorder in project intellij-community by JetBrains.

the class AsmCodeGeneratorTest method testBorder.

public void testBorder() throws Exception {
    JPanel panel = (JPanel) getInstrumentedRootComponent("TestBorder.form", "BindingTest");
    assertTrue(panel.getBorder() instanceof TitledBorder);
    TitledBorder border = (TitledBorder) panel.getBorder();
    assertEquals("BorderTitle", border.getTitle());
    assertTrue(border.getBorder().toString(), border.getBorder() instanceof EtchedBorder);
}
Also used : EtchedBorder(javax.swing.border.EtchedBorder) TitledBorder(javax.swing.border.TitledBorder)

Aggregations

TitledBorder (javax.swing.border.TitledBorder)143 JPanel (javax.swing.JPanel)94 GridBagConstraints (java.awt.GridBagConstraints)59 GridBagLayout (java.awt.GridBagLayout)50 JLabel (javax.swing.JLabel)50 BorderLayout (java.awt.BorderLayout)45 Insets (java.awt.Insets)43 JScrollPane (javax.swing.JScrollPane)34 Dimension (java.awt.Dimension)30 JButton (javax.swing.JButton)29 EtchedBorder (javax.swing.border.EtchedBorder)28 ActionEvent (java.awt.event.ActionEvent)25 EmptyBorder (javax.swing.border.EmptyBorder)25 Border (javax.swing.border.Border)23 ActionListener (java.awt.event.ActionListener)21 JCheckBox (javax.swing.JCheckBox)19 GridLayout (java.awt.GridLayout)18 JTextField (javax.swing.JTextField)16 Color (java.awt.Color)15 Box (javax.swing.Box)12