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

## ru.biosoft.graphics
Class TextView

    java.lang.Object
      ru.biosoft.graphics.View
          ru.biosoft.graphics.TextView

public class TextView
extends View

Field Summary
`protected int` | `alignment`
`protected ColorFont` | `font`
`protected java.awt.Rectangle` | `rect`
`protected java.lang.String` | `text`
`protected int` | `y`

Fields inherited from class ru.biosoft.graphics.View
`ACTIVE, at, BASELINE, BOTTOM, CENTER, HIDE, LEFT, model, RIGHT, shape, TOP, type`

Constructor Summary
`TextView(java.lang.String text, ColorFont font, java.awt.Graphics graphics)`
`TextView(java.lang.String text, java.awt.Point pt, int alignment, ColorFont font, java.awt.Graphics graphics)`

Method Summary
`java.awt.Rectangle` | `getBounds()` Returns an integer `Rectangle` that completely encloses the `View`.
`java.awt.Rectangle` | `getTextPos(int from, int to, java.awt.FontMetrics fm)`
`void` | `initSize(java.awt.Graphics graphics)`
`void` | `move(int x, int y)` Moves View to the new location using specified offsets.
`void` | `paint(java.awt.Graphics2D g)` Paints this view on specified Graphics2D.

Methods inherited from class ru.biosoft.graphics.View
`getModel, getShape, intersects, isActive, isVisible, move, scale, setActive, setLocation, setLocation, setModel, setToScale, setVisible, updateBounds`

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

Field Detail

### text

    protected java.lang.String text

### alignment

    protected int alignment

### y

    protected int y

### rect

    protected java.awt.Rectangle rect

### font

    protected ColorFont font

Constructor Detail

### TextView

    public TextView(java.lang.String text,
                    java.awt.Point pt,
                    int alignment,
                    ColorFont font,
                    java.awt.Graphics graphics)

### TextView

    public TextView(java.lang.String text,
                    ColorFont font,
                    java.awt.Graphics graphics)

Method Detail

### initSize

    public void initSize(java.awt.Graphics graphics)

### getTextPos

    public java.awt.Rectangle getTextPos(int from,
                                         int to,
                                         java.awt.FontMetrics fm)

### getBounds

    public java.awt.Rectangle getBounds()

  Description copied from class: `View`
  Returns an integer `Rectangle` that completely encloses the `View`.

  Overrides:
    `getBounds` in class `View`
  Returns:
    an integer `Rectangle` that completely encloses the `View`.

### move

    public void move(int x,
                     int y)

  Description copied from class: `View`
  Moves View to the new location using specified offsets.

  Specified by:
    `move` in class `View`
  Parameters:
    `x` - offset along the X axis direction.
    `y` - offset along the Y axis direction.

### paint

    public void paint(java.awt.Graphics2D g)

  Description copied from class: `View`
  Paints this view on specified Graphics2D.

  Overrides:
    `paint` in class `View`
  Parameters:
    `g` - specified Graphics2D.

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

Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.