Package javax.swing

Examples of javax.swing.JComboBox.addActionListener()


    ScreenShare.instance.vscreenResizeLabel.setBounds(250, 300, 200,24 );
    ScreenShare.instance.t.add(ScreenShare.instance.vscreenResizeLabel);
   
    JComboBox comboResize  = new JComboBox(selectResize)
    comboResize.setBounds(250, 330, 200, 24);
    comboResize.addActionListener(new GetResizeChoice());
    comboResize.setSelectedIndex(ScreenShare.instance.defaultQualityScreensharing);
   
    ScreenShare.instance.jVScreenResizeMode = comboResize;
    ScreenShare.instance.t.add(ScreenShare.instance.jVScreenResizeMode);
   
View Full Code Here


    ScreenShareRTMPT.instance.vscreenResizeLabel.setBounds(250, 300, 200,24 );
    ScreenShareRTMPT.instance.t.add(ScreenShareRTMPT.instance.vscreenResizeLabel);
   
    JComboBox comboResize  = new JComboBox(selectResize)
    comboResize.setBounds(250, 330, 200, 24);
    comboResize.addActionListener(new GetResizeChoice());
    comboResize.setSelectedIndex(ScreenShareRTMPT.instance.defaultQualityScreensharing);
   
    ScreenShareRTMPT.instance.jVScreenResizeMode = comboResize;
    ScreenShareRTMPT.instance.t.add(ScreenShareRTMPT.instance.jVScreenResizeMode);
   
View Full Code Here

      }
    });
   
    // Bind changing the selection to changing the font. The selector is
    // enabled only when font changing is enabled, so this should be safe
    fontList.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        String selected = fontList.getSelectedItem().toString();
        WtWindowManager.getInstance().setProperty(FONT_PROPERTY, selected);
      }
    });
View Full Code Here

            .lastIndexOf('.') + 1);
        return super.getListCellRendererComponent(list, valueString,
            index, isSelected, cellHasFocus);
      }
    });
    jcb.addActionListener(new LayoutChooser(jcb, viewer));
    jcb.setSelectedItem(CircleLayout.class);

    JButton collapse = new JButton("Collapse");
    collapse.addActionListener(new ActionListener() {
View Full Code Here

      filterText.addKeyListener(
        new ExpressionRuleContext(filterModel, filterText));
      filterText.getDocument().addDocumentListener(
        new DelayedFilterTextDocumentListener(filterText));
      filterCombo.setEditable(true);
      filterCombo.addActionListener(
        new AbstractAction() {
          public void actionPerformed(ActionEvent e) {
            if (e.getActionCommand().equals("comboBoxEdited")) {
              try {
                //verify the expression is valid
View Full Code Here

    textArea.setRows(20);

    final JPanel syntaxSelectionPane = new JPanel();
    syntaxSelectionPane.setLayout(new FlowLayout());
    final JComboBox syntaxBox = new JComboBox(syntaxModel);
    syntaxBox.addActionListener(new SyntaxHighlightAction());
    syntaxSelectionPane.add(syntaxBox);

    final JPanel contentPane = new JPanel();
    contentPane.setLayout(new BorderLayout());
    contentPane.add(new RTextScrollPane(500, 300, textArea, true), BorderLayout.CENTER);
View Full Code Here

  }

  protected Component createContentPane()
  {
    final JComboBox syntaxBox = new JComboBox(syntaxModel);
    syntaxBox.addActionListener(new SyntaxHighlightAction());

    final JPanel syntaxSelectionPane = new JPanel();
    syntaxSelectionPane.setLayout(new FlowLayout());
    syntaxSelectionPane.add(syntaxBox);
View Full Code Here

  }

  protected JComboBox createZoomSelector(final PreviewPane pane)
  {
    final JComboBox zoomSelect = new JComboBox(pane.getZoomModel());
    zoomSelect.addActionListener(new ZoomSelectAction(pane.getZoomModel(), pane));
    zoomSelect.setAlignmentX(Component.RIGHT_ALIGNMENT);
    return zoomSelect;
  }

View Full Code Here

    String array[] = new String[] { "a", "b", "c" };

    JComboBox box = new JComboBox(array);

    box.addActionListener(this);
    box.addItemListener(this);

    box.setActionCommand(COMMAND);

    harness.check(box.getActionCommand(), COMMAND, "action command");
View Full Code Here

  implements Testlet, ActionListener, ItemListener
{
  public void test(TestHarness harness)
  {
    JComboBox box = new JComboBox();
    box.addActionListener(this);
    box.addItemListener(this);
    checkListenerLists(harness, box);
  }

  private void checkListenerLists(TestHarness harness, JComboBox box)
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.