Search in sources :

Example 81 with JCheckBox

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;
}
Also used : JCheckBox(javax.swing.JCheckBox) Insets(java.awt.Insets)

Example 82 with JCheckBox

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();
    }
}
Also used : JCheckBox(javax.swing.JCheckBox) ComponentInputMapUIResource(javax.swing.plaf.ComponentInputMapUIResource) InputMap(javax.swing.InputMap)

Example 83 with JCheckBox

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;
}
Also used : JCheckBox(javax.swing.JCheckBox) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel)

Example 84 with JCheckBox

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;
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel)

Example 85 with JCheckBox

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));
}
Also used : JCheckBox(javax.swing.JCheckBox) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout)

Aggregations

JCheckBox (javax.swing.JCheckBox)491 JPanel (javax.swing.JPanel)199 JLabel (javax.swing.JLabel)155 JButton (javax.swing.JButton)108 ActionEvent (java.awt.event.ActionEvent)98 ActionListener (java.awt.event.ActionListener)93 JTextField (javax.swing.JTextField)88 GridBagConstraints (java.awt.GridBagConstraints)82 GridBagLayout (java.awt.GridBagLayout)77 Insets (java.awt.Insets)66 BorderLayout (java.awt.BorderLayout)63 Dimension (java.awt.Dimension)59 BoxLayout (javax.swing.BoxLayout)56 JScrollPane (javax.swing.JScrollPane)38 ItemEvent (java.awt.event.ItemEvent)37 ItemListener (java.awt.event.ItemListener)34 FlowLayout (java.awt.FlowLayout)33 JComboBox (javax.swing.JComboBox)33 JRadioButton (javax.swing.JRadioButton)32 Box (javax.swing.Box)30