Examples of SText


Examples of com.bbn.openmap.layer.specialist.SText

    /**
     * 
     */
    public SText createTextSText(String text, float latitude, float longitude) {
        SText py = new SText();
        py.rType(RenderType.RT_LatLon);
        py.data(text);
        py.ll1(new LLPoint(latitude, longitude));
        return py;
    }
View Full Code Here

Examples of com.bbn.openmap.layer.specialist.SText

        //      MutableInt textType = new MutableInt(-1);
        //      String desc = covtable.getTextDescription(textvec,
        // textType);

        SText py = createTextSText(text, latitude, longitude);
        if (py == null) {
            return;
        }
        //      py.object(new LineComp(desc));

        java.awt.Color tc = (java.awt.Color) drawAtt.getLinePaint();
        if (tc == null)
            tc = java.awt.Color.black;

        py.color(ns(tc));

        //      if (textType.value < 0) {
        //          py.color(textColors[5]);
        //      } else {
        //          py.color(textColors[textType.value % 5]);
View Full Code Here

Examples of org.joshy.sketch.model.SText

    protected void mouseReleased(MouseEvent event, Point2D.Double cursor) {
        startEditing(textNode);
    }

    private void createTextNode(double x, double y) {
        textNode = new SText();
        textNode.setText("");
        textNode.setFillPaint(FlatColor.BLACK);
        textNode.setFontName(Settings.DEFAULT_FONT_NAME);
        textNode.setFontSize(24);
        Point2D.Double point = context.getSketchCanvas().transformToCanvas(x,y);
View Full Code Here

Examples of org.joshy.sketch.model.SText

            context.pageList.listview.setSelectedIndex(doc.getCurrentPageIndex());
        }

        public void insertContents(SketchDocument.SketchPage page) {
            SwitchTheme.PresoThemeAction theme = (SwitchTheme.PresoThemeAction) page.getDocument().getProperties().get("theme");
            SText title = new SText();
            title.setText("Presentation Title");
            title.setFillPaint(FlatColor.BLACK);
            title.setFontName("OpenSans");
            title.setFontSize(70);

            title.setAutoSize(false);
            title.setWidth(600);
            center(title, page);
            title.setStringProperty("text-class","title");
            title.setTranslateY(190);
            theme.styleText(title);
            page.add(title);

            SText subtitle = new SText();
            subtitle.setText("by the author");
            subtitle.setFillPaint(FlatColor.BLACK);
            subtitle.setFontName("OpenSans");
            subtitle.setFontSize(36);
            subtitle.setAutoSize(false);
            subtitle.setWidth(350);
            center(subtitle, page);
            subtitle.setStringProperty("text-class", "subtitle");
            subtitle.setTranslateY(280);
            theme.styleText(subtitle);
            page.add(subtitle);
        }
View Full Code Here

Examples of org.joshy.sketch.model.SText

            insertContents(page);
            context.pageList.listview.setSelectedIndex(doc.getCurrentPageIndex());
        }
        public void insertContents(SketchDocument.SketchPage page) {
            SwitchTheme.PresoThemeAction theme = (SwitchTheme.PresoThemeAction) page.getDocument().getProperties().get("theme");
            SText header = new SText();
            header.setText("A Page Header");
            header.setFillPaint(FlatColor.BLACK);
            header.setTranslateX(50);
            header.setTranslateY(40);
            header.setFontName("OpenSans");
            header.setFontSize(48);
            header.setBulleted(false);
            header.setStringProperty("text-class", "header");
            theme.styleText(header);
            page.add(header);

            SText content = new SText();
            content.setText("my first point\nmy second point\nmy third point\nmy fourth point");
            content.setFillPaint(FlatColor.BLACK);
            content.setTranslateX(70);
            content.setTranslateY(140);
            content.setFontName("OpenSans");
            content.setFontSize(30);
            content.setBulleted(true);
            theme.styleText(content);
            page.add(content);
        }
View Full Code Here

Examples of org.joshy.sketch.model.SText

            doc.getProperties().put("theme",this);

            for(SketchDocument.SketchPage page : doc.getPages()) {
                for(SNode node : page.getNodes()) {
                    if(node instanceof SText) {
                        SText text = (SText) node;
                        styleText(text);
                    }
                }
            }
            if(context != null) {
View Full Code Here

Examples of org.joshy.sketch.model.SText

            }


            for(SNode node : page.getNodes()) {
                if(node instanceof SText) {
                    SText text = (SText) node;
                    if(text.isBulleted()) {
                        String[] lines = text.getText().split("\n");
                        out.start("ul");
                        for(String line : lines) {
                            out.start("li").text(line).end();
                        }
                        out.end();
                        continue;
                    }
                    if("title".equals(text.getStringProperty("text-class"))) {
                        out.start("h1").text(text.getText()).end();
                        continue;
                    }
                    if("subtitle".equals(text.getStringProperty("text-class"))) {
                        out.start("h3").text(text.getText()).end();
                        continue;
                    }
                    if("header".equals(text.getStringProperty("text-class"))) {
                        out.start("h2").text(text.getText()).end();
                        continue;
                    }
                    //do other kinds of text
                    String style = "position: absolute;"
                            +" left:"+(node.getTranslateX()+text.getX())+"px;"
                            +" top:" +(node.getTranslateY()+text.getY())+"px;"
                            +" color:"+toHTMLColor(text.getFillPaint())+";"
                            +" font:"+toHTMLFont(text)+";"
                            ;
                    out.start("p")
                            .attr("style",style)
                            .text(text.getText())
                            .end();
                } else {
                    renderShape(out,node);
                }
            }
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.