Package java.beans

Examples of java.beans.PropertyEditor.addPropertyChangeListener()


      DefaultNode node = (DefaultNode) value;
      PropertyEditor nodeEditor = node.getEditor();
      customRenderer = (JComponent) EnsembleLibraryEditor
      .getDefaultRenderer(nodeEditor);
      ((JComponent) customRenderer).setToolTipText(node.getToolTipText());
      nodeEditor.addPropertyChangeListener(this);
     
    }
   
    return customRenderer;
  }
View Full Code Here


    System.err.println("Warning: Property \"" + name
           + "\" has non-displayabale editor.  Skipping.");
    continue;
  }
 
  editor.addPropertyChangeListener(this);

      } catch (InvocationTargetException ex) {
  System.err.println("Skipping property " + name
         + " ; exception on target: "
         + ex.getTargetException());
View Full Code Here

        assertNull(e2.getTags());
        assertSame(font, e2.getValue());
        assertTrue(e2.isPaintable());
        Component c = e2.getCustomEditor();
        assertSame(c, e2);
        e2.addPropertyChangeListener(new ExceptionPropertyChangeListener());

        try {
            e2.setValue(null);
            fail("Should throw an error");
        } catch (MockError e) {
View Full Code Here

        assertEquals("new java.awt.Color(255,0,0)", e2
                .getJavaInitializationString());
        assertNull(e2.getTags());

        ExceptionPropertyChangeListener listener = new ExceptionPropertyChangeListener();
        e2.addPropertyChangeListener(listener);

        e2.setValue(null);
        assertEquals(Color.RED.getRed(), ((Color) e2.getValue()).getRed());

        try {
View Full Code Here

      // Initialize the editor with the provided default value or null:
      setEditorValue(i, descriptors[i].getValue(DEFAULT));

      // Now subscribe as a listener (we didn't want to receive the event
      // for the setEditorValue above!)
      propertyEditor.addPropertyChangeListener(this);
    }

    // Obtain message formats:
    propertyFieldLabelMessage = new MessageFormat(JMeterUtils.getResString("property_as_field_label"));
    propertyToolTipMessage = new MessageFormat(JMeterUtils.getResString("property_tool_tip"));
View Full Code Here

    System.err.println("Warning: Property \"" + name
           + "\" has non-displayabale editor.  Skipping.");
    continue;
  }
 
  editor.addPropertyChangeListener(this);

      } catch (InvocationTargetException ex) {
  System.err.println("Skipping property " + name
         + " ; exception on target: "
         + ex.getTargetException());
View Full Code Here

        if(editor == null)
            editor = PropertyEditorManager.findEditor(java.lang.String.class);

        // Add a listener to the editor so we know when to update
        // the bean's fields.
        editor.addPropertyChangeListener(_eListener);

//        System.out.println("registered key:" + key + " to editor:"  + editor); // dbg purposes only

        // Map the key to the editor and the editor to the key for quick lookup.
        _key2Editor.put(key, editor);
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.