Package com.intellij.util

Examples of com.intellij.util.ListWithSelection


                new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0,
                                       0));
  }

  public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
    final ListWithSelection options = (ListWithSelection)value;
    if (options.getSelection() == null) {
      options.selectFirst();
    }
    myComboBox.removeAllItems();
    for (Iterator each = options.iterator(); each.hasNext();) {
      myComboBox.addItem(each.next());
    }

    myComboBox.setSelectedItem(options.getSelection());

    return myPanel;
  }
View Full Code Here


        new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
  }

  public JComponent getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    if (value instanceof ListWithSelection) {
      final ListWithSelection tags = (ListWithSelection)value;
      if (tags.getSelection() == null) {
        tags.selectFirst();
      }
      myCombo.removeAllItems();
      for (Object tag : tags) {
        myCombo.addItem(tag);
      }
      myCombo.setSelectedItem(tags.getSelection());
    }
    else {
      LOG.error("value " + LogUtil.objectAndClass(value) + ", at " + row + ":" + column + ", in " + table.getModel());
      myCombo.removeAllItems();
      myCombo.setSelectedIndex(-1);
View Full Code Here

        new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)
    );
  }

  public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
    final ListWithSelection options = (ListWithSelection)value;
    if (options.getSelection() == null) {
      options.selectFirst();
    }
    myComboBox.removeAllItems();
    for (Iterator each = options.iterator(); each.hasNext();) {
      myComboBox.addItem(each.next());
    }

    myComboBox.setSelectedItem(options.getSelection());

    return myPanel;
  }
View Full Code Here

                                                 boolean isSelected,
                                                 boolean hasFocus,
                                                 int row,
                                                 int column) {
    LOG.assertTrue(value instanceof ListWithSelection, value.getClass().getName());
    final ListWithSelection tags = (ListWithSelection)value;
    if (tags.getSelection() == null) {
      tags.selectFirst();
    }
    myCombo.removeAllItems();
    for (Iterator each = tags.iterator(); each.hasNext();) {
      myCombo.addItem(each.next());
    }

    myCombo.setSelectedItem(tags.getSelection());

    return this;
  }
View Full Code Here

TOP

Related Classes of com.intellij.util.ListWithSelection

Copyright © 2018 www.massapicom. 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.