Examples of TextLine


Examples of cascading.scheme.local.TextLine

        pipe = new GroupBy(pipe);
        pipe = new Every(pipe, new Count());

        // print out
        // print out
        Tap out = new OutputStreamTap(new TextLine(), OUT);
        Properties cfg = cfg();
        cfg.setProperty("es.mapping.names", "url:address");
        build(cfg, in, out, pipe);
    }
View Full Code Here

Examples of cascading.scheme.local.TextLine

    private void build(Properties props, Tap in, Tap out, Pipe pipe) {
        StatsUtils.proxy(new LocalFlowConnector(props).connect(in, out, pipe)).complete();
    }

    private Tap sourceTap() {
        return new FileTap(new TextLine(new Fields("line")), TestUtils.sampleArtistsJson());
    }
View Full Code Here

Examples of cascading.scheme.local.TextLine

        //pipe = new Each(pipe, new Fields("name"), AssertionLevel.STRICT, new AssertNotNull());
        pipe = new GroupBy(pipe);
        pipe = new Every(pipe, new Count());

        // print out
        Tap out = new OutputStreamTap(new TextLine(), OUT);
        build(cfg(), in, out, pipe);
    }
View Full Code Here

Examples of cascading.scheme.local.TextLine

        Pipe pipe = new Pipe("copy");
        pipe = new Each(pipe, new FilterNotNull());
        pipe = new Each(pipe, AssertionLevel.STRICT, new AssertSizeLessThan(2));

        // print out
        Tap out = new OutputStreamTap(new TextLine(), OUT);
        build(cfg, in, out, pipe);
    }
View Full Code Here

Examples of cascading.scheme.local.TextLine

            pipe = new Each(pipe, new UrlLengthener(fetcher));
            pipe = new Each(pipe, new Debug());

            BixoPlatform platform = new BixoPlatform(LengthenUrlsTool.class, Platform.Local);
            BasePath filePath = platform.makePath(filename);
            TextLine textLineLocalScheme = new TextLine(new Fields("url"));
            Tap sourceTap = platform.makeTap(textLineLocalScheme, filePath, SinkMode.KEEP);
            SinkTap sinkTap = new NullSinkTap(new Fields("url"));
           
            FlowConnector flowConnector = platform.makeFlowConnector();
            Flow flow = flowConnector.connect(sourceTap, sinkTap, pipe);
View Full Code Here

Examples of com.socialnetworkshirts.twittershirts.renderer.model.TextLine

        String fontFamily = text.getFontFamily();
        int fontSize = (int) text.getFontSize();
        Font font = new Font(fontFamily, Font.PLAIN, fontSize);
        FontMetrics fm = g.getFontMetrics(font);
        Point2D currentPosition = new Point2D.Double(renderArea.getX(), renderArea.getY());
        TextLine textLine = null;
        double minPadding = fm.getHeight();

        try {
            for (int i = 0; i < tags.size(); i++) {
                Tag tag = tags.get(i);
                String value = tag.getValue();
                Rectangle2D rect = fm.getStringBounds(value, g);
                // create new textline if not exists
                if (i == 0) {
                    textLine = new TextLine();
                    textLines.add(textLine);
                }
                if (currentPosition.getX() + rect.getWidth() + minPadding >= (renderArea.getX() + renderArea.getWidth())) {
                    currentPosition.setLocation(renderArea.getX(),
                            currentPosition.getY() + fm.getHeight() * 1.2);
                    if ((currentPosition.getY() + fm.getHeight()) >= (renderArea.getY() + renderArea.getHeight()))
                        break;
                    textLine = new TextLine();
                    textLines.add(textLine);
                }
                TSpan tspan = new TSpan(currentPosition.getX(),
                        currentPosition.getY() + Math.abs(rect.getY()),
                        rect.getWidth(),
                        rect.getHeight(),
                        fontFamily, fontSize, value);
                currentPosition.setLocation(currentPosition.getX() + rect.getWidth() + minPadding,
                        currentPosition.getY());
                textLine.getTspans().add(tspan);
                text.getTspans().add(tspan);
            }

            for (TextLine line : textLines) {
                if (line.getTspans().size() > 1) {
View Full Code Here

Examples of org.jfree.chart.text.TextLine

                                    RectangleEdge edge, Graphics2D g2) {
        TextBlock label = super.createLabel(category, width, edge, g2);
        String s = this.sublabels.get(category);
        if (s != null) {
            if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) {
                TextLine line = new TextLine(s, this.sublabelFont,
                        this.sublabelPaint);
                label.addLine(line);
            }
            else if (edge == RectangleEdge.LEFT
                    || edge == RectangleEdge.RIGHT) {
                TextLine line = label.getLastLine();
                if (line != null) {
                    line.addFragment(new TextFragment("  " + s,
                            this.sublabelFont, this.sublabelPaint));
                }
            }
        }
        return label;
View Full Code Here

Examples of org.jfree.text.TextLine

                                    RectangleEdge edge, Graphics2D g2) {
        TextBlock label = super.createLabel(category, width, edge, g2);
        String s = (String) this.sublabels.get(category);
        if (s != null) {
            if (edge == RectangleEdge.TOP || edge == RectangleEdge.BOTTOM) {
                TextLine line = new TextLine(s, this.sublabelFont,
                        this.sublabelPaint);
                label.addLine(line);
            }
            else if (edge == RectangleEdge.LEFT
                    || edge == RectangleEdge.RIGHT) {
                TextLine line = label.getLastLine();
                if (line != null) {
                    line.addFragment(new TextFragment("  " + s,
                            this.sublabelFont, this.sublabelPaint));
                }
            }
        }
        return label;
View Full Code Here

Examples of org.jfree.text.TextLine

    public void testEquals() {

        Comparable c1 = "C1";
        Comparable c2 = "C2";
        TextBlock tb1 = new TextBlock();
        tb1.addLine(new TextLine("Block 1"));
        TextBlock tb2 = new TextBlock();
        tb1.addLine(new TextLine("Block 2"));
        TextBlockAnchor tba1 = TextBlockAnchor.CENTER;
        TextBlockAnchor tba2 = TextBlockAnchor.BOTTOM_CENTER;
        TextAnchor ta1 = TextAnchor.CENTER;
        TextAnchor ta2 = TextAnchor.BASELINE_LEFT;
View Full Code Here

Examples of org.jfree.text.TextLine

     * Two objects that are equal are required to return the same hashCode.
     */
    public void testHashCode() {
        Comparable c1 = "C1";
        TextBlock tb1 = new TextBlock();
        tb1.addLine(new TextLine("Block 1"));
        tb1.addLine(new TextLine("Block 2"));
        TextBlockAnchor tba1 = TextBlockAnchor.CENTER;
        TextAnchor ta1 = TextAnchor.CENTER;

        CategoryTick t1 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f);
        CategoryTick t2 = new CategoryTick(c1, tb1, tba1, ta1, 1.0f);
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.