Package org.antlr.works.visualization.graphics

Examples of org.antlr.works.visualization.graphics.GContext.drawLine()


        context.setColor(context.linkColor);

        if(link.transition.isEpsilon()) {
            if(link.virtualPosition != null) {
                drawDownSloop(context, link, sx, sy, sx+sloopBaseWidth, link.getVirtualY());
                context.drawLine(sx+sloopBaseWidth, link.getVirtualY(), tx-sloopBaseWidth, link.getVirtualY());
                drawUpSloop(context, link, tx-sloopBaseWidth, link.getVirtualY(), tx, ty);
            } else if(sy > ty) {
                // Draw link upward
                if((tx-sx>sloopBaseWidth) && sloopBaseWidth>0) {
                    context.drawLine(sx, sy, tx-sloopBaseWidth, sy);
View Full Code Here


                context.drawLine(sx+sloopBaseWidth, link.getVirtualY(), tx-sloopBaseWidth, link.getVirtualY());
                drawUpSloop(context, link, tx-sloopBaseWidth, link.getVirtualY(), tx, ty);
            } else if(sy > ty) {
                // Draw link upward
                if((tx-sx>sloopBaseWidth) && sloopBaseWidth>0) {
                    context.drawLine(sx, sy, tx-sloopBaseWidth, sy);
                    drawUpSloop(context, link, tx-sloopBaseWidth, sy, tx, ty);
                } else
                    drawUpSloop(context, link, sx, sy, tx, ty);
            } else if(ty > sy) {
                // Draw link downward
View Full Code Here

            } else if(ty > sy) {
                // Draw link downward
                drawDownSloop(context, link, sx, sy, tx, ty);
            } else {
                // Single horizontal link
                context.drawLine(sx, sy, tx, ty);

                // Draw an arrow if the link's target is the last node of the rule
                if(link.target.lastNodeOfRule)
                    context.drawRightArrow(tx, ty, context.getPixelArrowWidth(), context.getPixelArrowHeight());
            }
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.