Class: TextField

TextField

テキストを管理するクラス、Next2DのTextFieldクラスとして出力されます。
The output is as a Next2D TextField class, a class that manages text.

new instance.TextField (object)

NameTypeDefaultDescription
objectobjectnulloptional

Extends

  • Instance

Members

instance.TextField.FONT_DEFAULT_SIZE staticconstant

テキストエリアのデフォルトの幅と高さのサイズ
Default width and height size of text area

align string

段落の行揃えの設定を示します。
Indicates the alignment of the paragraph.

Default Value:
  • "left"

autoSize number

テキストエリア内のスケール設定
Scale settings within text area

Default Value:
  • 0

border boolean

テキストフィールドに境界線があるかどうかを指定します。
Specifies whether the text field has a border.

Default Value:
  • false

bounds object

表示領域(バウンディングボックス)のObjectを返す
Returns the Object of the display area (bounding box)

color number

フォントの塗り色の設定
Font fill color setting

Default Value:
  • 0

defaultSymbol

font string

テキストのフォント設定
Text font settings

Default Value:
  • "sans-serif"

fontType number

テキストのフォントスタイルの設定
Set font style for text

Default Value:
  • 0

inputType string

入力モードの設定、入力不可(static)、入力可能(input)
Input mode setting, input disabled (static), input enabled (input)

Default Value:
  • "static"

leading number

行間の垂直の行送りを示す整数です。
An integer representing the amount
of vertical space (called leading) between lines.

Default Value:
  • 0

leftMargin number

段落の左インデントをピクセル単位で示します。
The left margin of the paragraph, in pixels.

Default Value:
  • 0

letterSpacing number

すべての文字の間に均等に配分されるスペースの量を表す数値です。
A object representing the amount
of space that is uniformly distributed between all characters.

Default Value:
  • 0

multiline boolean

フィールドが複数行テキストフィールドであるかどうかを示します。
Indicates whether field is a multiline text field.

Default Value:
  • true

originBounds object

登録時の表示領域(バウンディングボックス)のObjectを返す
Returns the Object of the display area (bounding box) at registration

rightMargin number

段落の右インデントをピクセル単位で示します。
The right margin of the paragraph, in pixels.

Default Value:
  • 0

scroll boolean

スクロール機能のon/off
Scroll function on/off

Default Value:
  • true

size number

テキストのフォントサイズ設定
Font size setting for text

Default Value:
  • 12

text string

テキストエリアに登録した文字情報
Text information registered in the text area

Default Value:
  • ""

thickness number

テキスト外枠の幅
Width of text border

Default Value:
  • 0

thicknessColor number

テキスト外枠の色設定
Color setting of text outer frame

Default Value:
  • 0

wordWrap boolean

テキストフィールドのテキストを折り返すかどうかを示すブール値です。
A Boolean value that indicates whether the text field has word wrap.

Default Value:
  • true

Methods

clone ()Video

TextFieldクラスを複製
Duplicate TextField class

Returns:
TypeDescription
Video

createInstance ()next2d.display.Shape

Next2DのDisplayObjectを生成
Generate Next2D DisplayObject

Returns:
TypeDescription
next2d.display.Shape

getBounds (matrix)object

表示領域(バウンディングボックス)のObjectを返す
Returns the Object of the display area (bounding box)

NameTypeDefaultDescription
matrixarraynulloptional
Returns:
TypeDescription
object

resize ()void

テキストエリアの状態変化による、表示領域を再取得
Re-acquisition of display area due to change of text area status

Returns:
TypeDescription
void

showController (place, name)void

このアイテムが設定されたDisplayObjectが選択された時
内部情報をコントローラーに表示する
When a DisplayObject with this item set is selected,
internal information is displayed on the controller.

NameTypeDefaultDescription
placeobject
namestring""optional
Returns:
TypeDescription
void

toImage (width, height, place, range, static_frame)HTMLImageElement

Next2DのBitmapDataクラスを経由してImageクラスを生成
Generate Image class via Next2D BitmapData class

NameTypeDefaultDescription
widthnumber
heightnumber
placeobject
rangeobjectnulloptional
static_framenumber0optional
Returns:
TypeDescription
HTMLImageElement

toObject ()object

クラス内の変数をObjectにして返す
Return variables in a class as Objects

Returns:
TypeDescription
object

toPublish ()object

書き出し用のObjectを返す
Returns an Object for export

Returns:
TypeDescription
object