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