Examples of addItemListener()


Examples of javax.swing.JComboBox.addItemListener()

        column.setPreferredWidth(130);
      } else if (MetadataTableModel.IS_KEY_FIELD_INDEX == i) {// isKey
        column.setPreferredWidth(70);
      } else if (MetadataTableModel.CONSTRAINT_TYPE_INDEX == i) {// keyType
        JComboBox constraintTypeComboBox = new JComboBox(new ConstraintTypeComboBoxModel());
        constraintTypeComboBox.addItemListener(new ConstraintTypeComboBoxItemListener(this));
        column.setCellEditor(new DefaultCellEditor(constraintTypeComboBox));
        column.setPreferredWidth(250);
      } else if (MetadataTableModel.REFERENCING_TABLE_INDEX == i) {// ReferencingTable
        JComboBox referencingTableComboBox = new JComboBox();
        referencingTableComboBox.addPopupMenuListener(new TableComboBoxPopupMenuListener(this));
View Full Code Here

Examples of javax.swing.JComboBox.addItemListener()

    try {
      loadHistory(combo);
    } catch (IOException e) {
      // fails the first time
    }
    combo.addItemListener(
      new ItemListener() {
        public void itemStateChanged(ItemEvent event) {
          if (event.getStateChange() == ItemEvent.SELECTED) {
            textChanged();
          }
View Full Code Here

Examples of javax.swing.JComboBox.addItemListener()

        new ComboBoxAdapter(
            functionList,
            presentationModel
                .getBufferedModel(PreventiveActionModel.PROPERTY_JOB_FUNCTION)));
    comboBox.setName("ComboBoxFunction");
    comboBox.addItemListener(new FunctionItemListener(presentationModel));
    return comboBox;
  }

  /**
   * Lager komboboks for kategori
View Full Code Here

Examples of javax.swing.JComboBox.addItemListener()

      new DefaultCellEditor(textField));
    table.getColumnModel().getColumn(1).setCellEditor(backgroundEditor);
    table.getColumnModel().getColumn(2).setCellEditor(foregroundEditor);

    background.addItemListener(new ColorItemListener(background));
    foreground.addItemListener(new ColorItemListener(foreground));

    table.getColumnModel().getColumn(0).setCellRenderer(
      new ExpressionTableCellRenderer());
    table.getColumnModel().getColumn(1).setCellRenderer(
      new ColorTableCellRenderer());
View Full Code Here

Examples of javax.swing.JList.addItemListener()

            JComboBox select = new JComboBox(optionList.toArray());
            applyComponentStyle(select);

            select.setEditable(false);
            select.setRenderer(new CellRenderer());
            select.addItemListener(new HeadingItemListener());

            return select;
        }
    }
   
View Full Code Here

Examples of javax.swing.JMenuItem.addItemListener()

    JMenuItem menuBarCheckBoxMenuItem = new JCheckBoxMenuItem("菜单栏(M)", true);
   
    menuBarCheckBoxMenuItem.setIcon(IconUtils.createImageIcon(ICON_CLASS_PATH + "tick.png"));
    menuBarCheckBoxMenuItem.setMnemonic('M');
    menuBarCheckBoxMenuItem.setAccelerator(KeyStroke.getKeyStroke('M', Event.CTRL_MASK, false));
    menuBarCheckBoxMenuItem.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange() == ItemEvent.SELECTED) {
          getJMenuBar().setVisible(true);
        } else {
          getJMenuBar().setVisible(false);
View Full Code Here

Examples of javax.swing.JRadioButton.addItemListener()

            ImageIcon icon = module.getIcon32() == null ? module.getIcon16() : module.getIcon32();
            icon = icon == null ? IconLibrary._icoModuleTypeProperty32 : icon;
            JRadioButton radioButton = ComponentFactory.getRadioButton(module.getLabel(), icon, "" + module.getIndex());
           
            radioButton.addActionListener(this);
            radioButton.addItemListener(new SelectModuleAction());
            buttonGroup.add(radioButton);
            panelModules.add(radioButton, Layout.getGBC( x, y++, 1, 1, 1.0, 1.0
                    ,GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL,
                     new Insets( 0, 5, 5, 5), 0, 0));
           
View Full Code Here

Examples of javax.swing.JRadioButton.addItemListener()

                !module.isParentModule() && !module.isChildModule()) {
               
                JRadioButton rb = ComponentFactory.getRadioButton(
                        module.getName(), module.getIcon16(), "" + module.getIndex());

                rb.addItemListener(new ModuleSelectionListener());
                bg.add(rb);
                add(rb, Layout.getGBC( x, y++, 1, 1, 1.0, 1.0
                   ,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
                    new Insets( 0, 5, 5, 5), 0, 0));
               
View Full Code Here

Examples of javax.swing.JRadioButton.addItemListener()

                JRadioButton rb = ComponentFactory.getRadioButton(
                        module.getName(), module.getIcon16(), "" + module.getIndex());

                fields.put(module.getIndex(), rb);
               
                rb.addItemListener(new ModuleSelectionListener());
                bg.add(rb);
                add(rb, Layout.getGBC( x, y++, 1, 1, 1.0, 1.0
                   ,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
                    new Insets( 0, 5, 5, 5), 0, 0));
               
View Full Code Here

Examples of javax.swing.JRadioButton.addItemListener()

    }

    for (int i = 0; i < _radioButtons.length; i++) {
      JRadioButton rb = _radioButtons[i];

      rb.addItemListener(new ItemListener() {
        @Override
        public void itemStateChanged(ItemEvent e) {
          fireValueChanged();

        }
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.