use of javax.swing.JCheckBox in project adempiere by adempiere.
the class FindValueRenderer method getCheck.
/**
* Get Check Box
* @return check box
*/
private JCheckBox getCheck() {
if (m_check == null) {
m_check = new JCheckBox();
m_check.setMargin(new Insets(0, 0, 0, 0));
m_check.setHorizontalAlignment(JLabel.CENTER);
}
return m_check;
}
use of javax.swing.JCheckBox in project adempiere by adempiere.
the class CompiereButtonListener method updateMnemonicBindingX.
// propertyChange
/**
* Update Mnemonic Binding
* @param b button
*/
void updateMnemonicBindingX(AbstractButton b) {
int m = b.getMnemonic();
if (m != 0) {
InputMap map = SwingUtilities.getUIInputMap(b, JComponent.WHEN_IN_FOCUSED_WINDOW);
if (map == null) {
map = new ComponentInputMapUIResource(b);
SwingUtilities.replaceUIInputMap(b, JComponent.WHEN_IN_FOCUSED_WINDOW, map);
}
map.clear();
String className = b.getClass().getName();
// Default Buttons
int mask = InputEvent.ALT_MASK;
if (// In Tab
b instanceof JCheckBox || className.indexOf("VButton") != -1)
mask = InputEvent.SHIFT_MASK + InputEvent.CTRL_MASK;
map.put(KeyStroke.getKeyStroke(m, mask, false), "pressed");
map.put(KeyStroke.getKeyStroke(m, mask, true), "released");
map.put(KeyStroke.getKeyStroke(m, 0, true), "released");
} else {
InputMap map = SwingUtilities.getUIInputMap(b, JComponent.WHEN_IN_FOCUSED_WINDOW);
if (map != null)
map.clear();
}
}
use of javax.swing.JCheckBox in project jmeter by apache.
the class ProxyControlGui method createTestPlanContentPanel.
private JPanel createTestPlanContentPanel() {
// $NON-NLS-1$
httpHeaders = new JCheckBox(JMeterUtils.getResString("proxy_headers"));
// maintain original default
httpHeaders.setSelected(true);
httpHeaders.addActionListener(this);
httpHeaders.setActionCommand(ENABLE_RESTART);
// $NON-NLS-1$
addAssertions = new JCheckBox(JMeterUtils.getResString("proxy_assertions"));
addAssertions.setSelected(false);
addAssertions.addActionListener(this);
addAssertions.setActionCommand(ENABLE_RESTART);
// $NON-NLS-1$
regexMatch = new JCheckBox(JMeterUtils.getResString("proxy_regex"));
regexMatch.setSelected(false);
regexMatch.addActionListener(this);
regexMatch.setActionCommand(ENABLE_RESTART);
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
JMeterUtils.getResString("proxy_test_plan_content")));
HorizontalPanel nodeCreationPanel = new HorizontalPanel();
nodeCreationPanel.add(createGroupingPanel());
nodeCreationPanel.add(httpHeaders);
nodeCreationPanel.add(addAssertions);
nodeCreationPanel.add(regexMatch);
HorizontalPanel targetPanel = new HorizontalPanel();
targetPanel.add(createTargetPanel());
mainPanel.add(targetPanel);
mainPanel.add(nodeCreationPanel);
return mainPanel;
}
use of javax.swing.JCheckBox in project jmeter by apache.
the class ProxyControlGui method createNotifyListenersPanel.
private JPanel createNotifyListenersPanel() {
JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString(// $NON-NLS-1$
"notify_child_listeners_fr")));
// $NON-NLS-1$
notifyChildSamplerListenerOfFilteredSamplersCB = new JCheckBox(JMeterUtils.getResString("notify_child_listeners_fr"));
notifyChildSamplerListenerOfFilteredSamplersCB.setSelected(true);
notifyChildSamplerListenerOfFilteredSamplersCB.addActionListener(this);
notifyChildSamplerListenerOfFilteredSamplersCB.setActionCommand(ENABLE_RESTART);
panel.add(notifyChildSamplerListenerOfFilteredSamplersCB);
return panel;
}
use of javax.swing.JCheckBox in project jmeter by apache.
the class InterleaveControlGui method init.
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP));
setBorder(makeBorder());
add(makeTitlePanel());
// $NON-NLS-1$
style = new JCheckBox(JMeterUtils.getResString("ignore_subcontrollers"));
add(CheckBoxPanel.wrap(style));
// $NON-NLS-1$
accrossThreads = new JCheckBox(JMeterUtils.getResString("interleave_accross_threads"));
add(CheckBoxPanel.wrap(accrossThreads));
}
Aggregations