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
All Methods Static Methods Instance Methods Concrete Methods 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 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:
visitLocation
in interfaceVisitor
- Overrides:
visitLocation
in classAbstractVisitor
- Throws:
Exception
-
visitBranchPoint
public void visitBranchPoint(BranchPoint branchPoint) throws Exception
- Specified by:
visitBranchPoint
in interfaceVisitor
- Overrides:
visitBranchPoint
in classAbstractVisitor
- Throws:
Exception
-
visitEdge
public void visitEdge(Edge edge) throws Exception
- Specified by:
visitEdge
in interfaceVisitor
- Overrides:
visitEdge
in classAbstractVisitor
- Throws:
Exception
-
getBounds
public Rectangle2D getBounds(Element e)
-
-