Package org.springframework.richclient.image.config

Examples of org.springframework.richclient.image.config.IconConfigurable


    String iconKey = objectName + ".icon";
    Icon expectedIcon = new TestIcon(Color.GREEN);

    // Create the required mock objects
    IconSource iconSource = (IconSource) EasyMock.createMock(IconSource.class);
    IconConfigurable configurable = (IconConfigurable) EasyMock.createMock(IconConfigurable.class);

    // Create the configurer with the mock icon source
    DefaultApplicationObjectConfigurer configurer = new DefaultApplicationObjectConfigurer(null, null, iconSource,
        null);

    // Set the expectations for the mock objects. For the first run, we
    // don't want the icon
    // source to be able to find the icon, so setIcon should be called with
    // a null value.
    EasyMock.expect(iconSource.getIcon(iconKey)).andReturn(expectedIcon);
    configurable.setIcon(expectedIcon);

    EasyMock.replay(iconSource);
    EasyMock.replay(configurable);

    configurer.configure(configurable, objectName);
View Full Code Here


    String objectName = "undefinedIconConfigurable";
    String iconKey = objectName + ".icon";

    // Create the required mock objects
    IconSource iconSource = (IconSource) EasyMock.createMock(IconSource.class);
    IconConfigurable configurable = (IconConfigurable) EasyMock.createMock(IconConfigurable.class);

    // Create the configurer with the mock icon source
    DefaultApplicationObjectConfigurer configurer = new DefaultApplicationObjectConfigurer(null, null, iconSource,
        null);
View Full Code Here

TOP

Related Classes of org.springframework.richclient.image.config.IconConfigurable

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.