Package org.olat.core.gui.translator

Examples of org.olat.core.gui.translator.PackageTranslator


   * @param cel
   * @param userObject
   * @return the controller
   */
  public static DialogController createYesNoDialogController(Locale locale, String text, ControllerEventListener cel, Object userObject) {
    Translator intTrans = new PackageTranslator(PACKAGE, locale);
    DialogController dc = new DialogController(locale, intTrans.translate("answer.yes"), intTrans.translate("answer.no"), text, userObject, true, null);
    // when used with basic controller listener has to be set with listenTo()
    if (cel != null) dc.addControllerListener(cel);
    return dc;
  }
View Full Code Here


   * @param text
   * @param cel
   * @return the controller
   */
  public static DialogController createOkCancelDialogController(Locale locale, String text, ControllerEventListener cel) {
    Translator intTrans = new PackageTranslator(PACKAGE, locale);
    DialogController dc = new DialogController(locale, intTrans.translate("answer.ok"), intTrans.translate("answer.cancel"), text);
    // when used with basic controller listener has to be set with listenTo()   
    if (cel != null) dc.addControllerListener(cel);
    return dc;
  }
View Full Code Here

   *          been answered by the user (convenience)
   */
  public DialogController(Locale locale, String firstButtonText, String secondButtonText, String text, Object userObject, boolean displayCloseIcon, String title) {
    super(null);
    this.userObject = userObject;
    myContent = new VelocityContainer("genericdialog", VELOCITY_ROOT + "/index.html", new PackageTranslator(PACKAGE, locale), this);
   
    firstButton = LinkFactory.createCustomLink("firstButton", "fb", firstButtonText, Link.BUTTON + Link.NONTRANSLATED, myContent, this);
    secondButton = LinkFactory.createCustomLink("secondButton", "sb", secondButtonText, Link.BUTTON + Link.NONTRANSLATED, myContent, this);
    if (displayCloseIcon){
      backIcon = LinkFactory.createIconClose("close", myContent, this);
View Full Code Here

  /**
   * @param name
   */
  public SelectionTree(String name, Translator translator ) {
    super(name, new PackageTranslator(PACKAGE, translator.getLocale(), translator));
  }
View Full Code Here

   * Constructor
   */
  public CustomLinkChooserController(UserRequest ureq, WindowControl wControl, CustomLinkTreeModel customLinkTreeModel) {
    super(wControl);

    trans = new PackageTranslator(PACKAGE, ureq.getLocale());

    mainVC = new VelocityContainer("mainVC", VELOCITY_ROOT + "/internallinkchooser.html", trans, this);

    this.customLinkTreeModel = customLinkTreeModel;
    boolean ajax = getWindowControl().getWindowBackOffice().getWindowManager().isAjaxEnabled();
View Full Code Here

    }
    // set the formtranslator, and parent
    Translator itemTranslator = formComp.getTranslator();
    if(formComp.getTranslator()!=null && itemTranslator instanceof PackageTranslator){
      //let the FormItem provide a more specialized translator
      PackageTranslator itemPt = (PackageTranslator)itemTranslator;
      itemTranslator = itemPt.cascadeTranslators(itemPt, translator);
    }else{
      itemTranslator = translator;
    }
    formComp.setTranslator(itemTranslator);
    formComp.setRootForm(getRootForm());
View Full Code Here

    }
    // set the formtranslator, and parent
    Translator itemTranslator = formComp.getTranslator();
    if(formComp.getTranslator()!=null && itemTranslator instanceof PackageTranslator){
      //let the FormItem provide a more specialized translator
      PackageTranslator itemPt = (PackageTranslator)itemTranslator;
      itemTranslator = itemPt.cascadeTranslators(itemPt, translator);
    }else{
      itemTranslator = translator;
    }
    formComp.setTranslator(itemTranslator);
    formComp.setRootForm(getRootForm());
View Full Code Here

   
  // set the formtranslator, and parent
    Translator itemTranslator = with.getTranslator();
    if(with.getTranslator()!=null && itemTranslator instanceof PackageTranslator){
      //let the FormItem provide a more specialized translator
      PackageTranslator itemPt = (PackageTranslator)itemTranslator;
      itemTranslator = itemPt.cascadeTranslators(itemPt, translator);
    }else{
      itemTranslator = translator;
    }
    with.setTranslator(itemTranslator);
    with.setRootForm(getRootForm());
View Full Code Here

    if (tableEventListener != null) addControllerListener(tableEventListener);

    // FIXME fj: the other way round: allow table translator to override package
    // translator!
    this.trans = new PackageTranslator(PACKAGE, ureq.getLocale(), tableTrans);

    this.table = new Table("table", trans);
    this.table.addListener(this);

    // propagate table specific configuration to table,
View Full Code Here

    this.portalColumns = portalColumns;
    this.portletsConfigurations = portletsConfigurations;   
    this.portletContainers = new HashMap<String, PortletContainer>();
    this.inactivePortlets = new ArrayList<String>();

    this.trans = new PackageTranslator(Util.getPackageName(PortalImpl.class), ureq.getLocale());
    this.portalVC = new VelocityContainer("portalVC", VELOCITY_ROOT + "/portal.html", trans, this);    // initialize arrays

    // calculate the column css classes based on YAML schema
    int cols = portalColumns.size();
    List<String> columnCssClassWrapper = new ArrayList(cols);
View Full Code Here

TOP

Related Classes of org.olat.core.gui.translator.PackageTranslator

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.