Package javax.swing

Examples of javax.swing.JComboBox.addPropertyChangeListener()


    JComboBox c = new JComboBox();
    c.setEditable(false);
    harness.check(c.isEditable(), false);
   
    // now check property change events
    c.addPropertyChangeListener(this);
   
    c.setEditable(true);
    harness.check(c.isEditable(), true);
    harness.check(event.getPropertyName(), "editable");
    harness.check(event.getOldValue(), Boolean.FALSE);
View Full Code Here


      {
        harness.fail("Problem setting MetalLookAndFeel");
      }
   
    JComboBox c1 = new JComboBox(new Object[] {"A", "B", "C"});
    c1.addPropertyChangeListener(this);
   
    ComboBoxEditor editor = new MetalComboBoxEditor();
    c1.setEditor(editor);
    harness.check(c1.getEditor(), editor);
    harness.check(event.getPropertyName(), "editor");
View Full Code Here

   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)     
  {  
    JComboBox c = new JComboBox();
    c.addPropertyChangeListener(this);
   
    // set a new prototype
    c.setPrototypeDisplayValue("Test1");
    harness.check(c.getPrototypeDisplayValue(), "Test1");
    harness.check(name, "prototypeDisplayValue");
View Full Code Here

  }

  protected JComponent buildEndpointComponent()
  {
    final JComboBox endpointCombo = new JComboBox( endpointsModel );
    endpointCombo.addPropertyChangeListener( this );
    endpointCombo.setToolTipText( endpointsModel.getSelectedItem().toString() );

    return UISupport.addTooltipListener( endpointCombo, "- no endpoint set for request -" );
  }
View Full Code Here

        final JComboBox endpointCombo = new JComboBox(endpointsModel);
        endpointCombo.setEditable(true);
        endpointCombo.setName(END_POINT_COMBO_BOX);
        Document textFieldDocument = ((JTextComponent) endpointCombo.getEditor().getEditorComponent()).getDocument();
        endpointsModel.listenToChangesIn(textFieldDocument);
        endpointCombo.addPropertyChangeListener(this);
        endpointCombo.setToolTipText(endpointsModel.getSelectedItem().toString());

        return UISupport.addTooltipListener(endpointCombo, "- no endpoint set for request -");
    }
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.