public class Visitor extends xDotBaseVisitor<java.lang.Object>
Modifier and Type | Class and Description |
---|---|
static class |
Visitor.Type |
Modifier and Type | Field and Description |
---|---|
protected Glyph |
base |
protected java.awt.geom.Rectangle2D |
bounds |
protected java.awt.geom.Point2D[] |
coordinates |
protected java.util.ArrayList<Glyphish> |
glyphs |
protected Spline |
spline |
protected java.lang.String |
style |
Constructor and Description |
---|
Visitor(IOPGraph graph,
Visitor.Type type,
int graphHeight) |
Visitor(Visitor.Type type,
int graphHeight) |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |
static xDotParser |
parseString(java.lang.String string) |
static void |
test(xDotParser parser) |
static void |
testFromFile(java.lang.String filename) |
static void |
testFromString(java.lang.String string) |
java.lang.Integer |
visitAlignment(xDotParser.AlignmentContext ctx)
Visit a parse tree produced by
xDotParser.alignment() . |
java.util.ArrayList<Glyphish> |
visitAttributes(xDotParser.AttributesContext ctx)
Visit a parse tree produced by
xDotParser.attributes() . |
Glyph |
visitBezel(java.awt.Point[] points,
java.awt.Color fill) |
Glyph |
visitBezelFilled(xDotParser.BezelFilledContext ctx)
Visit a parse tree produced by the
bezelFilled
labeled alternative in xDotParser.attribute() . |
Glyphish |
visitBezelUnfilled(xDotParser.BezelUnfilledContext ctx)
Visit a parse tree produced by the
bezelUnfilled
labeled alternative in xDotParser.attribute() . |
java.lang.String |
visitBytes(xDotParser.BytesContext ctx)
Visit a parse tree produced by
xDotParser.bytes() . |
java.lang.String |
visitCharElement(xDotParser.CharElementContext ctx)
Visit a parse tree produced by
xDotParser.charElement() . |
java.lang.String |
visitCharSequence(xDotParser.CharSequenceContext ctx)
Visit a parse tree produced by
xDotParser.charSequence(int) . |
Glyph |
visitEllipseFilled(xDotParser.EllipseFilledContext ctx)
Visit a parse tree produced by the
ellipseFilled
labeled alternative in xDotParser.attribute() . |
Glyph |
visitEllipseUnfilled(xDotParser.EllipseUnfilledContext ctx)
Visit a parse tree produced by the
ellipseUnfilled
labeled alternative in xDotParser.attribute() . |
java.awt.Color |
visitFillColor(xDotParser.FillColorContext ctx)
Visit a parse tree produced by the
fillColor
labeled alternative in xDotParser.attribute() . |
java.lang.String |
visitFont(xDotParser.FontContext ctx)
Visit a parse tree produced by the
font
labeled alternative in xDotParser.attribute() . |
java.lang.Integer |
visitFontsize(xDotParser.FontsizeContext ctx)
Visit a parse tree produced by
xDotParser.fontsize() . |
java.lang.Integer |
visitHeight(xDotParser.HeightContext ctx)
Visit a parse tree produced by
xDotParser.height() . |
ImageGlyph |
visitImage(xDotParser.ImageContext ctx)
Visit a parse tree produced by the
image
labeled alternative in xDotParser.attribute() . |
java.lang.Integer |
visitInteger(xDotParser.IntegerContext ctx)
Visit a parse tree produced by
xDotParser.integer() . |
java.lang.Integer |
visitNumber(xDotParser.NumberContext ctx)
Visit a parse tree produced by
xDotParser.number() . |
java.awt.Color |
visitPenColor(xDotParser.PenColorContext ctx)
Visit a parse tree produced by the
penColor
labeled alternative in xDotParser.attribute() . |
java.awt.Point |
visitPoint(xDotParser.PointContext ctx)
Visit a parse tree produced by
xDotParser.point() . |
java.awt.Point[] |
visitPoints(xDotParser.PointsContext ctx)
Visit a parse tree produced by
xDotParser.points() . |
java.awt.Point[] |
visitPointSequence(xDotParser.PointSequenceContext ctx)
Visit a parse tree produced by
xDotParser.pointSequence(int) . |
Glyph |
visitPolygonFilled(xDotParser.PolygonFilledContext ctx)
Visit a parse tree produced by the
polygonFilled
labeled alternative in xDotParser.attribute() . |
Glyph |
visitPolygonUnfilled(xDotParser.PolygonUnfilledContext ctx)
Visit a parse tree produced by the
polygonUnfilled
labeled alternative in xDotParser.attribute() . |
Glyph |
visitPolyline(xDotParser.PolylineContext ctx)
Visit a parse tree produced by the
polyline
labeled alternative in xDotParser.attribute() . |
java.lang.String |
visitStyle(xDotParser.StyleContext ctx)
Visit a parse tree produced by the
style
labeled alternative in xDotParser.attribute() . |
TextGlyph |
visitText(xDotParser.TextContext ctx)
Visit a parse tree produced by the
text
labeled alternative in xDotParser.attribute() . |
java.lang.Integer |
visitWidth(xDotParser.WidthContext ctx)
Visit a parse tree produced by
xDotParser.width() . |
visitCharacteristic
aggregateResult, defaultResult, shouldVisitNextChild, visit, visitChildren, visitErrorNode, visitTerminal
protected Glyph base
protected java.awt.geom.Point2D[] coordinates
protected Spline spline
protected java.util.ArrayList<Glyphish> glyphs
protected java.lang.String style
protected java.awt.geom.Rectangle2D bounds
public Visitor(IOPGraph graph, Visitor.Type type, int graphHeight)
public Visitor(Visitor.Type type, int graphHeight)
public java.util.ArrayList<Glyphish> visitAttributes(xDotParser.AttributesContext ctx)
xDotBaseVisitor
xDotParser.attributes()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitAttributes
in interface xDotVisitor<java.lang.Object>
visitAttributes
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic ImageGlyph visitImage(xDotParser.ImageContext ctx)
xDotBaseVisitor
image
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitImage
in interface xDotVisitor<java.lang.Object>
visitImage
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic TextGlyph visitText(xDotParser.TextContext ctx)
xDotBaseVisitor
text
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitText
in interface xDotVisitor<java.lang.Object>
visitText
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic Glyph visitEllipseFilled(xDotParser.EllipseFilledContext ctx)
xDotBaseVisitor
ellipseFilled
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitEllipseFilled
in interface xDotVisitor<java.lang.Object>
visitEllipseFilled
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic Glyph visitEllipseUnfilled(xDotParser.EllipseUnfilledContext ctx)
xDotBaseVisitor
ellipseUnfilled
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitEllipseUnfilled
in interface xDotVisitor<java.lang.Object>
visitEllipseUnfilled
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic Glyph visitPolygonFilled(xDotParser.PolygonFilledContext ctx)
xDotBaseVisitor
polygonFilled
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitPolygonFilled
in interface xDotVisitor<java.lang.Object>
visitPolygonFilled
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic Glyph visitPolygonUnfilled(xDotParser.PolygonUnfilledContext ctx)
xDotBaseVisitor
polygonUnfilled
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitPolygonUnfilled
in interface xDotVisitor<java.lang.Object>
visitPolygonUnfilled
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic Glyph visitBezel(java.awt.Point[] points, java.awt.Color fill)
public Glyphish visitBezelUnfilled(xDotParser.BezelUnfilledContext ctx)
xDotBaseVisitor
bezelUnfilled
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitBezelUnfilled
in interface xDotVisitor<java.lang.Object>
visitBezelUnfilled
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic Glyph visitBezelFilled(xDotParser.BezelFilledContext ctx)
xDotBaseVisitor
bezelFilled
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitBezelFilled
in interface xDotVisitor<java.lang.Object>
visitBezelFilled
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic Glyph visitPolyline(xDotParser.PolylineContext ctx)
xDotBaseVisitor
polyline
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitPolyline
in interface xDotVisitor<java.lang.Object>
visitPolyline
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.String visitBytes(xDotParser.BytesContext ctx)
xDotBaseVisitor
xDotParser.bytes()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitBytes
in interface xDotVisitor<java.lang.Object>
visitBytes
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.Integer visitAlignment(xDotParser.AlignmentContext ctx)
xDotBaseVisitor
xDotParser.alignment()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitAlignment
in interface xDotVisitor<java.lang.Object>
visitAlignment
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.awt.Point[] visitPointSequence(xDotParser.PointSequenceContext ctx)
xDotBaseVisitor
xDotParser.pointSequence(int)
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitPointSequence
in interface xDotVisitor<java.lang.Object>
visitPointSequence
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.awt.Color visitFillColor(xDotParser.FillColorContext ctx)
xDotBaseVisitor
fillColor
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitFillColor
in interface xDotVisitor<java.lang.Object>
visitFillColor
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.awt.Color visitPenColor(xDotParser.PenColorContext ctx)
xDotBaseVisitor
penColor
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitPenColor
in interface xDotVisitor<java.lang.Object>
visitPenColor
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.String visitFont(xDotParser.FontContext ctx)
xDotBaseVisitor
font
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitFont
in interface xDotVisitor<java.lang.Object>
visitFont
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.Integer visitWidth(xDotParser.WidthContext ctx)
xDotBaseVisitor
xDotParser.width()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitWidth
in interface xDotVisitor<java.lang.Object>
visitWidth
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.Integer visitHeight(xDotParser.HeightContext ctx)
xDotBaseVisitor
xDotParser.height()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitHeight
in interface xDotVisitor<java.lang.Object>
visitHeight
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.String visitCharSequence(xDotParser.CharSequenceContext ctx)
xDotBaseVisitor
xDotParser.charSequence(int)
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitCharSequence
in interface xDotVisitor<java.lang.Object>
visitCharSequence
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.String visitCharElement(xDotParser.CharElementContext ctx)
xDotBaseVisitor
xDotParser.charElement()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitCharElement
in interface xDotVisitor<java.lang.Object>
visitCharElement
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.String visitStyle(xDotParser.StyleContext ctx)
xDotBaseVisitor
style
labeled alternative in xDotParser.attribute()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitStyle
in interface xDotVisitor<java.lang.Object>
visitStyle
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.awt.Point[] visitPoints(xDotParser.PointsContext ctx)
xDotBaseVisitor
xDotParser.points()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitPoints
in interface xDotVisitor<java.lang.Object>
visitPoints
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.awt.Point visitPoint(xDotParser.PointContext ctx)
xDotBaseVisitor
xDotParser.point()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitPoint
in interface xDotVisitor<java.lang.Object>
visitPoint
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.Integer visitFontsize(xDotParser.FontsizeContext ctx)
xDotBaseVisitor
xDotParser.fontsize()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitFontsize
in interface xDotVisitor<java.lang.Object>
visitFontsize
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.Integer visitInteger(xDotParser.IntegerContext ctx)
xDotBaseVisitor
xDotParser.integer()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitInteger
in interface xDotVisitor<java.lang.Object>
visitInteger
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic java.lang.Integer visitNumber(xDotParser.NumberContext ctx)
xDotBaseVisitor
xDotParser.number()
.
The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)
on ctx
.
visitNumber
in interface xDotVisitor<java.lang.Object>
visitNumber
in class xDotBaseVisitor<java.lang.Object>
ctx
- the parse treepublic static xDotParser parseString(java.lang.String string)
public static void testFromString(java.lang.String string)
public static void testFromFile(java.lang.String filename)
public static void test(xDotParser parser)
public static void main(java.lang.String[] args)