Ejemplo n.º 1
0
  /**
   * @param ores
   * @param title
   * @param wControl
   */
  public DTabImpl(
      OLATResourceable ores,
      OLATResourceable initialOres,
      String title,
      WindowControl wOrigControl) {
    this.ores = ores;
    this.initialOres = initialOres;
    this.title = title;
    // Root the JumpInPath - typically all resources are opened in tabs
    StackedBusinessControl businessControl =
        new StackedBusinessControl(null, wOrigControl.getBusinessControl());
    wControl =
        BusinessControlFactory.getInstance()
            .createBusinessWindowControl(businessControl, wOrigControl);

    String typeName = ores.getResourceableTypeName();
    String shortTitle;
    if (title == null) {
      shortTitle = "???";
    } else if (!title.startsWith(I18nManager.IDENT_PREFIX)) {
      // don't truncate titles when in inline translation mode (OLAT-3811)
      shortTitle = Formatter.truncate(title, 15);
    } else {
      shortTitle = title;
    }
    navElement =
        new DefaultNavElement(shortTitle, title, "b_resource_" + typeName.replace(".", "-"));
  }
Ejemplo n.º 2
0
 /** @see java.lang.Object#toString() */
 public String toString() {
   return "ores: "
       + ores.getResourceableTypeName()
       + ","
       + ores.getResourceableId()
       + ", title: "
       + title;
 }