Package org.lilypondbeans.jccparser

Examples of org.lilypondbeans.jccparser.SimpleNode


            markFirstPitchBlock();
            return;
        }
        LayoutCalculator calc = UpdateNodeTask.getInstance().getLastScore().layoutCalculator;

        SimpleNode nd = calc.getElementAtPoint(x, y);
        /*    if (nd.id == ParserTreeConstants.JJTCLEF) {
        int line = calc.getLine(nd);
        if (line == 0 && !calc.hasPitches()) {
        markFirstPitchBlock();
        return;
View Full Code Here


    }

    public abstract void draw(int xpos, int ypos, Graphics g);

    public void moveAllXInSameGroup(int greaterThen, int diffx) {
        SimpleNode par = parent.jjtGetParent();
        if (par.id == ParserTreeConstants.JJTCHORD) {
            par = par.jjtGetParent();
        }
        for (int x = 0; x < par.jjtGetNumChildren(); x++) {
            SimpleNode r = par.jjtGetChild(x);
            if (r.getlayoutObject() != null && r.getlayoutObject().x > greaterThen) {
                r.getlayoutObject().x += diffx;
            }
            for (int c = 0; c < r.jjtGetNumChildren(); c++) {
                if (r.jjtGetChild(c).getlayoutObject() != null && r.jjtGetChild(c).getlayoutObject().x > greaterThen) {
                    r.jjtGetChild(c).getlayoutObject().x += diffx;
                }
            }
        }
    }
View Full Code Here

    }
    ActionListener updateListener = null;
    //Parents extrahieren

    void populateParents(LyNode node) {
        SimpleNode sParent = node.getSimpleNode().jjtGetParent();
        if (sParent != null) {
            LyNode.get(sParent).getChildren().getNodesCount();
            populateParents(LyNode.get(sParent));
        }
    }
View Full Code Here

            } catch (Exception ex) {
                //Expand all
                ex.printStackTrace();
            }
        } else {
            SimpleNode node = (SimpleNode) evt.getSource();
            mgr.setRootContext(LyNode.get(node));
        }
    }
View Full Code Here

        Sheet.Set set2 = sheet.createPropertiesSet();
        set2.setDisplayName("Other");
        set2.setName("other");
        set2.setValue("tabName", "Other Tab");
        SimpleNode nd = this.getSimpleNode();

        // Element obj = getLookup().lookup(Element.class);
        // ElementEditor objEditor = ElementEditor.create(obj);
        // objEditor.element = obj;
        try {
View Full Code Here

    }

    protected Node[] createNodes(Object o) {

        SimpleNode obj = (SimpleNode) o;
        //   AbstractNode result = new AbstractNode (new MyChildren(), Lookups.singleton(obj));
        //   result.setDisplayName (obj.toString());
        return new Node[]{LyNode.get(obj)};

    }
View Full Code Here

                        AffineTransform.getTranslateInstance(point.getLocation().getX(),
                        point.getLocation().getY()),
                        null);
                LayoutCalculator calc = UpdateNodeTask.getInstance().getLastScore().layoutCalculator;

                SimpleNode nd = calc.getElementAtPoint(point.x, point.y);
                current = nd;
                updateView();
                // NetbeansTextEditor.getInstance().selectPosition(nd);
                return ConnectorState.ACCEPT;
            }

            public void accept(Widget widget, Point point, Transferable transferable) {
                Image image = getImageFromTransferable(transferable);
                try {
                    Object o = null;
                    PaletteItem pal = (PaletteItem) transferable.getTransferData(ActiveEditorDrop.FLAVOR);
                    LayoutCalculator calc = UpdateNodeTask.getInstance().getLastScore().layoutCalculator;
                    SimpleNode el = calc.getElementAtPoint(point.x, point.y);

                    if (el == null) {
                        return;
                    }
View Full Code Here

    private Point getPos(SimpleNode node, int staffNumber) {
        int xpos = left;
        int ypos = top;
        int line = 0;
       // System.out.println(ypos);
        SimpleNode lastLineBreak = score.getAllBreaks().floor(node);
        if (lastLineBreak != null) {
            line = lastLineBreak.keySignature;
            xpos = xpos - lastLineBreak.getlayoutObject().x;
        }
        ypos = ypos + linePosition[line][staffNumber - 1].y;
        return new Point(xpos, ypos);
    }
View Full Code Here

        return getPos(node, staff == null ? 1 : staff.number);
    }

    public int getLine(SimpleNode node) {
        SimpleNode lastLineBreak = score.getAllBreaks().floor(node);
        return lastLineBreak == null ? 1 : lastLineBreak.keySignature + 1;
    }
View Full Code Here

        int linex = 0;
        pageWidth = 0;
        //      int liney = 0;
        for (int l = 0; l < linePosition.length; l++) {
            if (l > 0) {//
                SimpleNode n = it.next();
                linex = n.getlayoutObject().x;
            }
            if (linex - lastLineX > pageWidth) {
                pageWidth = linex - lastLineX;
            }
            lastLineX = linex;
View Full Code Here

TOP

Related Classes of org.lilypondbeans.jccparser.SimpleNode

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.