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;
}
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);
}
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;
}
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;
}
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);
}
Aggregations