Package javax.swing

Examples of javax.swing.JCheckBox.addActionListener()


                  mInitiallySelectedTypeNames, type.getName())));

          // add checkbox
          checkbox = new JCheckBox(type.getShortName(), selected);
          checkbox.setToolTipText(type.getName());
          checkbox.addActionListener(this);
          checkbox.setBackground(c);
          // annotationCheckboxPanel.add(checkbox); do it later JMP
          checkBoxes.put(type.getName(), checkbox);
          checkBoxesDone.add(checkbox);
          // add to (Type, Checkbox) map
View Full Code Here


        // assign next available color
        Color c = COLORS[mEntityToCheckboxMap.size() % COLORS.length];
        // add checkbox
        checkbox = new JCheckBox(entity.getCanonicalForm(), true);
        checkbox.setToolTipText(entity.getCanonicalForm());
        checkbox.addActionListener(this);
        checkbox.setBackground(c);
        entityCheckboxPanel.add(checkbox);
        // add to (Entity, Checkbox) map
        mEntityToCheckboxMap.put(entity, checkbox);
      }
View Full Code Here

    });
   
    alphaCheckbox.addActionListener(checkboxListener);
    hsbCheckbox.addActionListener(checkboxListener);
    rgbCheckbox.addActionListener(checkboxListener);
    modeCheckbox.addActionListener(checkboxListener);
    button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        Color color = picker.getColor();
        color = ColorPicker.showDialog(demo, color, true);
        if(color!=null)
View Full Code Here

                    name = name.substring(NAME_SAVE_PFX_LEN);
                    JCheckBox check = new JCheckBox(
                            JMeterUtils.getResString(RESOURCE_PREFIX + name)// $NON-NLS-1$
                            ,((Boolean) methods[i].invoke(saveConfig, new Object[0])).booleanValue());
                    checkPanel.add(check, BorderLayout.NORTH);
                    check.addActionListener(this);
                    String actionCommand = NAME_SET_PREFIX + name; // $NON-NLS-1$
                    check.setActionCommand(actionCommand);
                    if (!functors.containsKey(actionCommand)) {
                        functors.put(actionCommand, new Functor(actionCommand));
                    }
View Full Code Here

                    checkBox = new JCheckBox(columnName);
                    checkBox.setOpaque(false);
                    checkBox.setBorder(_EMPTY_BORDER);
                    checkBox.setHorizontalAlignment(SwingConstants.CENTER);
                    checkBox.setVerticalAlignment(SwingConstants.TOP);
                    checkBox.addActionListener(new CheckBoxActionListener(i));
                    captionPanel.add(checkBox);

                    enabled = ingredient.isEnabled(i);
                    checkBox.setSelected(enabled);
                } else {
View Full Code Here

        String deviceName = devicesName.get(devicesName.size() - 1);
        JComponent deviceNameComponent = null;
        if (activateFunction) {
            JCheckBox deviceNameCheckBox = new JCheckBox(deviceName);
            checkMap.put(deviceName.toLowerCase(), deviceNameCheckBox);
            deviceNameCheckBox.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent arg0) {
                    Object source = arg0.getSource();
                    if (source != null && source instanceof JCheckBox) {
                        JCheckBox check = (JCheckBox) source;
View Full Code Here

        final NumberMatrixBox box = new NumberMatrixBox();
        box.setCleanWidgetOnDisconnect(viewer, false);
        box.connectWidget(viewer, key1);
        final JCheckBox keySelectionBox = new JCheckBox("Use 1st key");
        keySelectionBox.setSelected(true);
        keySelectionBox.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                SwingUtilities.invokeLater(new Runnable() {
                    @Override
                    public void run() {
View Full Code Here

                });
            }
        });
        final JCheckBox cleanCheckBox = new JCheckBox("Clean on disconnect");
        cleanCheckBox.setSelected(box.isCleanWidgetOnDisconnect(viewer));
        cleanCheckBox.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                box.setCleanWidgetOnDisconnect(viewer, cleanCheckBox.isSelected());
            }
        });
View Full Code Here

    public ChartPropertiesToXml() {
        super();
        setOneTouchExpandable(true);
        JCheckBox addRemoveListener = new JCheckBox("isListening event");
        addRemoveListener.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent arg0) {
                JCheckBox source = (JCheckBox) arg0.getSource();
                if (source.isSelected()) {
View Full Code Here

          try {
            name = name.substring(4);
            JCheckBox check = new JCheckBox(JMeterUtils.getResString("save " + name), ((Boolean) methods[i]
                .invoke(saveConfig, new Object[0])).booleanValue());
            checkPanel.add(check, BorderLayout.NORTH);
            check.addActionListener(this);
            check.setActionCommand("set" + name);
            if (!functors.containsKey(check.getActionCommand())) {
              functors.put(check.getActionCommand(), new Functor(check.getActionCommand()));
            }
          } catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.