public override void setUp() { // TODO Auto-generated method stub base.setUp(); JDFDoc doc = new JDFDoc("JDF"); JDFNode n = doc.getJDFRoot(); n.setType(EnumType.Imposition); cl = (JDFContentList)n.addResource(ElementName.CONTENTLIST, null); pl = (JDFPageList)n.addResource(ElementName.PAGELIST, null); }
/// /// * <returns> the index of this in the parent contentList, -1 if this is not in /// * a cl </returns> /// public virtual int getIndex() { KElement parent = getParentNode_KElement(); if (parent == null || !(parent is JDFContentList)) { return(-1); } JDFContentList cl = (JDFContentList)parent; int n = 0; JDFContentData cd = cl.getContentData(0); while (cd != null) { if (cd == this) { return(n); } n++; cd = (JDFContentData)cd.getNextSiblingElement(ElementName.CONTENTDATA, null); } return(-1); }