Examples of Transform


Examples of org.apache.xml.security.transforms.Transform

    public String getHTMLRepresentation() throws XMLSignatureException {
        try {
            XMLSignatureInput nodes = this.getNodesetBeforeFirstCanonicalization();

            Transforms transforms = this.getTransforms();
            Transform c14nTransform = null;

            if (transforms != null) {
                for (int i = 0; i < transforms.getLength(); i++) {
                    Transform t = transforms.item(i);
                    String uri = t.getURI();

                    if (uri.equals(Transforms.TRANSFORM_C14N_EXCL_OMIT_COMMENTS)
                        || uri.equals(Transforms.TRANSFORM_C14N_EXCL_WITH_COMMENTS)) {
                        c14nTransform = t;
                        break;
View Full Code Here

Examples of org.apache.xml.security.transforms.Transform

        boolean c14TransformConfirmed = false;
        String c14TransformExpected = sigProps != null ? sigProps.getSignatureC14Transform() : null;
        boolean envelopedConfirmed = false;
        for (int i = 0; i < transforms.getLength(); i++) {
            try {
                Transform tr = transforms.item(i);
                if (Transforms.TRANSFORM_ENVELOPED_SIGNATURE.equals(tr.getURI())) {
                    envelopedConfirmed = true;
                } else if (c14TransformExpected != null && c14TransformExpected.equals(tr.getURI())) {
                    c14TransformConfirmed = true;
                }
            } catch (Exception ex) {
                throwFault("Problem accessing Transform instance", ex);   
            }
View Full Code Here

Examples of org.custommonkey.xmlunit.Transform

    public static Document transform(String testFileName, String styleSheetName) throws TransformerException {
        final InputStream styleSheetResource =
                XmlTestUtilities.class.getResourceAsStream(styleSheetName);
        final InputStream inputResource = XmlTestUtilities.class.getResourceAsStream(testFileName);
        Transform myTransform = new Transform(new InputSource(inputResource),
                new InputSource(styleSheetResource));

        assertNotNull("Can't read the XSL file to use for transform", styleSheetResource);
        assertNotNull("Can't read the XML file to test", inputResource);
        return myTransform.getResultDocument();
    }
View Full Code Here

Examples of org.dspace.identifier.ezid.Transform

            {
                for (Metadatum value : values)
                {
                    String key = datum.getKey();
                    String mappedValue;
                    Transform xfrm = transforms.get(key);
                    if (null != xfrm)
                    {
                        try {
                            mappedValue = xfrm.transform(value.value);
                        } catch (Exception ex) {
                            log.error("Unable to transform '{}' from {} to {}:  {}",
                                    new String[] {
                                        value.value,
                                        value.toString(),
View Full Code Here

Examples of org.eclipse.swt.graphics.Transform

              } catch (Exception ex) {
                // Ignore ERROR_NO_GRAPHICS_LIBRARY error or any others
              }

              try {
                Transform transform = new Transform(e.gc.getDevice());
                transform.rotate(270);
                e.gc.setTransform(transform);

                String s = activeTopBar.getShortTitle();
                Point size = e.gc.textExtent(s);
                e.gc.drawText(s, -size.x, 0, true);
                //e.gc.drawText(s, 0,0, true);
                transform.dispose();
              } catch (Exception ex) {
                // setTransform can trhow a ERROR_NO_GRAPHICS_LIBRARY error
                // no use trying to draw.. it would look weird
              }
              //font.dispose();
View Full Code Here

Examples of org.eclipse.swt.graphics.Transform

            if (i < maxLbl) {
                if (g.getFontMetrics().getHeight() < width
                        && c.getBounds().height
                           > g.getFontMetrics().getAverageCharWidth()
                                * binLabels[i].length()) {
                    Transform tr = new Transform(disp);
                    tr.rotate(-90.0f);
                    g.setTransform(tr);
                    Path p = new Path(disp);
                    p.addString(binLabels[i], -c.getBounds().height + 5,
                            x1 + (int) (0.5 * width) - 10, f);
                    g.fillPath(p);
                    tr.rotate(90.0f);
                    g.setTransform(tr);
                    tr.dispose();
                    p.dispose();
                }
                f.dispose();
            }
        }
View Full Code Here

Examples of org.eclipse.swt.graphics.Transform

            if (i < maxLbl) {
                if (g.getFontMetrics().getHeight() < width
                        && c.getBounds().height
                           > g.getFontMetrics().getAverageCharWidth()
                                * binLabels[i].length()) {
                    Transform tr = new Transform(disp);
                    tr.rotate(-90.0f);
                    g.setTransform(tr);
                    Path p = new Path(disp);
                    p.addString(binLabels[i], -c.getBounds().height + 5,
                            x1 + (int) (0.5 * width) - 10, f);
                    g.fillPath(p);
                    tr.rotate(90.0f);
                    g.setTransform(tr);
                    tr.dispose();
                    p.dispose();
                }
                f.dispose();
            }
        }
View Full Code Here

Examples of org.eclipse.swt.graphics.Transform

            gc.fillRectangle(gc.getClipping());
           
            Point bounds = ((Canvas) e.widget).getSize();
            offsetX = (bounds.x - mapValues.getSize()) / 2;
            offsetY = (bounds.y - mapValues.getSize()) / 2;
            Transform t = new Transform(device);
            t.translate(offsetX, offsetY);
            gc.setTransform(t);
           
            this.paintMap(mapValues, gc);
           
            t.dispose();
            waterColor.dispose();
        }
        catch (Throwable ex) {
            ex.printStackTrace();
        }
View Full Code Here

Examples of org.eclipse.swt.graphics.Transform

                e.x, e.y,
                (e.x + ARROW_WIDTH) / 2, e.y,
                e.x / 2, e.y + ARROW_HEIGHT,
                (e.x - ARROW_WIDTH) / 2, e.y,
                0, e.y };
        Transform save = new Transform(device);
        gc.getTransform(save);
        Transform t = new Transform(device);
        gc.getTransform(t);
        t.translate(location.px - e.x/2, location.py - e.y - ARROW_HEIGHT - GAP);
        gc.setTransform(t);
        gc.fillPolygon(polygon);
        gc.drawPolygon(polygon);
        gc.drawText(name, PADDING_X, PADDING_Y);
        gc.setTransform(save);
        t.dispose();
        save.dispose();

        // TODO learn from class RenameInformationPopup how to open a custom popup, dream on...

    }
View Full Code Here

Examples of org.eclipse.swt.graphics.Transform

    public void paintChild(MapValues map, GC gc, Location each) {
        // draw background
        Device device = gc.getDevice();
       
        // get transform
        Transform save = new Transform(device);
        gc.getTransform(save);
        Transform t = new Transform(device);
        gc.getTransform(t);
       
        // push stack, first translate is applied last
        t.translate(each.px, each.py);
        t.rotate(140);
        t.translate(0, GAP_Y);
        gc.setTransform(t);
       
        gc.fillPath(path);
        gc.drawPath(path);
       
        // restore old transform
        gc.setTransform(save);
        t.dispose();
        save.dispose();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.