Search in sources :

Example 1 with NavLabel

use of org.eclipse.mylyn.docs.epub.ncx.NavLabel in project mylyn.docs by eclipse.

the class TOCGenerator method createNavPoint.

private NavPoint createNavPoint(String title) {
    NavPoint np = NCXFactory.eINSTANCE.createNavPoint();
    NavLabel nl = NCXFactory.eINSTANCE.createNavLabel();
    Content c = NCXFactory.eINSTANCE.createContent();
    // $NON-NLS-1$
    c.setSrc(currentId == null ? currentHref : currentHref + "#" + currentId);
    Text text = NCXFactory.eINSTANCE.createText();
    FeatureMapUtil.addText(text.getMixed(), title);
    nl.setText(text);
    np.getNavLabels().add(nl);
    np.setPlayOrder(++playOrder);
    // $NON-NLS-1$
    np.setId("navpoint" + playOrder);
    np.setContent(c);
    return np;
}
Also used : NavLabel(org.eclipse.mylyn.docs.epub.ncx.NavLabel) NavPoint(org.eclipse.mylyn.docs.epub.ncx.NavPoint) Content(org.eclipse.mylyn.docs.epub.ncx.Content) Text(org.eclipse.mylyn.docs.epub.ncx.Text)

Aggregations

Content (org.eclipse.mylyn.docs.epub.ncx.Content)1 NavLabel (org.eclipse.mylyn.docs.epub.ncx.NavLabel)1 NavPoint (org.eclipse.mylyn.docs.epub.ncx.NavPoint)1 Text (org.eclipse.mylyn.docs.epub.ncx.Text)1