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 FontMetrics
boldMetrics
static FontMetrics
plainMetrics
-
Constructor Summary
Constructors Constructor Description BoundCalc()
BoundCalc(Translator aTranslator)
-
Method Summary
Modifier and Type Method Description static double
boldWidth(String s)
Computes the width of string s in bolprotected void
draw(Element element, double margin)
Rectangle2D
getBounds(Element e)
static double
plainWidth(String s)
Computes the width of string in plain font.void
visitBranchPoint(BranchPoint branchPoint)
void
visitEdge(Edge edge)
void
visitLocation(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 Details
-
Constructor Details
-
Method Details
-
plainWidth
Computes the width of string in plain font.- Parameters:
s
- the text to be drawn.- Returns:
- the width of drawn text
-
boldWidth
Computes the width of string s in bol- Parameters:
s
- the text to be drawn.- Returns:
- the width of the drawn text.
-
draw
-
visitLocation
- Specified by:
visitLocation
in interfaceVisitor
- Overrides:
visitLocation
in classAbstractVisitor
- Throws:
Exception
-
visitBranchPoint
- Specified by:
visitBranchPoint
in interfaceVisitor
- Overrides:
visitBranchPoint
in classAbstractVisitor
- Throws:
Exception
-
visitEdge
- Specified by:
visitEdge
in interfaceVisitor
- Overrides:
visitEdge
in classAbstractVisitor
- Throws:
Exception
-
getBounds
-