Package org.lilypondbeans.jccparser

Examples of org.lilypondbeans.jccparser.ASTClef


        }
        //clef
        for (int s = 0; s < score.getAllStaff().size(); s++) {
            Iterator<ASTClef> clefs = score.getAllClef().get(s).iterator();
            while (clefs.hasNext()) {
                ASTClef cl = clefs.next();
                Point pt = getPos(cl, s + 1);
                if (cl.getlayoutObject() != null)//default clef
                {
                    cl.getlayoutObject().draw(pt.x, pt.y, gr);
                }
            }
        }
        //key
        for (int s = 0; s < score.getAllKeys().size(); s++) {
            Iterator<ASTKey> keys = score.getAllKeys().get(s).iterator();
            while (keys.hasNext()) {
                ASTKey cl = keys.next();
                Point pt = getPos(cl, s + 1);
                cl.getlayoutObject().draw(pt.x, pt.y, gr);
            }
        }
        //lineBegin
        for (int s = 0; s < allLineBegins.size(); s++) {

            ASTLineBegin cl = allLineBegins.get(s);
            Point pt = getPos(cl);//, cl.getParentContext().getContext(ASTContext.TYPE_STAFF)s + 1);
            cl.getlayoutObject().draw(pt.x, pt.y, gr);
        }
    }
View Full Code Here


    }

    private void generateNodesForBreak(double beatTime, boolean onlyLineBegin) {
        for (int s = 0; s < score.getAllStaff().size(); s++) {
            //clef for each line
            ASTClef clef = new ASTClef(ParserTreeConstants.JJTCLEF);//violin
            clef.setBeattime(beatTime);
            ASTClef cur = score.getAllClef().get(s).floor(clef);
            if (!onlyLineBegin) {
                clef.clef = cur.clef;
                clef.generated = true;
                clef.setParentContext(score.getAllStaff().get(s));
                score.registerClef(clef, score.getAllStaff().get(s));
View Full Code Here

        }
        //clef is printed in each line
        for (int s = 0; s < score.getAllClef().size(); s++) {
            Iterator<ASTClef> clefs = score.getAllClef().get(s).iterator();
            while (clefs.hasNext()) {
                ASTClef t = clefs.next();
                if (t.generated) {
                    score.layoutCalculator.calcLayout(env, t);
                }
            }
        }
View Full Code Here

    public static boolean testLayout(LayoutEnv env, SimpleNode node) {
        if (node.id != ParserTreeConstants.JJTCLEF) {
            return false;
        }
        ASTClef clef = (ASTClef) node;
        ClefLayout layout = new ClefLayout();
        clef.setLayoutObject(layout);
        layout.distanceRight = 30;
        layout.priority = 90;
        return true;

    }
View Full Code Here

            g.setFont(org);
        }


        centre = new Point(xpos + x, ypos + 24);
        ASTClef clef = (ASTClef) parent;
        int mainClef = 100 * (clef.clef / 100) + 50;

        if (mainClef == ASTClef.TYPE_TREBLE) {
            g.drawString("\ue197", xpos + x, ypos + 24);
        } else if (mainClef == ASTClef.TYPE_BASS) {
View Full Code Here

TOP

Related Classes of org.lilypondbeans.jccparser.ASTClef

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.