Package org.lilypondbeans.jccparser

Examples of org.lilypondbeans.jccparser.ASTTime


    public static boolean testLayout(LayoutEnv env, SimpleNode node) {
        if (node.id != ParserTreeConstants.JJTTIME) {
            return false;
        }

        ASTTime time = (ASTTime) node;
        TimeLayout layout = new TimeLayout();
        time.setLayoutObject(layout);
        layout.distanceRight = 20;
        layout.priority = 50;
        env.beamUnit = time.getTimeLen() / 2;
        return true;

    }
View Full Code Here


        return true;

    }

    public void draw(int xpos, int ypos, Graphics g) {
        ASTTime time = (ASTTime) this.parent;
        //  FontMetrics metrics = g.getFontMetrics();
        //hoehe*4//28-16
        int nhoehe = ypos - 8 * 4 + 40 + 8;
        int nbreite = xpos + this.x;
        this.centre = new Point(nbreite,nhoehe);
View Full Code Here

            }
        }
        //time
        Iterator<ASTTime> times = score.getAllTime().iterator();
        while (times.hasNext()) {
            ASTTime time = times.next();
            for (int s = 0; s < linePosition[0].length; s++) {
                Point pt = getPos(time, s + 1);
                //        int ypos = linePosition[0][s].y + top;//-pt.y;
                time.getlayoutObject().draw(pt.x, pt.y, gr);
            }
        }
        //clef
        for (int s = 0; s < score.getAllStaff().size(); s++) {
            Iterator<ASTClef> clefs = score.getAllClef().get(s).iterator();
View Full Code Here

        Entry<Double, Double> key = score.getAllPartial().higherEntry(tz);
        return (key == null) ? -100 : key.getKey();//Value();
    }

    private double nextTimeChange(double tz) {
        ASTTime test = new ASTTime(0);
        test.setBeattime(tz);
        test = score.getAllTime().higher(test);
        return test == null ? -100 : test.getBeattime();
    }
View Full Code Here

        test = score.getAllTime().higher(test);
        return test == null ? -100 : test.getBeattime();
    }

    private ASTTime timeFor(double tz) {
        ASTTime test = new ASTTime(0);
        test.setBeattime(tz);
        ASTTime ret = score.getAllTime().floor(test);
        return ret;
    }
View Full Code Here

        nullBar.barNumber = 0;
        nullBar.setBeattime(0);
        nullBar.generated = true;
        score.getAllBar().add(nullBar);
        while (lastBar < maxTZ) {
            ASTTime test = new ASTTime(ParserTreeConstants.JJTTIME);
            test.setBeattime(lastBar);
            double taktlen = round(timeFor(lastBar).getTimeLen());
            Double partialLen = score.getAllPartial().get(lastBar);
            if (partialLen != null && partialLen < taktlen) {
                taktlen = partialLen;
View Full Code Here

        ASTScore score = (ASTScore) node;
        ScoreLayout layout = new ScoreLayout();
        score.setLayoutObject(layout);
        Iterator<ASTTime> times = score.getAllTime().iterator();
        while (times.hasNext()) {
            ASTTime t = times.next();
            if (t.generated) {
                score.layoutCalculator.calcLayout(env, t);
            }
        }
        //clef is printed in each line
View Full Code Here

TOP

Related Classes of org.lilypondbeans.jccparser.ASTTime

Copyright © 2018 www.massapicom. 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.