GrammarScope  4.0.0
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
grammarscope.common.component.ParseView Class Reference
Inheritance diagram for grammarscope.common.component.ParseView:
Inheritance graph
[legend]
Collaboration diagram for grammarscope.common.component.ParseView:
Collaboration graph
[legend]

Classes

class  WidthResult
 

Public Member Functions

AParseTree getTree ()
 
void setTree (final AParseTree tree)
 
void paintComponent (final Graphics g)
 
 ParseView ()
 
 ParseView (final int hAlign, final int vAlign)
 
void setMinFontSize (final int size)
 
void setMaxFontSize (final int size)
 
Font pickFont ()
 
Dimension getTreeDimension (final AParseTree tree, final Font font)
 

Protected Member Functions

FontMetrics pickFont (final Graphics2D g2, final AParseTree tree, final Dimension space)
 
void superPaint (final Graphics g)
 

Static Protected Member Functions

static String nodeToString (final AParseTree tree)
 
static double width (final AParseTree tree, final FontMetrics fM)
 
static WidthResult widthResult (final AParseTree tree, final FontMetrics fM)
 
static double height (final AParseTree tree, final FontMetrics fM)
 

Protected Attributes

final int VERTICAL_ALIGN
 
final int HORIZONTAL_ALIGN
 
AParseTree tree
 

Static Protected Attributes

static final double sisterSkip = 2.5
 
static final double parentSkip = 1.35
 
static final double belowLineSkip = 0.075
 
static final double aboveLineSkip = 0.075
 

Static Private Member Functions

static double paintTree (final AParseTree t, final Point2D start, final Graphics2D g2, final FontMetrics fM)
 

Private Attributes

int maxFontSize = 128
 
int minFontSize = 2
 

Static Private Attributes

static final long serialVersionUID = 5592507910050823530L
 

Detailed Description

View for a AParseTree.

Author
Dan Klein
Bernard Bou (adapted to artifact)

Constructor & Destructor Documentation

◆ ParseView() [1/2]

grammarscope.common.component.ParseView.ParseView ( )

◆ ParseView() [2/2]

grammarscope.common.component.ParseView.ParseView ( final int  hAlign,
final int  vAlign 
)

Member Function Documentation

◆ getTree()

AParseTree grammarscope.common.component.ParseView.getTree ( )

◆ getTreeDimension()

Dimension grammarscope.common.component.ParseView.getTreeDimension ( final AParseTree  tree,
final Font  font 
)

◆ height()

static double grammarscope.common.component.ParseView.height ( final AParseTree  tree,
final FontMetrics  fM 
)
staticprotected

◆ nodeToString()

static String grammarscope.common.component.ParseView.nodeToString ( final AParseTree  tree)
staticprotected

◆ paintComponent()

void grammarscope.common.component.ParseView.paintComponent ( final Graphics  g)

◆ paintTree()

static double grammarscope.common.component.ParseView.paintTree ( final AParseTree  t,
final Point2D  start,
final Graphics2D  g2,
final FontMetrics  fM 
)
staticprivate

◆ pickFont() [1/2]

Font grammarscope.common.component.ParseView.pickFont ( )

◆ pickFont() [2/2]

FontMetrics grammarscope.common.component.ParseView.pickFont ( final Graphics2D  g2,
final AParseTree  tree,
final Dimension  space 
)
protected

◆ setMaxFontSize()

void grammarscope.common.component.ParseView.setMaxFontSize ( final int  size)

◆ setMinFontSize()

void grammarscope.common.component.ParseView.setMinFontSize ( final int  size)

◆ setTree()

void grammarscope.common.component.ParseView.setTree ( final AParseTree  tree)

◆ superPaint()

void grammarscope.common.component.ParseView.superPaint ( final Graphics  g)
protected

◆ width()

static double grammarscope.common.component.ParseView.width ( final AParseTree  tree,
final FontMetrics  fM 
)
staticprotected

◆ widthResult()

static WidthResult grammarscope.common.component.ParseView.widthResult ( final AParseTree  tree,
final FontMetrics  fM 
)
staticprotected

Member Data Documentation

◆ aboveLineSkip

final double grammarscope.common.component.ParseView.aboveLineSkip = 0.075
staticprotected

◆ belowLineSkip

final double grammarscope.common.component.ParseView.belowLineSkip = 0.075
staticprotected

◆ HORIZONTAL_ALIGN

final int grammarscope.common.component.ParseView.HORIZONTAL_ALIGN
protected

◆ maxFontSize

int grammarscope.common.component.ParseView.maxFontSize = 128
private

◆ minFontSize

int grammarscope.common.component.ParseView.minFontSize = 2
private

◆ parentSkip

final double grammarscope.common.component.ParseView.parentSkip = 1.35
staticprotected

◆ serialVersionUID

final long grammarscope.common.component.ParseView.serialVersionUID = 5592507910050823530L
staticprivate

◆ sisterSkip

final double grammarscope.common.component.ParseView.sisterSkip = 2.5
staticprotected

◆ tree

AParseTree grammarscope.common.component.ParseView.tree
protected

◆ VERTICAL_ALIGN

final int grammarscope.common.component.ParseView.VERTICAL_ALIGN
protected

The documentation for this class was generated from the following file: