/// /// * <param name="icsLevel"> </param> /// protected internal virtual JDFMedia initPaperMedia() { JDFResourceLink rlM = null; if (thePreviousNode != null) { JDFMedia media = (JDFMedia)thePreviousNode.getResource(ElementName.MEDIA, EnumUsage.Input, 0); if (media != null && !EnumMediaType.Paper.Equals(media.getMediaType())) { media = (JDFMedia)thePreviousNode.getResource(ElementName.MEDIA, EnumUsage.Input, 1); } if (media != null && !EnumMediaType.Paper.Equals(media.getMediaType())) { media = null; } if (media == null) { media = getMediaFromNode(thePreviousNode); if (media == null) { VElement v = thePreviousNode.getPredecessors(true, false); if (v != null) { int siz = v.Count; for (int i = 0; i < siz; i++) { media = getMediaFromNode((JDFNode)v[i]); if (media != null) { break; } } } } } rlM = theNode.linkResource(media, EnumUsage.Input, null); } if (rlM == null && theParentNode != null) { rlM = theNode.linkResource(theParentNode.getResource(ElementName.MEDIA, EnumUsage.Input, 0), EnumUsage.Input, null); } paperMedia = (JDFMedia)theNode.getCreateResource(ElementName.MEDIA, null, 0); paperMedia.setDescriptiveName("the paper to print on"); paperMedia.setResStatus(EnumResStatus.Unavailable, false); paperMedia.setMediaType(EnumMediaType.Paper); paperMedia.setDimensionCM(new JDFXYPair(70, 102)); paperMedia.setWeight(90); paperMedia.setThickness(90 / 0.8); return(paperMedia); }
/// /// * <param name="xm"> /// * @return </param> /// protected internal virtual JDFMedia initPlateMedia() { if (theParentNode != null) { theNode.ensureLink(theParentNode.getResource(ElementName.MEDIA, EnumUsage.Input, 0), EnumUsage.Input, null); } JDFMedia m = (JDFMedia)theNode.getCreateResource(ElementName.MEDIA, EnumUsage.Input, 0); if (EnumMediaType.Paper.Equals(m.getMediaType())) { m = (JDFMedia)theNode.getCreateResource(ElementName.MEDIA, EnumUsage.Input, 1); } m.setResStatus(EnumResStatus.Available, false); m.makeRootResource(null, theNode.getJDFRoot(), true); theNode.getJDFRoot().getCreateResourcePool().moveElement(m, null); m.setDescriptiveName("the plates to use"); m.setMediaType(EnumMediaType.Plate); m.setPartUsage(EnumPartUsage.Implicit); if (bPartitionedPlateMedia && vParts != null) { VJDFAttributeMap vSheets = getReducedMap(new VString("Side Separation PartVersion", null)); for (int i = 0; i < vSheets.Count; i++) { JDFAttributeMap part = new JDFAttributeMap(vSheets[i]); // JDFResource mm= m.getCreatePartition(part, partIDKeys); } } else { m.setDimensionCM(new JDFXYPair(70, 102)); } return(m); }
/// /// <summary> * @return </summary> /// public virtual JDFMedia getPlateMedia() { if (theNode == null) { return(null); } for (int i = 0; i < 10; i++) { JDFMedia plate = (JDFMedia)theNode.getResource(ElementName.MEDIA, EnumUsage.Input, i); if (plate == null) { return(null); } if (EnumMediaType.Plate.Equals(plate.getMediaType())) { return(plate); } } return(null); }
/// /// <summary> * gets the corresponding media with a given mediatype </summary> /// * <param name="mediaType"> the mediaType - must NOT be null </param> /// * <returns> the media, null if none is there or mediaType==null; </returns> /// public virtual JDFMedia getMedia(EnumMediaType mediaType) { if (mediaType == null) { return(null); } VElement v = getChildElementVector(ElementName.MEDIA, null); if (v != null) { int siz = v.Count; for (int i = 0; i < siz; i++) { JDFMedia m = (JDFMedia)v[i]; if (mediaType.Equals(m.getMediaType())) { return(m); } } } return(null); }