Search in sources :

Example 1 with CHelpLabel

use of com.google.security.zynamics.binnavi.Help.CHelpLabel 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)

Aggregations

CNameHelp (com.google.security.zynamics.binnavi.Gui.MainWindow.ProjectTree.Nodes.Tag.Component.Help.CNameHelp)1 CHelpLabel (com.google.security.zynamics.binnavi.Help.CHelpLabel)1 BorderLayout (java.awt.BorderLayout)1 Dimension (java.awt.Dimension)1 GridLayout (java.awt.GridLayout)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 JSplitPane (javax.swing.JSplitPane)1 EmptyBorder (javax.swing.border.EmptyBorder)1 TitledBorder (javax.swing.border.TitledBorder)1