use of com.intellij.ui.components.JBCheckBox in project netbeans-mmd-plugin by raydac.
the class KeyShortCutEditPanel method initComponents.
@SuppressWarnings("unchecked")
private void initComponents() {
scrollPaneTable = new JBScrollPane();
tableKeyShortcuts = new JBTable();
mainPanel = new JBPanel();
labelKeyCode = new JBLabel();
checkBoxALT = new JBCheckBox();
checkBoxCTRL = new JBCheckBox();
checkBoxSHIFT = new JBCheckBox();
checkBoxMeta = new JBCheckBox();
textFieldKeyCode = new JBTextField();
buttonEditKeyCode = new JToggleButton();
setLayout(new java.awt.BorderLayout());
// NOI18N
scrollPaneTable.setBorder(javax.swing.BorderFactory.createTitledBorder(BUNDLE.getString("KeyShortCutEditPanel.ScrollPaneBorderTitle")));
tableKeyShortcuts.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
tableKeyShortcuts.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
tableKeyShortcutsMouseClicked(evt);
}
});
scrollPaneTable.setViewportView(tableKeyShortcuts);
add(scrollPaneTable, java.awt.BorderLayout.CENTER);
// NOI18N
labelKeyCode.setText(BUNDLE.getString("KeyShortCutEditPanel.labelKeyCode.text"));
// NOI18N
checkBoxALT.setText(BUNDLE.getString("KeyShortCutEditPanel.checkBoxALT.text"));
// NOI18N
checkBoxCTRL.setText(BUNDLE.getString("KeyShortCutEditPanel.checkBoxCTRL.text"));
// NOI18N
checkBoxSHIFT.setText(BUNDLE.getString("KeyShortCutEditPanel.checkBoxSHIFT.text"));
// NOI18N
checkBoxMeta.setText(BUNDLE.getString("KeyShortCutEditPanel.checkBoxMeta.text"));
textFieldKeyCode.addFocusListener(new java.awt.event.FocusAdapter() {
public void focusLost(java.awt.event.FocusEvent evt) {
textFieldKeyCodeFocusLost(evt);
}
});
textFieldKeyCode.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
textFieldKeyCodeKeyTyped(evt);
}
public void keyPressed(java.awt.event.KeyEvent evt) {
textFieldKeyCodeKeyPressed(evt);
}
});
// NOI18N
buttonEditKeyCode.setText(BUNDLE.getString("KeyShortCutEditPanel.buttonEditKeyCode.text"));
buttonEditKeyCode.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonEditKeyCodeActionPerformed(evt);
}
});
javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
mainPanel.setLayout(mainPanelLayout);
mainPanelLayout.setHorizontalGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout.createSequentialGroup().addContainerGap(44, Short.MAX_VALUE).addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false).addGroup(mainPanelLayout.createSequentialGroup().addComponent(labelKeyCode).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(textFieldKeyCode)).addGroup(mainPanelLayout.createSequentialGroup().addComponent(checkBoxALT).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(checkBoxCTRL).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(checkBoxSHIFT).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(checkBoxMeta))).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(buttonEditKeyCode).addContainerGap()));
mainPanelLayout.setVerticalGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(mainPanelLayout.createSequentialGroup().addContainerGap().addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING).addComponent(buttonEditKeyCode, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE).addGroup(javax.swing.GroupLayout.Alignment.LEADING, mainPanelLayout.createSequentialGroup().addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(labelKeyCode).addComponent(textFieldKeyCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(checkBoxALT).addComponent(checkBoxCTRL).addComponent(checkBoxSHIFT).addComponent(checkBoxMeta)))).addContainerGap(44, Short.MAX_VALUE)));
add(mainPanel, java.awt.BorderLayout.PAGE_END);
}
use of com.intellij.ui.components.JBCheckBox in project sonarlint-intellij by SonarSource.
the class SonarLintProjectBindPanel method create.
public JPanel create(Project project) {
this.project = project;
rootPanel = new JPanel(new BorderLayout());
bindEnable = new JBCheckBox("Enable binding to remote SonarQube server", true);
bindEnable.addItemListener(new BindItemListener());
createBindPanel();
rootPanel.add(bindEnable, BorderLayout.NORTH);
rootPanel.add(bindPanel, BorderLayout.CENTER);
return rootPanel;
}
use of com.intellij.ui.components.JBCheckBox in project intellij-leiningen-plugin by derkork.
the class LeiningenSettings method createComponent.
public JComponent createComponent() {
JPanel outerPanel = new JPanel(new BorderLayout());
JPanel leinPanel = new JPanel(new FormLayout("80dlu, fill:80dlu:grow, 20dlu, 80dlu", "p,p,p"));
CellConstraints c = new CellConstraints();
int row = 1;
leinPanel.add(new JBLabel("Leiningen executable:"), c.xy(1, row));
this.leinBinSelectorField = new TextFieldWithBrowseButton();
leinBinSelectorField.addBrowseFolderListener("Select the Leiningen executable", "'lein' on Linux/MacOS, 'lein.bat' on Windows. ", null, new FileChooserDescriptor(true, false, false, false, false, false));
leinPanel.add(leinBinSelectorField, c.xy(2, row));
row++;
leinPanel.add(new JBLabel("Leiningen Home:"), c.xy(1, row));
this.leinHomeSelectorField = new TextFieldWithBrowseButton();
leinHomeSelectorField.addBrowseFolderListener("Select the Leiningen home directory", "usually at $USER_HOME/.lein", null, new FileChooserDescriptor(false, true, false, false, false, false));
leinPanel.add(leinHomeSelectorField, c.xy(2, row));
this.overrideLeinHome = new JBCheckBox();
leinPanel.add(overrideLeinHome, c.xy(3, row));
leinPanel.add(new JBLabel("Override"), c.xy(4, row));
row++;
leinPanel.add(new JBLabel("Leiningen Jar:"), c.xy(1, row));
this.leinJarSelectorField = new TextFieldWithBrowseButton();
leinJarSelectorField.addBrowseFolderListener("Select the Leiningen Jar", "usually at $USER_HOME/.lein/self-installs/leinigen-VERSION-standalone.jar", null, new FileChooserDescriptor(true, false, true, true, false, false));
leinPanel.add(leinJarSelectorField, c.xy(2, row));
this.overrideLeinJar = new JBCheckBox();
leinPanel.add(overrideLeinJar, c.xy(3, row));
leinPanel.add(new JBLabel("Override"), c.xy(4, row));
outerPanel.add(leinPanel, BorderLayout.NORTH);
myWatcher = new UserActivityWatcher();
myWatcher.register(outerPanel);
myWatcher.addUserActivityListener(new UserActivityListener() {
public void stateChanged() {
changed = true;
leinJarSelectorField.setEnabled(overrideLeinJar.isSelected());
leinHomeSelectorField.setEnabled(overrideLeinHome.isSelected());
}
});
return outerPanel;
}
Aggregations