Package java.awt.event

Examples of java.awt.event.ComponentEvent.paramString()


    Button button = new Button();
    ComponentEvent event = new ComponentEvent(button,
                                              ComponentEvent.COMPONENT_MOVED);

    // Check that previous code produced incorrect string representation.
    harness.check(! event.paramString().equalsIgnoreCase(
              "COMPONENT_MOVED java.awt.Rectangle[x=0,y=0,width=0,height=0]"));
   
    // Check that current code produces correct string representation.
    harness.check(event.paramString(), "COMPONENT_MOVED (0,0 0x0)");
   
View Full Code Here


    // Check that previous code produced incorrect string representation.
    harness.check(! event.paramString().equalsIgnoreCase(
              "COMPONENT_MOVED java.awt.Rectangle[x=0,y=0,width=0,height=0]"));
   
    // Check that current code produces correct string representation.
    harness.check(event.paramString(), "COMPONENT_MOVED (0,0 0x0)");
   
    // Check that correct string representation is returned when
    // an invalid event ID is given.
    event = new ComponentEvent(button, ComponentEvent.COMPONENT_MOVED + 1024);
    harness.check(event.paramString(), "unknown type");
View Full Code Here

    harness.check(event.paramString(), "COMPONENT_MOVED (0,0 0x0)");
   
    // Check that correct string representation is returned when
    // an invalid event ID is given.
    event = new ComponentEvent(button, ComponentEvent.COMPONENT_MOVED + 1024);
    harness.check(event.paramString(), "unknown type");
  }

}
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.