use of javax.swing.border.TitledBorder in project binnavi by google.
the class TypeEditorPanel method createControls.
private void createControls(final TypeManager typeManager, final String caption) {
setBounds(100, 100, 588, 529);
setLayout(new BorderLayout());
setBorder(new TitledBorder(new LineBorder(Color.LIGHT_GRAY, 1, true), caption));
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
add(new TypeEditorSearchPanel(typesTree), BorderLayout.NORTH);
add(contentPanel, BorderLayout.CENTER);
contentPanel.setLayout(new BorderLayout(0, 0));
{
final JScrollPane scrollPane = new JScrollPane();
contentPanel.add(scrollPane, BorderLayout.CENTER);
{
typesTree.addMouseListener(new TypeEditorMouseHandler(owner, typesTree, typeManager, this));
typesTree.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0, true), "delete_types_or_members");
typesTree.getActionMap().put("delete_types_or_members", new DeleteTypeOrMemberAction(owner, typeManager, this));
scrollPane.setViewportView(typesTree);
}
}
}
use of javax.swing.border.TitledBorder in project binnavi by google.
the class CCriteriaDialog method initDialog.
/**
* Creates the GUI of the dialog.
*
* @param jtree Tree component shown in the dialog.
* @param selectionBox Used to select new criteria.
* @param defineConditionPanel Panel where the condition is shown.
* @param okCancelPanel Panel that contains the OK and Cancel buttons.
* @param addConditionButton Add Condition button.
*/
private void initDialog(final JCriteriumTree jtree, final CConditionBox selectionBox, final JPanel defineConditionPanel, final CPanelTwoButtons okCancelPanel, final JButton addConditionButton) {
final JPanel mainPanel = new JPanel(new BorderLayout());
final JPanel deviderBorderPanel = new JPanel(new BorderLayout());
// (""));
deviderBorderPanel.setBorder(new EmptyBorder(2, 2, 2, 2));
final JPanel deviderPanel = new JPanel(new GridLayout(1, 2));
final JPanel leftPanel = new JPanel(new BorderLayout());
leftPanel.setBorder(new TitledBorder("Expression Tree"));
final JPanel rightPanel = new JPanel(new BorderLayout());
final JPanel rightTopPanel = new JPanel(new BorderLayout());
rightTopPanel.setBorder(new TitledBorder("Create Condition"));
final JPanel rightTopComboPanel = new JPanel(new BorderLayout());
rightTopComboPanel.setBorder(new EmptyBorder(1, 5, 5, 5));
final JPanel rightTopAddPanel = new JPanel(new BorderLayout());
rightTopAddPanel.setBorder(new EmptyBorder(1, 0, 5, 5));
mainPanel.add(deviderBorderPanel, BorderLayout.CENTER);
mainPanel.add(okCancelPanel, BorderLayout.SOUTH);
okCancelPanel.getFirstButton().setEnabled(jtree.getSelectionPath() != null);
deviderBorderPanel.add(deviderPanel, BorderLayout.CENTER);
deviderPanel.add(leftPanel);
deviderPanel.add(rightPanel);
final JScrollPane pane = new JScrollPane(jtree);
pane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
pane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
leftPanel.add(pane, BorderLayout.CENTER);
defineConditionPanel.setBorder(new TitledBorder("Define Condition"));
rightPanel.add(rightTopPanel, BorderLayout.NORTH);
rightPanel.add(defineConditionPanel, BorderLayout.CENTER);
rightTopPanel.add(rightTopComboPanel, BorderLayout.CENTER);
rightTopPanel.add(rightTopAddPanel, BorderLayout.EAST);
rightTopComboPanel.add(selectionBox, BorderLayout.CENTER);
addConditionButton.setText("Add");
addConditionButton.setEnabled(false);
rightTopAddPanel.add(addConditionButton, BorderLayout.CENTER);
add(mainPanel);
setIconImage(null);
pack();
}
use of javax.swing.border.TitledBorder in project binnavi by google.
the class CDialogUpdater method updateDefineConditionPanel.
/**
* Updates the condition configuration panel.
*
* @param node The actively selected node.
*/
private void updateDefineConditionPanel(final JCriteriumTreeNode node) {
final Component component = node.getCriterium().getCriteriumPanel();
m_defineConditionPanel.removeAll();
m_defineConditionPanel.setBorder(null);
if (component == null) {
final JPanel defaultPanel = new JPanel(new BorderLayout());
defaultPanel.setBorder(new TitledBorder("Define Condition"));
m_defineConditionPanel.add(defaultPanel, BorderLayout.CENTER);
} else {
m_defineConditionPanel.add(component);
}
m_defineConditionPanel.updateUI();
}
use of javax.swing.border.TitledBorder in project binnavi by google.
the class CSelectionCriteriumPanel method initPanel.
/**
* Creates the GUI of the panel.
*/
private void initPanel() {
final JPanel mainPanel = new JPanel(new BorderLayout());
mainPanel.setBorder(new TitledBorder("Edit Selection Condition"));
final JPanel comboPanel = new JPanel(new BorderLayout());
comboPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
selectionStateBox.addItem(SelectionState.SELECTED);
selectionStateBox.addItem(SelectionState.UNSELECTED);
comboPanel.add(selectionStateBox, BorderLayout.CENTER);
mainPanel.add(comboPanel, BorderLayout.NORTH);
add(mainPanel, BorderLayout.CENTER);
}
use of javax.swing.border.TitledBorder in project binnavi by google.
the class CTextCriteriumPanel method initPanel.
/**
* Creates the panel GUI.
*/
private void initPanel() {
final JPanel mainPanel = new JPanel(new BorderLayout());
mainPanel.setBorder(new TitledBorder("Edit Text Condition"));
final JPanel inputPanel = new JPanel(new BorderLayout());
inputPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
m_inputField.setPreferredSize(new Dimension(m_inputField.getPreferredSize().width, 23));
inputPanel.add(m_inputField, BorderLayout.NORTH);
final JPanel checkboxesPanel = new JPanel(new GridLayout(2, 1));
checkboxesPanel.setBorder(new EmptyBorder(5, 0, 0, 0));
checkboxesPanel.add(m_caseSensitiveBox);
checkboxesPanel.add(m_regExBox);
inputPanel.add(checkboxesPanel, BorderLayout.CENTER);
mainPanel.add(inputPanel, BorderLayout.NORTH);
add(mainPanel, BorderLayout.CENTER);
}
Aggregations