Search in sources :

Example 76 with TitledBorder

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

the class TypeInstanceReferencesDialog method createControls.

private void createControls(final List<TypeInstanceReference> references) {
    final JPanel panel = new JPanel();
    getContentPane().add(panel, BorderLayout.SOUTH);
    panel.setLayout(new FlowLayout(FlowLayout.RIGHT));
    final JButton buttonOk = new JButton("OK");
    buttonOk.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(final ActionEvent e) {
            wasCancelled = false;
            dispose();
        }
    });
    panel.add(buttonOk);
    final JButton buttonCancel = new JButton("Cancel");
    buttonCancel.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(final ActionEvent e) {
            dispose();
        }
    });
    panel.add(buttonCancel);
    xrefs = new JTable(new XRefsTableModel(references));
    xrefs.addMouseListener(internalMouseListener);
    xrefs.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    xrefs.setRowSelectionInterval(0, 0);
    final JPanel tablePanel = new JPanel(new BorderLayout(5, 5));
    tablePanel.setBorder(new TitledBorder("Cross references"));
    tablePanel.add(new JScrollPane(xrefs), BorderLayout.CENTER);
    add(tablePanel, BorderLayout.CENTER);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) ActionListener(java.awt.event.ActionListener) BorderLayout(java.awt.BorderLayout) ActionEvent(java.awt.event.ActionEvent) JTable(javax.swing.JTable) JButton(javax.swing.JButton) TitledBorder(javax.swing.border.TitledBorder)

Example 77 with TitledBorder

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

the class CAddressSpaceNodeComponent method createGui.

/**
   * Creates all the necessary GUI components of this component.
   */
private void createGui() {
    final JPanel topPanel = new JPanel(new BorderLayout());
    final JPanel innerTopPanel = new JPanel(new BorderLayout());
    final JPanel debuggerChooserPanel = new JPanel(new BorderLayout());
    debuggerChooserPanel.setBorder(new TitledBorder("Address Space Debugger"));
    m_debuggerCombo = new CDebuggerComboBox(new CDebuggerComboModel(m_debuggerContainer));
    m_debuggerCombo.setSelectedDebugger(m_addressSpace.getConfiguration().getDebuggerTemplate());
    final JPanel debuggerComboPanel = new JPanel(new BorderLayout());
    debuggerComboPanel.add(m_debuggerCombo, BorderLayout.CENTER);
    debuggerChooserPanel.add(debuggerComboPanel, BorderLayout.CENTER);
    innerTopPanel.add(m_stdEditPanel);
    innerTopPanel.add(debuggerChooserPanel, BorderLayout.SOUTH);
    topPanel.add(innerTopPanel);
    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 CTablePanel<INaviModule>(m_table, new CModuleFilterCreator(), new CModuleFilterHelp());
    bottomPanel.setBorder(m_titledBorder);
    bottomPanel.add(new JScrollPane(m_table));
    final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, topPanel, bottomPanel);
    splitPane.setOneTouchExpandable(true);
    splitPane.setDividerLocation(splitPane.getMinimumDividerLocation());
    splitPane.setResizeWeight(0.5);
    setBorder(new EmptyBorder(0, 0, 0, 1));
    add(splitPane);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) CDebuggerComboModel(com.google.security.zynamics.binnavi.Gui.DebuggerComboBox.CDebuggerComboModel) GridLayout(java.awt.GridLayout) BorderLayout(java.awt.BorderLayout) CModuleFilterCreator(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.filters.CModuleFilterCreator) CDebuggerComboBox(com.google.security.zynamics.binnavi.Gui.DebuggerComboBox.CDebuggerComboBox) CModuleFilterHelp(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.AddressSpace.Component.Help.CModuleFilterHelp) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder) JSplitPane(javax.swing.JSplitPane) CTablePanel(com.google.security.zynamics.binnavi.Gui.FilterPanel.CTablePanel)

Example 78 with TitledBorder

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

the class CGeneralSettingsPanel method createEditElementsPanel.

/**
   * Creates the panels shown in the settings panel.
   *
   * @return The panel created by this function.
   */
private JPanel createEditElementsPanel() {
    final JPanel pEdits = new JPanel(new GridLayout(6, 1, 4, 4));
    pEdits.setBorder(new TitledBorder("General Settings"));
    // IDA Pro selection
    final JPanel idaLocationPanel = new JPanel(new BorderLayout());
    idaLocationPanel.setBorder(new EmptyBorder(0, 2, 0, 2));
    final JLabel idaLabel = new JLabel("IDA Pro Installation Directory:");
    idaLabel.setBorder(new EmptyBorder(0, 0, 0, 10));
    idaLocationPanel.add(idaLabel, BorderLayout.CENTER);
    idaLocationPanel.add(CHintCreator.createHintPanel(idaDirectoryPanel, "The location of your IDA installation."), BorderLayout.EAST);
    pEdits.add(idaLocationPanel);
    // Support Email
    final JPanel emailBoxPanel = new JPanel(new BorderLayout());
    emailBoxPanel.setBorder(new EmptyBorder(0, 2, 2, 2));
    final JLabel emailLabel = new JLabel("Your email address" + ":");
    emailBoxPanel.add(emailLabel, BorderLayout.CENTER);
    emailBoxPanel.add(CHintCreator.createHintPanel(emailBox, "This email address is used to contact you after you have submitted bugs."), BorderLayout.EAST);
    pEdits.add(emailBoxPanel, BorderLayout.CENTER);
    emailBox.setText(ConfigManager.instance().getGeneralSettings().getSupportEmailAddress());
    // Scripting language
    final JPanel scriptingPanel = new JPanel(new BorderLayout());
    scriptingPanel.setBorder(new EmptyBorder(0, 2, 2, 2));
    final JLabel scriptingLabel = new JLabel("Default Scripting Language" + ":");
    scriptingPanel.add(scriptingLabel, BorderLayout.CENTER);
    scriptingPanel.add(CHintCreator.createHintPanel(scriptingBox, "Scripting language that is selected by default when opening scripting dialogs."), BorderLayout.EAST);
    pEdits.add(scriptingPanel, BorderLayout.CENTER);
    scriptingBox.setSelectedLanguage(ConfigManager.instance().getGeneralSettings().getDefaultScriptingLanguage());
    // Log level
    final JPanel logLevelPanel = new JPanel(new BorderLayout());
    logLevelPanel.setBorder(new EmptyBorder(0, 2, 2, 2));
    final JLabel logLevelLabel = new JLabel("Log Level" + ":");
    logLevelPanel.add(logLevelLabel, BorderLayout.CENTER);
    logLevelPanel.add(CHintCreator.createHintPanel(logLevelBox, "Determines what messages are logged to the log file."), BorderLayout.EAST);
    pEdits.add(logLevelPanel, BorderLayout.CENTER);
    logLevelBox.setSelectedIndex(ConfigManager.instance().getGeneralSettings().getLogLevel());
    // Log file
    final JPanel logFilePanel = new JPanel(new BorderLayout());
    logFilePanel.setBorder(new EmptyBorder(0, 2, 2, 2));
    final JLabel logFileLabel = new JLabel("Log File" + ":");
    final JPanel fileLabel = new CLogFilePanel();
    fileLabel.setPreferredSize(new Dimension(TEXTFIELD_WIDTH, TEXTFIELD_HEIGHT));
    logFilePanel.add(logFileLabel, BorderLayout.CENTER);
    logFilePanel.add(CHintCreator.createHintPanel(fileLabel, "Location of the BinNavi log file."), BorderLayout.EAST);
    pEdits.add(logFilePanel, BorderLayout.CENTER);
    return pEdits;
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder)

Example 79 with TitledBorder

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

the class CStandardEditPanel method addDescriptionPanel.

/**
   * Creates the panel where the description text field is located.
   */
private void addDescriptionPanel() {
    final JPanel descriptionPanel = new JPanel(new BorderLayout());
    descriptionPanel.setMinimumSize(new Dimension(descriptionPanel.getPreferredSize().width, 50));
    descriptionPanel.add(new JScrollPane(m_descriptionField));
    descriptionPanel.setBorder(new TitledBorder("Description" + ":"));
    descriptionPanel.setMinimumSize(new Dimension(0, 146));
    descriptionPanel.setPreferredSize(new Dimension(0, 146));
    add(descriptionPanel, BorderLayout.CENTER);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) Dimension(java.awt.Dimension) TitledBorder(javax.swing.border.TitledBorder)

Example 80 with TitledBorder

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

the class CStandardEditPanel method addNameDatesPanel.

/**
   * Creates the panel where the name text field and the creation date and modification date labels
   * are located.
   * 
   * @param headline Headline to be shown in the border of this panel.
   * @param name Provides information for the name field.
   * @param creationDate Provides information for the creation date field.
   * @param modificationDate Provides information for the modification date field.
   */
private void addNameDatesPanel(final String headline, final IFieldDescription<String> name, final IFieldDescription<Date> creationDate, final IFieldDescription<Date> modificationDate) {
    final JPanel nameDatesPanel = new JPanel(new GridLayout(3, 1, 5, 5));
    nameDatesPanel.setBorder(new TitledBorder(headline));
    nameDatesPanel.add(new CLabeledComponent("Name" + ":", name.getHelp(), m_nameTextField));
    nameDatesPanel.add(new CLabeledComponent("Creation Date" + ":", creationDate.getHelp(), m_creationDateValueLabel));
    nameDatesPanel.add(new CLabeledComponent("Modification Date" + ":", modificationDate.getHelp(), m_modificationDateValueLabel));
    add(nameDatesPanel, BorderLayout.NORTH);
}
Also used : JPanel(javax.swing.JPanel) CLabeledComponent(com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.CLabeledComponent) GridLayout(java.awt.GridLayout) 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