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