Package javax.swing

Examples of javax.swing.JCheckBox.addActionListener()


        box2.addActionListener(this);
        box2.setSelected(true);

        JCheckBox box3 = new JCheckBox("Imaginary");
        box3.setActionCommand("imag");
        box3.addActionListener(this);
        box3.setSelected(true);

        boxPanel.add(boxAbsolute);
        boxPanel.add(box2);
        boxPanel.add(box3);
View Full Code Here


        central.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
        cPane.add(central, BorderLayout.CENTER);

        //
        final JCheckBox categoriesOnlyCheck = new JCheckBox("Show categories only", catsOnlyFlag);       
        categoriesOnlyCheck.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent ae){ // switch reports if necessary
                catsOnlyFlag = categoriesOnlyCheck.isSelected();
              System.err.println("cats only flag is set to " + catsOnlyFlag);
                if (catsOnlyFlag && current.getShowPatterns()){
                  current = catsOnlyReport;
View Full Code Here

                selectedValues[i] = currentSelection;
                tempCheckBox.setBounds(hgap, vgap +
                        (Constants.UIConstants.GENERAL_COMP_HEIGHT + vgap) * i,
                        Constants.UIConstants.LABEL_WIDTH * 3,
                        Constants.UIConstants.GENERAL_COMP_HEIGHT);
                tempCheckBox.addActionListener(
                        new CheckBoxActionListner(tempCheckBox, i));
                this.lablePanel.add(tempCheckBox);

            }

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

    this.app = app ;
               
                JPanel panel = new JPanel(new FlowLayout());
                final JCheckBox checkbox = new JCheckBox("pick mode");
                panel.add(checkbox);
                checkbox.addActionListener(new ActionListener() {

                    public void actionPerformed(ActionEvent e) {
                        if (checkbox.isSelected()) {
                            XGrapherTaskPane.this.app.getModalGraphMouse().setMode(Mode.PICKING);
                        } else {
View Full Code Here

    }

    /* Create CheckBox for choosing shown stats. */
    private void createCheckBox(String title, JPanel container) {
        JCheckBox checkBox = new JCheckBox(title, true);
        checkBox.addActionListener(new StatsTypeListener());
        container.add(checkBox);
    }

    private JButton createButton(String text, ActionListener listener) {
        JButton button = new JButton(text);
View Full Code Here

    private Component buildToolBar() {
      JToolBar bar = new JToolBar();
      bar.setFloatable(false);
      final JCheckBox checkBox = new JCheckBox("Sync");
      checkBox.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          {
              _synchronized = checkBox.isSelected();
            }
        }
View Full Code Here

   
    final JCheckBox remoteEnabled = new JCheckBox(getTextLabel(textLabels, 38)); //#id 1078
    remoteEnabled.setBackground(Color.WHITE);
    remoteEnabled.setSelected(core.isRemoteEnabled());
    remoteEnabled.setBounds(10, 10, 450, 24);
    remoteEnabled.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        core.setRemoteEnabled(remoteEnabled.isSelected());
      }
    });
    panelSecurity.add(remoteEnabled);
View Full Code Here

      semanticPanel = new JPanel();
      semanticPanel.setBackground(Color.white);
      semanticPanel.setLayout(new BoxLayout(semanticPanel,BoxLayout.Y_AXIS));
      JCheckBox all = new JCheckBox("All Semantic Types");
      all.setOpaque(false);
      all.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          JCheckBox all = (JCheckBox) e.getSource();
          for(int i =0; i<semanticPanel.getComponentCount();i++){
            Component c = semanticPanel.getComponent(i);
            if(c instanceof JCheckBox && c != e.getSource()){
View Full Code Here

      sourcePanel = new JPanel();
      sourcePanel.setBackground(Color.white);
      sourcePanel.setLayout(new BoxLayout(sourcePanel,BoxLayout.Y_AXIS));
      JCheckBox all = new JCheckBox("All Sources");
      all.setOpaque(false);
      all.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          JCheckBox all = (JCheckBox) e.getSource();
          for(int i =0; i<sourcePanel.getComponentCount();i++){
            Component c = sourcePanel.getComponent(i);
            if(c instanceof JCheckBox && c != e.getSource()){
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.