Search in sources :

Example 71 with TitledBorder

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

the class CProximitySettingsDialog method createPanels.

/**
   * Creates the GUI layout of the dialog.
   */
private void createPanels() {
    setLayout(new BorderLayout(5, 5));
    final JPanel p_1 = new JPanel();
    p_1.setLayout(new BorderLayout(5, 5));
    p_1.setBorder(new TitledBorder("View Depth"));
    final JPanel p_1_1 = new JPanel();
    p_1_1.setLayout(new BorderLayout(5, 5));
    p_1_1.add(m_checkBoxParentDepth, BorderLayout.WEST);
    p_1_1.add(m_parentLabel, BorderLayout.CENTER);
    p_1_1.add(m_parentDepthSlider, BorderLayout.EAST);
    final JPanel p_1_2 = new JPanel();
    p_1_2.setLayout(new BorderLayout(5, 5));
    p_1_2.add(m_checkBoxChildDepth, BorderLayout.WEST);
    p_1_2.add(m_childLabel, BorderLayout.CENTER);
    p_1_2.add(m_childDepthSlider, BorderLayout.EAST);
    p_1.add(p_1_1, BorderLayout.NORTH);
    p_1.add(p_1_2, BorderLayout.SOUTH);
    final JPanel p_2 = new JPanel();
    p_2.setLayout(new BorderLayout(5, 0));
    final JPanel p_2_1 = new JPanel();
    final JPanel p_2_1_1 = new JPanel();
    p_2_1_1.setLayout(new GridLayout(1, 2, 5, 5));
    p_2_1_1.add(m_buttonOk);
    p_2_1_1.add(m_buttonCancel);
    p_2_1.add(p_2_1_1);
    p_2.add(p_2_1, BorderLayout.EAST);
    add(p_1, BorderLayout.NORTH);
    add(p_2, BorderLayout.SOUTH);
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) BorderLayout(java.awt.BorderLayout) TitledBorder(javax.swing.border.TitledBorder)

Example 72 with TitledBorder

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);
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder)

Example 73 with TitledBorder

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);
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) BorderLayout(java.awt.BorderLayout) ColorPanel(com.google.security.zynamics.zylib.gui.ColorPanel.ColorPanel) Color(java.awt.Color) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder)

Example 74 with TitledBorder

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

the class COutdegreeCriteriumPanel method initPanel.

/**
   * Creates the GUI of the panel.
   */
private void initPanel() {
    final JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.setBorder(new TitledBorder("Edit Outdegree Condition"));
    final JPanel operatorPanel = new JPanel(new BorderLayout());
    operatorPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    final JPanel inputPanel = new JPanel(new BorderLayout());
    inputPanel.setBorder(new EmptyBorder(5, 0, 5, 5));
    operatorPanel.add(m_operatorBox, BorderLayout.CENTER);
    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);
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) TitledBorder(javax.swing.border.TitledBorder) EmptyBorder(javax.swing.border.EmptyBorder)

Example 75 with TitledBorder

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

the class CTagCriteriumPanel method initPanel.

/**
   * Initializes the GUI of the tag.
   *
   * @param rootTag Root node of the tag tree to show.
   */
private void initPanel(final ITreeNode<CTag> rootTag) {
    final JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.setBorder(new TitledBorder("Edit Tag Condition"));
    createTree(rootTag);
    final JScrollPane pane = new JScrollPane(m_tagTree);
    pane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
    pane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    final JPanel anyTagPanel = new JPanel();
    anyTagPanel.add(m_anyTagBox);
    mainPanel.add(pane, BorderLayout.CENTER);
    mainPanel.add(m_anyTagBox, BorderLayout.SOUTH);
    add(mainPanel, BorderLayout.CENTER);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) 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