예제 #1
0
        ///
        ///     <summary> * Get all SignatureCell from the current element
        ///     *  </summary>
        ///     * <returns> Collection<JDFSignatureCell> </returns>
        ///
        public virtual ICollection <JDFSignatureCell> getAllSignatureCell()
        {
            List <JDFSignatureCell> v = new List <JDFSignatureCell>();

            JDFSignatureCell kElem = (JDFSignatureCell)getFirstChildElement(ElementName.SIGNATURECELL, null);

            while (kElem != null)
            {
                v.Add(kElem);

                kElem = (JDFSignatureCell)kElem.getNextSiblingElement(ElementName.SIGNATURECELL, null);
            }

            return(v);
        }
예제 #2
0
        public virtual void testDieLayoutStrip()
        {
            JDFBinderySignature bs = stripParams.appendBinderySignature();

            bs.setBinderySignatureType(EnumBinderySignatureType.Die);
            JDFDieLayout dl = bs.appendDieLayout();
            JDFStation   s  = dl.appendStation();

            s.setStationAmount(12);
            s.setStationName("MyStation");
            JDFSignatureCell[] scs = new JDFSignatureCell[3];
            JDFPreview         pv0 = (JDFPreview)n.addResource(ElementName.PREVIEW, null, null, null, null, null, null);

            string[] index = { "0 ~ 2", "3 ~ 8", "9 ~ 11" };
            for (int i = 0; i < 3; i++)
            {
                JDFSignatureCell sc = scs[i] = bs.appendSignatureCell();
                sc.setStationName("MyStation");
                JDFPreview pv = (JDFPreview)pv0.addPartition(EnumPartIDKey.CellIndex, index[i]);
                pv.setURL("file://foo" + i + ".vrml");
                pv.setAttribute("PreviewFileType", "VRML");
                pv.setAttribute("PreviewUsage", "Animation");
                sc.refElement(pv);
            }

            scs[0].setXMLComment("This represents 3 times pageList 0");
            scs[0].setDescriptiveName("Strawberry lid");
            scs[0].setFrontPages(new JDFIntegerList("0 0 0"));

            scs[1].setFrontPages(new JDFIntegerList("1 1 1 1 1 1"));
            scs[1].setXMLComment("This represents 6 times pageList 1");
            scs[1].setDescriptiveName("Raspberry lid");

            scs[2].setFrontPages(new JDFIntegerList("2 2 2"));
            scs[2].setXMLComment("This represents 3 times pageList 2");
            scs[2].setDescriptiveName("Blueberry lid");

            d.write2File(sm_dirTestDataTemp + "DieStationStrip.jdf", 2, false);
        }
예제 #3
0
        public virtual void testFoldOut()
        {
            // 0=1.3; 2=1.4
            for (int i = 0; i < 3; i++)
            {
                if (i == 1)
                {
                    continue; // rejected by wg
                }
                reSetUp();
                n.setXMLComment("Stripping Foldout example corresponding to spec example n.6.5 - verion: " + ((i == 0) ? "multi-Cell" : ((i == 1) ? "new attribute FoldOutTrimSize" : "new attribute FaceCells (Accepted for 1.4)")));
                rl.setNPage(6);
                sp.setResStatus(EnumResStatus.Available, true);
                bs.setResStatus(EnumResStatus.Available, true);
                JDFSignatureCell sc = bs.appendSignatureCell();
                sc.setXMLComment("this is the foldout foldout cell");
                sc.setFrontPages(new JDFIntegerList("4"));
                sc.setBackPages(new JDFIntegerList("3"));
                if (i == 0 || i == 2)
                {
                    sc = bs.appendSignatureCell();
                    string xmlComment = "this cell is the inner page of the foldout, i.e. the page that is attached to the spine";
                    sc.setFrontPages(new JDFIntegerList("5"));
                    sc.setBackPages(new JDFIntegerList("2"));
                    if (i == 0)
                    {
                        sc.setFrontFacePages(new JDFIntegerList("4"));
                        sc.setBackFacePages(new JDFIntegerList("3"));
                    }
                    else
                    {
                        xmlComment += "\nThe new attribute FaceCells refers to the cell(s) that describe the foldout; in this case the cell to the left.";
                        xmlComment += "\nThe front and back pages of the foldout are listed in the respective cell(s)";
                        sc.setAttribute("FaceCells", "0");
                    }
                    sc.setXMLComment(xmlComment);
                }

                sc = bs.appendSignatureCell();
                sc.setXMLComment("this is the cell that has no foldout");
                sc.setFrontPages(new JDFIntegerList("0"));
                sc.setBackPages(new JDFIntegerList("1"));

                JDFStrippingParams sp1 = (JDFStrippingParams)sp.addPartition(EnumPartIDKey.CellIndex, "0");
                JDFStripCellParams scp = sp1.appendStripCellParams();
                scp.setTrimSize(new JDFXYPair(200 + (i % 2) * 300, 400));
                if (i != 1)
                {
                    scp.setXMLComment("stripcell for the folded out foldout(front page=4)");
                }
                else
                {
                    scp.setXMLComment("stripcell for the entire foldout(front page=4, foldout page =5)\nthe TrimSize applies to the entire foldout spread (page 4 and 5)\n note the new FoldoutTrimSize attribute");
                }

                if (i != 1)
                {
                    sp1 = (JDFStrippingParams)sp.addPartition(EnumPartIDKey.CellIndex, "1");
                    scp = sp1.appendStripCellParams();
                    scp.setTrimSize(new JDFXYPair(300, 400));
                    scp.setXMLComment("stripcell for the inner page of the foldout foldout(front page=5)");
                }
                else
                {
                    scp.setAttribute("FoldoutTrimSize", "200 400");
                }

                sp1 = (JDFStrippingParams)sp.addPartition(EnumPartIDKey.CellIndex, i != 1 ? "2" : "1");
                scp = sp1.appendStripCellParams();
                scp.setTrimSize(new JDFXYPair(320, 400));
                scp.setXMLComment("stripcell for the inner page of the foldout foldout(front page=0)");

                doc.write2File(sm_dirTestDataTemp + "foldoutStrip" + i + ".jdf", 2, false);
            }
        }