Skip to main content

Class JtvMemo

public class JtvMemo
extends JtvEditor

A multi-line text memo field for use inside JT Vision dialog boxes and forms.

JtvMemo extends JtvEditor with data-transfer support (getDataTo, setDataFrom, dataSize) so that it can participate in the standard dialog data-record mechanism. It is typically embedded in a dialog box alongside other controls.

The memo field treats its data as a simple string. setDataFrom replaces the entire editor buffer with the supplied text; getDataTo copies the current text back into the caller's StringBuilder.

org.viktor44.jtvision.editors.JtvMemo

Summary​

Constructors​

VisibilitySignature
publicJtvMemo(JtvRect bounds, JtvScrollBar hScrollBar, JtvScrollBar vScrollBar, JtvIndicator indicator)

Methods​

ModifiersMethod signatureReturn type
publicgetDataTo(Object rec)void
publicsetDataFrom(Object rec)void

Constructors​

JtvMemo(JtvRect bounds, JtvScrollBar hScrollBar, JtvScrollBar vScrollBar, JtvIndicator indicator)​

Constructs a memo field.

Parameters

  • bounds - the bounding rectangle for this view
  • hScrollBar - optional horizontal scroll bar, or null
  • vScrollBar - optional vertical scroll bar, or null
  • indicator - optional position indicator, or null
  • bufferSize - maximum buffer size in characters

Methods​

getDataTo(Object rec)​

Copies the current editor content into rec. If rec is a StringBuilder, it is cleared and filled with the buffer text.

Parameters

  • rec - target data record; must be a StringBuilder to receive text

setDataFrom(Object rec)​

Loads the editor buffer from rec. If rec is a CharSequence, its content replaces the current buffer, the cursor is moved to the start, and the modification flag is cleared.

Parameters

  • rec - source data record; must be a CharSequence