Top Fields Constructors Methods
org.antlr.v4.gui

public Class PostScriptDocument

extends Object
Class Inheritance
Imports
java.awt.*, java.util.HashMap, .Locale, .Map

Field Summary

Modifier and TypeField and Description
protected String
protected int
protected int
protected boolean
public static final String
protected SystemFontMetrics
protected String
protected int
protected double
public static final Map<String, String>
protected StringBuilder

Constructor Summary

AccessConstructor and Description
public
public
PostScriptDocument(String fontName, int fontSize)

Method Summary

Modifier and TypeMethod and Description
public void
boundingBox(int w, int h)

public void
public int
public double
public String
public double
getWidth(char c)

All chars are 600 thousands of an 'em' wide if courier

public double
protected StringBuilder
header()

Compute the header separately because we need to wait for the bounding box

public void
highlight(double x, double y, double width, double height)

Make red box

public void
line(double x1, double y1, double x2, double y2)

public void
lineto(double x, double y)

public void
lineWidth(double w)

public void
move(double x, double y)

public void
rect(double x, double y, double width, double height)

public void
setFont(String fontName, int fontSize)

public void
public void
text(String s, double x, double y)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

boundingBoxback to summary
protected String boundingBox
boundingBoxHeightback to summary
protected int boundingBoxHeight
boundingBoxWidthback to summary
protected int boundingBoxWidth
closedback to summary
protected boolean closed
DEFAULT_FONTback to summary
public static final String DEFAULT_FONT
fontMetricsback to summary
protected SystemFontMetrics fontMetrics
fontNameback to summary
protected String fontName
fontSizeback to summary
protected int fontSize
lineWidthback to summary
protected double lineWidth
POSTSCRIPT_FONT_NAMESback to summary
public static final Map<String, String> POSTSCRIPT_FONT_NAMES
psback to summary
protected StringBuilder ps

Constructor Detail

PostScriptDocumentback to summary
public PostScriptDocument()
PostScriptDocumentback to summary
public PostScriptDocument(String fontName, int fontSize)

Method Detail

boundingBoxback to summary
public void boundingBox(int w, int h)
closeback to summary
public void close()
getFontSizeback to summary
public int getFontSize()
getLineHeightback to summary
public double getLineHeight()
getPSback to summary
public String getPS()
getWidthback to summary
public double getWidth(char c)

All chars are 600 thousands of an 'em' wide if courier

getWidthback to summary
public double getWidth(String s)
headerback to summary
protected StringBuilder header()

Compute the header separately because we need to wait for the bounding box

highlightback to summary
public void highlight(double x, double y, double width, double height)

Make red box

lineback to summary
public void line(double x1, double y1, double x2, double y2)
linetoback to summary
public void lineto(double x, double y)
lineWidthback to summary
public void lineWidth(double w)
moveback to summary
public void move(double x, double y)
rectback to summary
public void rect(double x, double y, double width, double height)
setFontback to summary
public void setFont(String fontName, int fontSize)
strokeback to summary
public void stroke()
textback to summary
public void text(String s, double x, double y)