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

## multivalent.std
Class OcrView

    java.lang.Object
      multivalent.VObject
          multivalent.Behavior
              multivalent.std.OcrView

All Implemented Interfaces:
  java.awt.image.ImageObserver

public class OcrView
extends Behavior
implements java.awt.image.ImageObserver

Base class for OCR media adaptors. Services: load background image, selectable modes, sets

Version:
  $Revision: 1.7 $ $Date: 2002/04/01 08:44:48 $
See Also:
  `FixedLeafOCR`, `berkeley.adaptor.Xdoc`, `berkeley.adaptor.PDA`

Field Summary
`static java.lang.String` | `MENU_CATEGORY` Menu category for OCR-related options ("OCR").
`static java.lang.String` | `MODE_IMAGE_ONLY`
`static java.lang.String` | `MSG_IMAGE` Request Image-only view.
`static java.lang.String` | `MSG_IMAGE_OCR` Request Image-OCR hybrid view.
`static java.lang.String` | `MSG_OCR` Request OCR-only view.
`static java.lang.String` | `VAR_FULLIMAGE` Key into Document variables to `Image` of full page.

Fields inherited from class multivalent.Behavior
`ATTR_BEHAVIOR, name_`

Fields inherited from class multivalent.VObject
`attr_`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`OcrView()`

Method Summary
`void` | `buildAfter(Document doc)` Traverses all behaviors from lowest to highest priority, during which tweaks hack their content into the tree,
`boolean` | `formatAfter(Node node)` A tree walk protocol, called after observed node has been formatted.
`boolean` | `imageUpdate(java.awt.Image img, int infoflags, int x, int y, int width, int height)`
`boolean` | `paintBefore(Context cx, Node node)` A tree walk protocol, called before observed node has been painted.
`boolean` | `semanticEventAfter(SemanticEvent se, java.lang.String msg)` Messages recognized: viewImageOCR viewOCR viewImage
`boolean` | `semanticEventBefore(SemanticEvent se, java.lang.String msg)` Round robin distribution to all behaviors.

Methods inherited from class multivalent.Behavior
`buildBefore, checkRep, clipboardAfter, clipboardBefore, createUI, destroy, eventAfter, eventBefore, formatBefore, getBrowser, getDocument, getInstance, getInstance, getLayer, getLogger, getName, getPreference, getRoot, isEditable, paintAfter, putPreference, redo, restore, restoreChildren, save, setName, toString, undo`

Methods inherited from class multivalent.VObject
`attrEntrySetIterator, attrKeysIterator, clearAttributes, getAttr, getAttr, getAttributes, getGlobal, getValue, hasAttributes, putAttr, removeAttr, setAttributes`

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

Field Detail

### MENU_CATEGORY

    public static final java.lang.String MENU_CATEGORY

  Menu category for OCR-related options ("OCR").

  See Also:
    Constant Field Values

### MSG_IMAGE_OCR

    public static final java.lang.String MSG_IMAGE_OCR

  Request Image-OCR hybrid view.

  `"viewImageOCR"`.

  See Also:
    Constant Field Values

### MSG_OCR

    public static final java.lang.String MSG_OCR

  Request OCR-only view.

  `"viewOCR"`.

  See Also:
    Constant Field Values

### MSG_IMAGE

    public static final java.lang.String MSG_IMAGE

  Request Image-only view.

  `"viewImage"`.

  See Also:
    Constant Field Values

### MODE_IMAGE_ONLY

    public static final java.lang.String MODE_IMAGE_ONLY

See Also:
  `FixedLeafOCR.SIGNAL`, `FixedLeafOCR.MODE_IMAGE`, `FixedLeafOCR.MODE_OCR`, Constant Field Values

### VAR_FULLIMAGE

    public static final java.lang.String VAR_FULLIMAGE

  Key into Document variables to `Image` of full page.

  See Also:
    Constant Field Values

Constructor Detail

### OcrView

    public OcrView()

Method Detail

### semanticEventBefore

    public boolean semanticEventBefore(SemanticEvent se,
                                       java.lang.String msg)

  Description copied from class: `Behavior`
  Round robin distribution to all behaviors. Message and clientData unpacked from SemanticEvent for convenience. Message is interned, so if you compare to a literal, you can use "==". Message can't be changed (it can be short-circuited out of), but client data can be mutated as it is passed along (so it's not passed as a parameter).

  Overrides:
    `semanticEventBefore` in class `Behavior`

### semanticEventAfter

    public boolean semanticEventAfter(SemanticEvent se,
                                      java.lang.String msg)

  Messages recognized:
  - viewImageOCR
  - viewOCR
  - viewImage

  Overrides:
    `semanticEventAfter` in class `Behavior`

### imageUpdate

    public boolean imageUpdate(java.awt.Image img,
                               int infoflags,
                               int x,
                               int y,
                               int width,
                               int height)

  Specified by:
    `imageUpdate` in interface `java.awt.image.ImageObserver`

### buildAfter

    public void buildAfter(Document doc)

  Description copied from class: `Behavior`
  Traverses all behaviors from lowest to highest priority, during which tweaks hack their content into the tree,

  Overrides:
    `buildAfter` in class `Behavior`

### formatAfter

    public boolean formatAfter(Node node)

  Description copied from class: `Behavior`
  A tree walk protocol, called after observed node has been formatted. For instance, Search uses this to keep its coordinates of matches current.

  Overrides:
    `formatAfter` in class `Behavior`
  Returns:
    `true` to short-circuit formatting of rest of protocol, which consists exclusively of higher-priority behaviors, which almost never want to do.

### paintBefore

    public boolean paintBefore(Context cx,
                               Node node)

  Description copied from class: `Behavior`
  A tree walk protocol, called before observed node has been painted. Called in same coordinate space as node's painting. Can be used draw special background, but usual background setting is done by spans or style sheets.

  Overrides:
    `paintBefore` in class `Behavior`
  Returns:
    `true` to short-circuit to paintAfter at that node, bypassing painting of the subtree.

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