Package org.springframework.richclient.command.config

Examples of org.springframework.richclient.command.config.CommandButtonLabelInfo


    Assert.required(objectName, "objectName");

    String labelStr = loadMessage(objectName + "." + LABEL_KEY);

    if (StringUtils.hasText(labelStr)) {
      CommandButtonLabelInfo labelInfo = CommandButtonLabelInfo.valueOf(labelStr);
      configurable.setLabelInfo(labelInfo);
    }
  }
View Full Code Here


    assertEquals("displayName", support.getDisplayName());

    support.setTitle("title");
    assertEquals("title", support.getDisplayName());

    support.setLabelInfo(new CommandButtonLabelInfo("label info"));
    assertEquals("title", support.getDisplayName());

    support.setTitle(null);
    assertEquals("label info", support.getDisplayName());
  }
View Full Code Here

  }

  public void testSetLabelInfo() {
    LabeledObjectSupport support = new LabeledObjectSupport();

    CommandButtonLabelInfo labelInfo = CommandButtonLabelInfo.valueOf("&Save@control S");

    PropertyChangeListener mockPropertyChangeListener = (PropertyChangeListener) EasyMock
        .createMock(PropertyChangeListener.class);

    mockPropertyChangeListener.propertyChange(eqPropertyChangeEvent(new PropertyChangeEvent(support,
View Full Code Here

    DefaultApplicationObjectConfigurer configurer = new DefaultApplicationObjectConfigurer(messageSource);

    String objectName = "bogusLabelable";
    String messageCode = objectName + ".label";
    String message = "bogusLabelInfo";
    CommandButtonLabelInfo expectedLabelInfo = CommandButtonLabelInfo.valueOf(message);

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

    CommandLabelConfigurable configurable = (CommandLabelConfigurable) EasyMock
        .createMock(CommandLabelConfigurable.class);
View Full Code Here

    public ActionCommand createShowViewCommand(ApplicationWindow window) {
        return new ShowViewCommand(this, window);
    }

    public CommandButtonLabelInfo getShowViewCommandLabel() {
        return new CommandButtonLabelInfo(getDisplayName());
    }
View Full Code Here

TOP

Related Classes of org.springframework.richclient.command.config.CommandButtonLabelInfo

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.