Package com.uppaal.model.io2
Class BoundCalc
- java.lang.Object
-
- com.uppaal.model.core2.AbstractVisitor
-
- com.uppaal.model.io2.BoundCalc
-
- All Implemented Interfaces:
Visitor
public class BoundCalc extends AbstractVisitor
-
-
Field Summary
Fields Modifier and Type Field Description static FontMetricsboldMetricsstatic FontMetricsplainMetrics
-
Constructor Summary
Constructors Constructor Description BoundCalc()BoundCalc(Translator aTranslator)
-
Method Summary
Modifier and Type Method Description static doubleboldWidth(String s)Computes the width of string s in bolprotected voiddraw(Element element, double margin)Rectangle2DgetBounds(Element e)static doubleplainWidth(String s)Computes the width of string in plain font.voidvisitBranchPoint(BranchPoint branchPoint)voidvisitEdge(Edge edge)voidvisitLocation(Location location)-
Methods inherited from class com.uppaal.model.core2.AbstractVisitor
visitCondition, visitCut, visitDocument, visitElement, visitInstanceLine, visitMessage, visitNail, visitNode, visitPrechart, visitProperty, visitQueries, visitQuery, visitTemplate, visitUpdate
-
-
-
-
Field Detail
-
plainMetrics
public static final FontMetrics plainMetrics
-
boldMetrics
public static final FontMetrics boldMetrics
-
-
Constructor Detail
-
BoundCalc
public BoundCalc()
-
BoundCalc
public BoundCalc(Translator aTranslator)
-
-
Method Detail
-
plainWidth
public static double plainWidth(String s)
Computes the width of string in plain font.- Parameters:
s- the text to be drawn.- Returns:
- the width of drawn text
-
boldWidth
public static double boldWidth(String s)
Computes the width of string s in bol- Parameters:
s- the text to be drawn.- Returns:
- the width of the drawn text.
-
draw
protected void draw(Element element, double margin)
-
visitLocation
public void visitLocation(Location location) throws Exception
- Specified by:
visitLocationin interfaceVisitor- Overrides:
visitLocationin classAbstractVisitor- Throws:
Exception
-
visitBranchPoint
public void visitBranchPoint(BranchPoint branchPoint) throws Exception
- Specified by:
visitBranchPointin interfaceVisitor- Overrides:
visitBranchPointin classAbstractVisitor- Throws:
Exception
-
visitEdge
public void visitEdge(Edge edge) throws Exception
- Specified by:
visitEdgein interfaceVisitor- Overrides:
visitEdgein classAbstractVisitor- Throws:
Exception
-
getBounds
public Rectangle2D getBounds(Element e)
-
-