Examples of LabelConfigurable


Examples of org.springframework.richclient.core.LabelConfigurable

    this.messageSource = messageSource;
  }

  public Object postProcessAfterInitialization(Object bean, String name) throws BeansException {
    if (bean instanceof LabelConfigurable) {
      LabelConfigurable configurable = (LabelConfigurable) bean;

      try {
        String label = messageSource.getMessage(new DefaultMessageSourceResolvable(name + "." + LABEL_KEY),
            Locale.getDefault());

        if (StringUtils.hasText(label)) {
          configurable.setLabelInfo(LabelInfo.valueOf(label));
        }
      }
      catch (NoSuchMessageException e) {
        throw new BeanInitializationException("Unable to initialize bean " + name, e);
      }
View Full Code Here

Examples of org.springframework.richclient.core.LabelConfigurable

    String message = "bogusLabelInfo";
    LabelInfo expectedLabelInfo = LabelInfo.valueOf(message);

    EasyMock.expect(messageSource.getMessage(messageCode, null, Locale.getDefault())).andReturn(message);

    LabelConfigurable configurable = (LabelConfigurable) EasyMock.createMock(LabelConfigurable.class);
    configurable.setLabelInfo(expectedLabelInfo);

    EasyMock.replay(messageSource);
    EasyMock.replay(configurable);

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

Examples of org.springframework.richclient.core.LabelConfigurable

    String objectName = "bogusLabelable";
    String messageCode = objectName + ".label";

    EasyMock.expect(messageSource.getMessage(messageCode, null, Locale.getDefault())).andReturn(null);

    LabelConfigurable configurable = (LabelConfigurable) EasyMock.createMock(LabelConfigurable.class);

    EasyMock.replay(messageSource);
    EasyMock.replay(configurable);

    configurer.configure(configurable, objectName);
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.