Examples of TextComponent


Examples of org.olat.core.gui.components.text.TextComponent

    this.userCommentDisplayVC.contextPut("formatter", Formatter.getInstance(getLocale()));
    this.userCommentDisplayVC.contextPut("securityCallback", securityCallback);
    this.userCommentDisplayVC.contextPut("comment", userComment);
    // Creator information
    User user = userComment.getCreator().getUser();
    TextComponent creator = TextFactory.createTextComponentFromI18nKey("creator", null, null, null, true, userCommentDisplayVC);
    creator.setText(translate("comments.comment.creator", new String[]{user.getProperty(UserConstants.FIRSTNAME, null), user.getProperty(UserConstants.LASTNAME, null)}));
    // Portrait
    if (CoreSpringFactory.containsBean(UserAvatarDisplayControllerCreator.class.getName())) {
      UserAvatarDisplayControllerCreator avatarControllerCreator = (UserAvatarDisplayControllerCreator) CoreSpringFactory.getBean(UserAvatarDisplayControllerCreator.class);
      Controller avatarCtr = avatarControllerCreator.createController(ureq, getWindowControl(), userComment.getCreator(), false, true);
      listenTo(avatarCtr);
View Full Code Here

Examples of vg.modules.notepad.components.textComponent.TextComponent

    // good
    this.setVisible(false);
  }
  private ITextComponent open(File input) {
    //to erase any text in the text area before adding new text
    ITextComponent textComponent = new TextComponent();
    StringBuffer str = new StringBuffer(1024*4);
    Reader in = null;
    try{
      //to read the selected file
      in = new FileReader(input);
      //100000 is the max. char can be written in the text area
      char[] buff = new char[100000];
      int nch;
      while((nch = in.read(buff, 0, buff.length)) != -1) {
        str.append(new String(buff, 0, nch));
      }
      textComponent.setText(str.toString());
      return(textComponent);
    } catch(Exception ex){
      VisualGraph.log.printException(ex);
    } finally {
      if(in != null) {
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.