net.sf.jcgm.core
Class RestrictedText

java.lang.Object
  extended by net.sf.jcgm.core.Command
      extended by net.sf.jcgm.core.TextCommand
          extended by net.sf.jcgm.core.RestrictedText
All Implemented Interfaces:
java.lang.Cloneable

public class RestrictedText
extends TextCommand

Class=4, Element=5

Version:
$Id: RestrictedText.java 51 2012-01-18 13:07:28Z phica $
Author:
xphc (Philippe Cadé), BBNT Solutions

Field Summary
 
Fields inherited from class net.sf.jcgm.core.TextCommand
position, string
 
Fields inherited from class net.sf.jcgm.core.Command
args, currentArg
 
Constructor Summary
RestrictedText(int ec, int eid, int l, java.io.DataInput in)
           
 
Method Summary
protected  java.awt.geom.Point2D.Double getTextOffset(CGMDisplay d)
          Returns an offset to apply to the defined text position
 void paint(CGMDisplay d)
           
protected  void scaleText(CGMDisplay d, java.awt.FontMetrics fontMetrics, java.awt.font.GlyphVector glyphVector, double width, double height)
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.jcgm.core.TextCommand
applyTextPath, flipString, getString
 
Methods inherited from class net.sf.jcgm.core.Command
alignOnWord, clone, getElementClass, getElementCode, info, makeByte, makeChar, makeColorIndex, makeColorIndex, makeDirectColor, makeEnum, makeFixedPoint, makeFixedString, makeFloat32, makeFloatingPoint, makeFloatingPoint32, makeIndex, makeInt, makeName, makePoint, makeReal, makeSDR, makeSignedInt16, makeSignedInt24, makeSignedInt32, makeSignedInt8, makeSizeSpecification, makeString, makeUInt, makeVc, makeVdc, printShape, read, readCommand, sizeOfDirectColor, sizeOfEnum, sizeOfInt, sizeOfPoint, sizeOfVdc, unimplemented, unsupported
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RestrictedText

public RestrictedText(int ec,
                      int eid,
                      int l,
                      java.io.DataInput in)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class Command

getTextOffset

protected java.awt.geom.Point2D.Double getTextOffset(CGMDisplay d)
Description copied from class: TextCommand
Returns an offset to apply to the defined text position

Returns:
Offset to apply to the text position

scaleText

protected void scaleText(CGMDisplay d,
                         java.awt.FontMetrics fontMetrics,
                         java.awt.font.GlyphVector glyphVector,
                         double width,
                         double height)
Overrides:
scaleText in class TextCommand

paint

public void paint(CGMDisplay d)
Overrides:
paint in class TextCommand


Part of the jcgm library http://jcgm.sourceforge.net/