Class: BaseController

BaseController

コントローラーの各項目の共有クラス
Shared class for each item in the controller

new view.controller.BaseController (name)

NameTypeDefaultDescription
namestring""optional

Members

name string readonly

タイトル表示用の変数
Variables for title display

Default Value:
  • ""

Methods

clickTitle ()void

各項目の表示/非表示の処理
Show/Hide each item

Returns:
TypeDescription
void

executeFunction (name, value)*

Elementのid名をキャメルケースに変換して関数を実行
例) font-select => changeFontSelectがコールされる
valueはstringで渡すので、コール先の関数内で変換とバリデーションを行う必要がある

         DOMの場合は最後の文字列にIDが付与されるので、関数が存在しない時は最後の文字列を外す
         例) sound-volume-1 => changeSoundVolumeがコールされる

         Convert Element's id name to CamelCase and execute function
         e.g.) font-select => changeFontSelect is called
         Since value is passed as a string, conversion and validation must be performed in the calling function

         In the case of DOM, the ID is assigned to the last string, so if the function does not exist, remove the last string.
         e.g.) sound-volume-1 => changeSoundVolume is called
NameTypeDescription
namestring
valuestring | number | Event
Returns:
TypeDescription
*

finishInput (event, reload)void

Input入力終了時の処理関数
Processing function at the end of Input input

NameTypeDefaultDescription
eventEvent | KeyboardEvent
reloadbooleantrueoptional
Returns:
TypeDescription
void

focusIn (event)void

Inputにフォーカスされた時に変数を初期化する
Initialize variables when Input is focused

NameTypeDescription
eventEvent
Returns:
TypeDescription
void

focusOut ()void

Inputにフォーカス終了した時にロックを解放する
Release lock when focus ends on Input

Returns:
TypeDescription
void

initialize ()void

コントローラーの共通の初期起動関数
Common initial startup functions for controllers.

Returns:
TypeDescription
void

mouseDown (event)void

数値のInputElementの場合はマウスで値を変更可能
状態に合わせてカーソルや変数を初期化する
For numeric InputElement, values can be changed with the mouse
Initialize cursors and variables according to state

NameTypeDescription
eventMouseEvent
Returns:
TypeDescription
void

mouseMove (event)void

マウスで数値の加算減算を行う
Add and subtract numbers with the mouse

NameTypeDescription
eventMouseEvent
Returns:
TypeDescription
void

mouseOut (event)void

Inputが数値の場合マウス動作終了関数
Mouse operation end function if Input is numeric

NameTypeDescription
eventMouseEvent
Returns:
TypeDescription
void

mouseOver (event)void

Inputが数値の場合マウス動作で加算減算できればカーソルを変化させる
If Input is a number, the cursor is changed if it can be added and subtracted by mouse movement.

NameTypeDescription
eventMouseEvent
Returns:
TypeDescription
void

mouseUp ()void

マウスアップ処理、移動イベントなどを削除して初期化
Delete and initialize mouse-up process, move events, etc.

Returns:
TypeDescription
void

reloadScreen ()void

スクリーンエリアで変更があったElementを再描画
Redraw Element with changes in screen area

Returns:
TypeDescription
void

プロパティーの更新がある時はundo用にデータを内部保管する
Store data internally for undo when there are property updates

Returns:
TypeDescription
void

setChangeEvent (element)void

指定のelementにchangeイベントを登録する
Register a change event to the specified element.

NameTypeDescription
elementHTMLDivElement
Returns:
TypeDescription
void

setClickEvent (element)void

指定のelementにclickイベントを登録する
Register a click event to the specified element.

NameTypeDescription
elementHTMLDivElement
Returns:
TypeDescription
void

setInputEvent (element)void

Inputのelementに各種コントローラーで利用するイベントを登録
Register events used by various controllers in the element of Input

NameTypeDescription
elementHTMLDivElement
Returns:
TypeDescription
void