ij.gui
Class TextRoi

java.lang.Object
  extended by ij.gui.Roi
      extended by ij.gui.TextRoi
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class TextRoi
extends Roi

This class is a rectangular ROI containing text.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ij.gui.Roi
ANGLE, cachedMask, center, clipboard, clipHeight, clipWidth, clipX, clipY, COMPOSITE, constrain, CONSTRUCTING, FREELINE, FREEROI, HANDLE_SIZE, handleColor, ic, imp, LINE, mag, MOVING, MOVING_HANDLE, NORMAL, NOT_PASTING, oldHeight, oldWidth, oldX, oldY, OVAL, pasteMode, POINT, POLYGON, POLYLINE, previousRoi, RECTANGLE, RESIZING, ROIColor, TRACED_ROI, type, updateFullWindow, xMax, yMax
 
Constructor Summary
TextRoi(int x, int y, ImagePlus imp)
           
 
Method Summary
 void addChar(char c)
          Adds the specified character to the end of the text string.
 void draw(java.awt.Graphics g)
          Draws the text on the screen, clipped to the ROI.
 void drawPixels(ImageProcessor ip)
          Renders the text on the image.
static java.lang.String getFont()
          Returns the name of the current font.
static int getSize()
          Returns the current font size.
static int getStyle()
          Returns the current font style.
protected  void handleMouseUp(int screenX, int screenY)
           
static void setFont(java.lang.String fontName, int fontSize, int fontStyle)
          Sets the font face, size and style.
 
Methods inherited from class ij.gui.Roi
abortPaste, clone, contains, drawPixels, endPaste, getAngle, getBoundingRect, getBounds, getColor, getCurrentPasteMode, getFeretsDiameter, getLength, getMask, getName, getPasteMode, getPolygon, getState, getType, getTypeAsString, grow, handleMouseDown, handleMouseDrag, isArea, isHandle, isLine, isVisible, mouseDownInHandle, moveHandle, nudge, nudgeCorner, setColor, setImage, setLocation, setName, setPasteMode, showStatus, startPaste, toString, update, updateClipRect
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextRoi

public TextRoi(int x,
               int y,
               ImagePlus imp)
Method Detail

addChar

public void addChar(char c)
Adds the specified character to the end of the text string.


drawPixels

public void drawPixels(ImageProcessor ip)
Renders the text on the image.

Overrides:
drawPixels in class Roi
See Also:
ImageProcessor.setColor(java.awt.Color), ImageProcessor.setLineWidth(int)

draw

public void draw(java.awt.Graphics g)
Draws the text on the screen, clipped to the ROI.

Overrides:
draw in class Roi

getFont

public static java.lang.String getFont()
Returns the name of the current font.


getSize

public static int getSize()
Returns the current font size.


getStyle

public static int getStyle()
Returns the current font style.


setFont

public static void setFont(java.lang.String fontName,
                           int fontSize,
                           int fontStyle)
Sets the font face, size and style.


handleMouseUp

protected void handleMouseUp(int screenX,
                             int screenY)
Overrides:
handleMouseUp in class Roi