Package javax.swing

Examples of javax.swing.ComboBoxEditor


        .canSelectValues(selectedProperty, selectedCondition);
    values.setEnabled(canSelectValues);
    values.setEditable(false);
    values.setModel(conditionController.getValuesForProperty(selectedProperty, selectedCondition));
   
    final ComboBoxEditor valueEditor = conditionController.getValueEditor(selectedProperty, selectedCondition);
    values.setEditor(valueEditor != null ? valueEditor : new FixedBasicComboBoxEditor());
    setValuesEnterKeyListener();
   
    final ListCellRenderer valueRenderer = conditionController.getValueRenderer(selectedProperty, selectedCondition);
    values.setRenderer(valueRenderer != null ? valueRenderer : filterController.getConditionRenderer());
View Full Code Here


      }
      final Component editorComponent = getEditorComponent();
      if (editorComponent instanceof JComboBox) {
        final JComboBox comboBox = (JComboBox) editorComponent;
        if (comboBox.isEditable()) {
          final ComboBoxEditor editor = comboBox.getEditor();
          editor.selectAll();
          KeyEvent keyEv;
          keyEv = new KeyEvent(editor.getEditorComponent(), KeyEvent.KEY_TYPED, e.getWhen(),
              e.getModifiers(), KeyEvent.VK_UNDEFINED, e.getKeyChar(), KeyEvent.KEY_LOCATION_UNKNOWN);
          retValue = SwingUtilities.processKeyBindings(keyEv);
        }
        else {
          editorComponent.requestFocusInWindow();
View Full Code Here

    final MultiStateButton  button      = b;
    final JComboBox      ggBlend      = new JComboBox(); // ( pcbm );
    final ListCellRenderer  blendRenderer  = getComboBoxRenderer();
   
    ggBlend.setEditable( true );
    ggBlend.setEditor( new ComboBoxEditor() {
      public Component getEditorComponent() { return button; }

      public void setItem( Object o )
      {
//System.err.println( "setItem " + o );
View Full Code Here

        }
        return stripHTMLTags(selectedItem.toString());
    }

    public MComponent getEditor() {
        ComboBoxEditor editor = (ComboBoxEditor) eventQueueRunner.invoke(getComboBox(), "getEditor");
        if (editor == null)
            throw new ComponentException("Unable to get editor from combo box: " + this, finder.getScriptModel(), windowMonitor);
        MComponent editorComponent = finder.getMComponentByComponent(editor.getEditorComponent(), "doesn't matter", null);
        return editorComponent;
    }
View Full Code Here

        popup = null;
        arrowButton = null;
    }

    public void addEditor() {
        ComboBoxEditor cbe = comboBox.getEditor();
        if (cbe == null)
            return;
           
        editor = cbe.getEditorComponent();
        if (editor == null)
            return;
       
        configureEditor();
        comboBox.add(editor);
View Full Code Here

        popup = null;
        arrowButton = null;
    }

    public void addEditor() {
        ComboBoxEditor cbe = comboBox.getEditor();
        if (cbe == null)
            return;
           
        editor = cbe.getEditorComponent();
        if (editor == null)
            return;
       
        configureEditor();
        comboBox.add(editor);
View Full Code Here

    if (comboBox.getRenderer() instanceof UIResource)
      comboBox.setRenderer(null);

    // if the editor is not an instanceof UIResource, it was not set by the
    // UI delegate, so don't clear it...
    ComboBoxEditor currentEditor = comboBox.getEditor();
    if (currentEditor instanceof UIResource)
      {
        comboBox.setEditor(null);
        editor = null;
      }
View Full Code Here

        // to paint the selected item; combobox is not editable by default.
        ListCellRenderer renderer = comboBox.getRenderer();
        if (renderer == null || renderer instanceof UIResource)
          comboBox.setRenderer(createRenderer());

        ComboBoxEditor currentEditor = comboBox.getEditor();
        if (currentEditor == null || currentEditor instanceof UIResource)
          {
            currentEditor = createEditor();
            comboBox.setEditor(currentEditor);
          }
        editor = currentEditor.getEditorComponent();

        installComponents();
        installListeners();
        if (arrowButton != null)
          configureArrowButton();
View Full Code Here

        }
    }

    public JTextComponent getTextComponent() {
        final JComponent comp = getInternalComponent();
        final ComboBoxEditor editor = ((JComboBox) comp).getEditor();
        return (JTextComponent) editor.getEditorComponent();
    }
View Full Code Here

    }

    @Override
    protected JTextField createTextField() {
        createComboInputField();
        ComboBoxEditor editor = comboInputField.getInputComponent().getEditor();
        JTextField text = (JTextField) editor.getEditorComponent();
        if (!(text instanceof KongaTextComponent)) {
            KongaTextComponentCustomizer.customize(text);
        }
        return text;
    }
View Full Code Here

TOP

Related Classes of javax.swing.ComboBoxEditor

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.