Package javax.swing.plaf.basic

Examples of javax.swing.plaf.basic.BasicComboBoxEditor


    public EditorComponent(JTable t, Color c) {
      super();
      this.setBorder(null);
      color = c;
      this.table = t;
      this.setEditor(new BasicComboBoxEditor() {
        public Component getEditorComponent() {
          return colorEditor;
        }

        public Object getItem() {
View Full Code Here


        // NOTE: Typical of Swing, the following does not set
        // the background color. So we have to specify a
        // custom editor.  #$(#&$#(@#!!
        // combobox.setBackground(background);
        combobox.setEditor(new BasicComboBoxEditor() {
            public Component getEditorComponent() {
                Component result = super.getEditorComponent();
                result.setBackground(background);
                result.setForeground(foreground);
                return result;
View Full Code Here

  }

  public static ComboBoxEditor getTextDateTimeEditor() {
      final ContainerComboBoxEditor editor = new ContainerComboBoxEditor();
    final NamedObject keyText = new NamedObject("text", "1Ab");
    final BasicComboBoxEditor textEditor = new FixedBasicComboBoxEditor(){
      private Object oldItem;

      @Override
          public void setItem(Object object) {
        oldItem = object;
View Full Code Here

        // Use the specified text field
        else
            this.textField = textField;

        // Use a custom editor that uses the text field
        setEditor(new BasicComboBoxEditor() {
                @Override
                public Component getEditorComponent() {
                    return EditableComboBox.this.textField;
                }
            });
View Full Code Here

        assertTrue(propertyChangeController.isChanged("renderer"));
    }

    public void testGetSetEditor() throws Exception {
        assertNotNull(comboBox.getEditor());
        ComboBoxEditor newEditor = new BasicComboBoxEditor();
        comboBox.setEditor(newEditor);
        assertEquals(newEditor, comboBox.getEditor());
        assertTrue(propertyChangeController.isChanged("editor"));
        comboBox.setEditor(null);
        assertNull(comboBox.getEditor());
View Full Code Here

        private final void build(String initialText, final ActionListener listener) {
            input = new JosmTextField(30);
            cbInput = new HistoryComboBox();
            cbInput.setPrototypeDisplayValue(new AutoCompletionListItem("xxxx"));
            cbInput.setEditor(new BasicComboBoxEditor() {
                @Override
                protected JosmTextField createEditorComponent() {
                    return input;
                }
            });
View Full Code Here

        cbType.addItem(trc("osm object types", "mixed"));
        cbType.setToolTipText(tr("Choose the OSM object type"));
        JLabel lbl2 = new JLabel(tr("Object ID:"));

        cbId.setEditor(new BasicComboBoxEditor() {
            @Override
            protected JosmTextField createEditorComponent() {
                return tfId;
            }
        });
View Full Code Here

TOP

Related Classes of javax.swing.plaf.basic.BasicComboBoxEditor

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.