edu.stanford.genomics.util
Class PrintingFixTextNode

java.lang.Object
  |
  +--edu.umd.cs.piccolo.PNode
        |
        +--edu.umd.cs.piccolo.nodes.PText
              |
              +--edu.stanford.genomics.util.PrintingFixTextNode
All Implemented Interfaces:
Cloneable, Printable, Serializable

public class PrintingFixTextNode
extends edu.umd.cs.piccolo.nodes.PText

This is a version of a Piccolo PText node that takes control of its own rendering behavior when printing.

This class is necessary because the Graphics2Dimplementation we use for printing, contributed by the FreeHEP Java Library, does not implement Graphics2D.drawGlyphVector(GlyphVector,float,float).

The special rendering behavior is such that instances of this class obtain font metrics directly, and call the Graphics2D.drawString(String,float,float) method, rather than using the default PText implementation, which calls Graphics2D.drawGlyphVector(GlyphVector,float,float).

A programmer instructs instances of this class to use the "special" printing behavior by setting the client property PRINTING_CLIENT_PROPERTY_KEY to some non- null value on the PCamera associated with the current rendering operation.

Version:
$Id: PrintingFixTextNode.java,v 1.1 2004/02/24 01:16:15 ihab Exp $
Author:
Ihab A.B. Awad
See Also:
Serialized Form

Field Summary
static String PRINTING_CLIENT_PROPERTY_KEY
           
 
Fields inherited from class edu.umd.cs.piccolo.nodes.PText
DEFAULT_FONT, DEFAULT_GREEK_THRESHOLD, greekThreshold, PROPERTY_FONT, PROPERTY_TEXT
 
Fields inherited from class edu.umd.cs.piccolo.PNode
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
PrintingFixTextNode()
           
 
Method Summary
 void paint(edu.umd.cs.piccolo.util.PPaintContext pc)
           
 
Methods inherited from class edu.umd.cs.piccolo.nodes.PText
computeNextLayout, getFont, getGreekThreshold, getJustification, getText, getTextPaint, internalUpdateBounds, isConstrainHeightToTextHeight, isConstrainWidthToTextWidth, paramString, recomputeLayout, setConstrainHeightToTextHeight, setConstrainWidthToTextWidth, setFont, setGreekThreshold, setJustification, setText, setTextPaint
 
Methods inherited from class edu.umd.cs.piccolo.PNode
addActivity, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToTransform, animateToTransparency, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, endResizeBounds, findIntersectingNodes, firePropertyChange, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperty, getClientPropertyKeysIterator, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getInverseTransform, getListenerList, getLocalToGlobalTransform, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, intersects, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, moveInBackOf, moveInFrontOf, moveToBack, moveToFront, offset, paintAfterChildren, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, position, print, print, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaintFrom, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toString, transformBy, translate, validateFullBounds, validateFullPaint
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRINTING_CLIENT_PROPERTY_KEY

public static final String PRINTING_CLIENT_PROPERTY_KEY
Constructor Detail

PrintingFixTextNode

public PrintingFixTextNode()
Method Detail

paint

public void paint(edu.umd.cs.piccolo.util.PPaintContext pc)
Overrides:
paint in class edu.umd.cs.piccolo.nodes.PText