Class GRWrappedStringVisitor

java.lang.Object
  |
  +--AbstractGRWrappedTextVisitor
        |
        +--GRWrappedStringVisitor
All Implemented Interfaces:
GRVisitor

public class GRWrappedStringVisitor
extends AbstractGRWrappedTextVisitor

A GRVisitor which constructs a wrapped String representation of an object from the GR-family, including GenRecoupCoeff. When a FontMetrics Class is specified in the constructor, the wrapsize is in pixels and takes in account the used font.

Author:
Dries.VanDyck@rug.ac.be
See Also:
GRVisitor, GenRecoupCoeff, GRCompoundFactor, GRSummation, GRFactor, GRPreFactor, GRKrDelta, GR6jSymbol

Field Summary
 
Fields inherited from class AbstractGRWrappedTextVisitor
wrappedstring
 
Constructor Summary
GRWrappedStringVisitor()
          Constructs a new GRWrappedStringVisitor.
GRWrappedStringVisitor(int wrapsize)
          Constructs a new GRWrappedStringVisitor which wraps at wrapsize characters.
GRWrappedStringVisitor(int wrapsize, java.awt.FontMetrics fm)
          Constructs a new GRWrappedStringVisitor, with given wrapsize in pixels and the FontMetrics class for the used font.
 
Method Summary
 java.lang.Object result()
          Returns the wrapped String representing the object visited.
 void visitGenRecoupCoeff(GenRecoupCoeff grc)
          Specific method for visiting a GenRecoupCoeff object.
 void visitGR6jSymbol(GR6jSymbol gr6j)
          Specific method for visiting a GR6jSymbol object.
 void visitGRCompoundFactor(GRCompoundFactor grcf)
          Specific method for visiting a GRCompoundFactor object.
 void visitGRKrDelta(GRKrDelta grcd)
          Specific method for visiting a GRKrDelta object.
 void visitGRPreFactor(GRPreFactor grpf)
          Specific method for visiting a GRPreFactor object.
 void visitGRSummation(GRSummation grs)
          Specific method for visiting a GRSummation object.
 
Methods inherited from class AbstractGRWrappedTextVisitor
append, size, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GRWrappedStringVisitor

public GRWrappedStringVisitor()
Constructs a new GRWrappedStringVisitor. Default wrapsize is 80 characters.


GRWrappedStringVisitor

public GRWrappedStringVisitor(int wrapsize,
                              java.awt.FontMetrics fm)
Constructs a new GRWrappedStringVisitor, with given wrapsize in pixels and the FontMetrics class for the used font.

Parameters:
wrapsize - number of allowed pixels on a line

GRWrappedStringVisitor

public GRWrappedStringVisitor(int wrapsize)
Constructs a new GRWrappedStringVisitor which wraps at wrapsize characters.

Parameters:
wrapsize - number of allowed chars on one line
Method Detail

visitGenRecoupCoeff

public void visitGenRecoupCoeff(GenRecoupCoeff grc)
Specific method for visiting a GenRecoupCoeff object.

Parameters:
grc - the GenRecoupCoeff to be visited
See Also:
GenRecoupCoeff

visitGRCompoundFactor

public void visitGRCompoundFactor(GRCompoundFactor grcf)
Specific method for visiting a GRCompoundFactor object.

Parameters:
grcf - the GRCompoundFactor to be visited
See Also:
GRCompoundFactor

visitGRSummation

public void visitGRSummation(GRSummation grs)
Specific method for visiting a GRSummation object.

Parameters:
grs - the GRSummation to be visited
See Also:
GRSummation

visitGRPreFactor

public void visitGRPreFactor(GRPreFactor grpf)
Specific method for visiting a GRPreFactor object.

Parameters:
grpf - the GRPreFactorto be visited
See Also:
GRPreFactor

visitGRKrDelta

public void visitGRKrDelta(GRKrDelta grcd)
Specific method for visiting a GRKrDelta object.

Parameters:
grcd - the GRKrDelta to be visited
See Also:
GRKrDelta

visitGR6jSymbol

public void visitGR6jSymbol(GR6jSymbol gr6j)
Specific method for visiting a GR6jSymbol object.

Parameters:
gr6j - the GR6jSymbol to be visited
See Also:
GR6jSymbol

result

public java.lang.Object result()
Returns the wrapped String representing the object visited.

Returns:
the resulting wrapped String as an Object