Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vistech.shapes
Class AnnoText

    java.lang.Object
      |
      +--com.vistech.shapes.Shapes
            |
            +--com.vistech.shapes.AnnoText

All Implemented Interfaces:
  java.lang.Cloneable, Drawable, java.io.Serializable, Typable

public class AnnoText
extends Shapes
implements Typable

Represents an interactively drawable text string.

Version:
  1.0 20 Dec 1999
Author:
  Larry Rodrigues
See Also:
  Serialized Form

Field Summary
`boolean` | `backSpaceOn`
`char` | `curChar` Latest character
`int` | `curCount`
`java.lang.StringBuffer` | `curStr` Current string
`protected java.awt.Font` | `font`
`char` | `lastChar`
`int` | `totWid`

Fields inherited from class com.vistech.shapes.Shapes
`basicStroke, cur, drawingColor, fillColor, fillOn, path, shapeCount, smallRectsOn, st`

Fields inherited from interface com.vistech.shapes.Drawable
`ANNOTEXT, ARROW, BOX, CUBIC_CURVE, CURVE, DOUBLE_HEADED_ARROW, ELLIPSE, LINE, NONE, POLYGON`

Constructor Summary
`AnnoText()`

Method Summary
`boolean` | `contains(java.awt.Graphics2D g, int x, int y)` Vhecks whether the specified point contained in the shape.
`void` | `draw(java.awt.Graphics2D g)` Draws text.
`void` | `drawInteractive(java.awt.Graphics2D g)` Draws text over a Graphics context g.
`void` | `drawPermanent(java.awt.Graphics2D g)`
`void` | `drawSmallRects(java.awt.Graphics2D g)` Draws small rectangle at the shape corners to indicate that the shape is active.
`void` | `erase(java.awt.Graphics2D g)` Erase the shape.
`java.lang.String` | `getCurStr()` Gets the currently drawn string.
`void` | `init(int x, int y)` Initializes the AnnoText parameters.
`void` | `move(java.awt.Graphics2D g, int diffx, int diffy)` Moves the shape by a specified displacement.
`void` | `setCurChar(int key)` Sets the current character.
`void` | `setCurPoint(int x, int y)` Sets the current position.

Methods inherited from class com.vistech.shapes.Shapes
`contains, copy, getCurrentPosition, getDrawingColor, getFillColor, getFillOn, getFont, getGeneralPath, getShapeCount, getSmallRectsOn, getStartPosition, getStroke, setCurrentPosition, setDrawingColor, setFillColor, setFillOn, setFont, setGeneralPath, setShapeCount, setSmallRectsOn, setStartPosition, setStroke`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.vistech.shapes.Drawable
`setCurrentPosition`

Field Detail

### curStr

    public java.lang.StringBuffer curStr

  Current string

### curChar

    public char curChar

  Latest character

### totWid

    public int totWid

### curCount

    public int curCount

### font

    protected java.awt.Font font

### backSpaceOn

    public boolean backSpaceOn

### lastChar

    public char lastChar

Constructor Detail

### AnnoText

    public AnnoText()

Method Detail

### init

    public void init(int x,
                     int y)

  Initializes the AnnoText parameters. The arguments provide the starting point of the text.
  Specified by:
    `init` in interface `Drawable`
  Overrides:
    `init` in class `Shapes`
  Parameters:
    `x` - the x coordinate of the starting position.
    `y` - the y coordinate of the starting poistion.

### setCurPoint

    public void setCurPoint(int x,
                            int y)

  Sets the current position. Currently, this point is not being used in AnnoText.
  Parameters:
    `x` - the x coordinate of the current position.
    `y` - the y coordinate of the current poistion.

### setCurChar

    public void setCurChar(int key)

  Sets the current character. This method is specific to AnnoText class.
  Specified by:
    `setCurChar` in interface `Typable`
  Parameters:
    `key` - the char

### getCurStr

    public java.lang.String getCurStr()

  Gets the currently drawn string. This method is specific to AnnoText class.
  Returns:
    String the current string.

### drawInteractive

    public void drawInteractive(java.awt.Graphics2D g)

  Draws text over a Graphics context g. This API does not check whether the text overflows the borders of the component.
  Specified by:
    `drawInteractive` in interface `Drawable`
  Parameters:
    `g` - the graphics object on which the shape is to be drawn.

### drawPermanent

    public void drawPermanent(java.awt.Graphics2D g)

### draw

    public void draw(java.awt.Graphics2D g)

  Draws text.
  Specified by:
    `draw` in interface `Drawable`
  Parameters:
    `g` - the graphics object on which the shape is to be drawn.

### move

    public void move(java.awt.Graphics2D g,
                     int diffx,
                     int diffy)

  Description copied from interface: `Drawable`
  Moves the shape by a specified displacement.
  Specified by:
    `move` in interface `Drawable`
  Following copied from interface: `com.vistech.shapes.Drawable`
  Parameters:
    `x` - the displacement.
    `y` - the displacement.

### erase

    public void erase(java.awt.Graphics2D g)

  Description copied from interface: `Drawable`
  Erase the shape.
  Specified by:
    `erase` in interface `Drawable`
  Following copied from interface: `com.vistech.shapes.Drawable`
  Parameters:
    `g` - the graphcs context on which the shape was drawn.

### contains

    public boolean contains(java.awt.Graphics2D g,
                            int x,
                            int y)

  Description copied from class: `Shapes`
  Vhecks whether the specified point contained in the shape.
  Overrides:
    `contains` in class `Shapes`
  Following copied from class: `com.vistech.shapes.Shapes`
  Parameters:
    `g` - the graphics context on which the shape was drawn.
    `x` - the coordinate of the point that is being checked for containment.
    `y` - the coordinate of the point that is being checked for containment.

### drawSmallRects

    public void drawSmallRects(java.awt.Graphics2D g)

  Description copied from class: `Shapes`
  Draws small rectangle at the shape corners to indicate that the shape is active. For example, a shape that is being moved is surrounded by small rectagles at the shape corners. small rectab
  Overrides:
    `drawSmallRects` in class `Shapes`
  Following copied from class: `com.vistech.shapes.Shapes`
  Parameters:
    `g` - the graphics context on which the shape was drawn.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD