jp.carabiner.treeeditor.js.model
クラス JSTreeNode

java.lang.Object
  上位を拡張 org.mozilla.javascript.ScriptableObject
      上位を拡張 jp.carabiner.treeeditor.js.model.JSTreeNode
すべての実装されたインタフェース:
Serializable, JSComponent<TreeNode>, JSContainer<TreeNode>, org.mozilla.javascript.ConstProperties, org.mozilla.javascript.debug.DebuggableObject, org.mozilla.javascript.Scriptable

public class JSTreeNode
extends org.mozilla.javascript.ScriptableObject
implements JSContainer<TreeNode>

ツリーノードです。

関連項目:
直列化された形式

入れ子のクラスの概要
static class JSTreeNode.FunctionWrapper<T extends org.mozilla.javascript.Scriptable>
          関数のラッパです。
 class JSTreeNode.JSChildTreeNodes
          子アイテムリストです。
 
インタフェース jp.carabiner.treeeditor.js.JSComponent から継承された入れ子のクラス/インタフェース
JSComponent.AttachContext<T>
 
フィールドの概要
 
クラス org.mozilla.javascript.ScriptableObject から継承されたフィールド
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
インタフェース org.mozilla.javascript.Scriptable から継承されたフィールド
NOT_FOUND
 
コンストラクタの概要
JSTreeNode(ToplevelObject owner, jp.carabiner.treeeditor.TreeEditorModel model, String text)
          構築します。
JSTreeNode(ToplevelObject owner, jp.carabiner.treeeditor.TreeEditorModel model, TreeNode treeNode)
          構築します。
 
メソッドの概要
 JSComponent<TreeNode> appendChild(JSComponent<TreeNode> node)
          子を追加します。
 Object get(String name, org.mozilla.javascript.Scriptable start)
           
 Object[] getAllIds()
           
 Color getBackground()
          背景色を取得します。
 JSChildNodes<JSComponent<TreeNode>> getChildNodes()
          子ノードのリストを取得します。
 String getClassName()
           
 JSColumn getColumn(int index)
          カラムを取得します。
 PropertySet getColumnProps()
          カラム用のプロパティセットを取得します。
 TreeNode getCore()
          コアオブジェクトを取得します。
 TreeNode getCoreForAttach(JSComponent.AttachContext<TreeNode> ctx)
          コアオブジェクトを取得します。
 TreeNode getCoreForDetach()
          コアオブジェクトを削除用に取得します。
 long getCreateTime()
          作成日時を取得します。
 Object getDefaultValue(Class<?> typeHint)
           
 InputStream getFileData()
          ファイルデータを取得します。
 long getFileLastModified()
          ファイルの最終更新時刻を取得します。
 String getFilename()
          ファイル名を取得します。
 Color getForeground()
          文字色を取得します。
 String getHtml()
           
 String getHTML()
           
 InputStream getImageData()
          画像データを取得します。
 String getImageFilename()
          画像ファイル名を取得します。
static String getMethodName(String prefix, String body)
          メソッド名を取得します。
 jp.carabiner.treeeditor.TreeEditorModel getModel()
          モデルを取得します。
 String getNodeType()
          ノードタイプを取得します。
 int getNumber()
          番号を取得します。
 jp.carabiner.treeeditor.op.CompositeOp getOwnerOp()
          操作オブジェクトを取得します。
 JSTreeNode getParentNode()
          親ノードを取得します。
 String getText()
          テキストを取得します。
 int getTopicType()
          トピックタイプを取得します。
 jp.carabiner.treeeditor.TreeEditorContext getTreeEditorContext()
          コンテキストを取得します。
 String getType()
          タイプを取得します。
 long getUpdateTime()
          更新日時を取得します。
 boolean has(String name, org.mozilla.javascript.Scriptable start)
           
 JSComponent<TreeNode> insertBefore(JSComponent<TreeNode> newNode, JSComponent<TreeNode> refNode)
          子ノードを挿入します。
 boolean isExpand()
          展開されているかどうかを判定します。
 boolean isPanelEditable()
          編集可能かどうかを判定します。
 boolean isSelected()
          選択されているかどうかを判定します。
 boolean isTextEditable()
          編集可能かどうかを判定します。
static int parseColor(Color color)
          色オブジェクトを解析し数値表現を取得します。
static int parseColor(org.mozilla.javascript.Scriptable color)
          色オブジェクトを解析し数値表現を取得します。
 JSComponent<TreeNode> removeChild(JSComponent<TreeNode> node)
          子を削除します。
 InputStream renderPNGImage(int preferredWidth, int preferredHeight)
          画像データを取得します。
 void setBackground(Color background)
          背景色を設定します。
 void setBackground(org.mozilla.javascript.Scriptable background)
          背景色を設定します。
 void setCreateTime(double time)
          作成日時を設定します。
 void setExpand(boolean expand)
          展開されているかどうかを設定します。
 void setFile(String filename, long lastModified, InputStream in)
          ファイルをノードに設定します。
 void setForeground(Color foreground)
          文字色を設定します。
 void setForeground(org.mozilla.javascript.Scriptable foreground)
          文字色を設定します。
 void setHtml(String html)
           
 void setHTML(String html)
           
 void setImage(String filename, InputStream in)
          画像をノードに設定します。
 void setNodeType(String nodeType)
          ノードタイプを設定します。
 void setPanelEditable(boolean editable)
          編集可能かどうかを設定します。
 void setSelected(boolean selected)
          選択されているかどうかを設定します。
 void setText(String text)
          テキストを設定します。
 void setTextEditable(boolean editable)
          編集可能かどうかを設定します。
 void setTopicType(int topicType)
          トピックタイプを設定します。
 void setUpdateTime(double time)
          更新日時を設定します。
static Color toColor(int color)
          色オブジェクトを生成します。
 
クラス org.mozilla.javascript.ScriptableObject から継承されたメソッド
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, hasInstance, hasProperty, hasProperty, isConst, isGetterOrSetter, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

JSTreeNode

public JSTreeNode(ToplevelObject owner,
                  jp.carabiner.treeeditor.TreeEditorModel model,
                  TreeNode treeNode)
構築します。

パラメータ:
owner - オーナー。nullは不可。
model - モデル。nullは不可。
treeNode - ツリーノード。nullは不可。

JSTreeNode

public JSTreeNode(ToplevelObject owner,
                  jp.carabiner.treeeditor.TreeEditorModel model,
                  String text)
構築します。

パラメータ:
owner - オーナー。nullは不可。
model - モデル。nullは不可。
text - テキスト。nullは不可。
メソッドの詳細

toColor

public static Color toColor(int color)
色オブジェクトを生成します。

パラメータ:
color - 色。未定義色も可。
戻り値:
色。未定義色の場合はnull。

parseColor

public static int parseColor(Color color)
色オブジェクトを解析し数値表現を取得します。

パラメータ:
color - 色。null可。
戻り値:
色の数値表現。

parseColor

public static int parseColor(org.mozilla.javascript.Scriptable color)
色オブジェクトを解析し数値表現を取得します。

パラメータ:
color - 色。null可。
戻り値:
色の数値表現。

getMethodName

public static String getMethodName(String prefix,
                                   String body)
メソッド名を取得します。

パラメータ:
prefix - プレフィックス。nullは不可。
body - 本体。nullは不可。
戻り値:
メソッド名。

getModel

public jp.carabiner.treeeditor.TreeEditorModel getModel()
モデルを取得します。

戻り値:
モデル。

getTreeEditorContext

public jp.carabiner.treeeditor.TreeEditorContext getTreeEditorContext()
コンテキストを取得します。

戻り値:
コンテキスト。

getColumnProps

public PropertySet getColumnProps()
カラム用のプロパティセットを取得します。

戻り値:
カラム用のプロパティセット。

getCore

public TreeNode getCore()
インタフェース JSComponent の記述:
コアオブジェクトを取得します。

定義:
インタフェース JSComponent<TreeNode> 内の getCore
戻り値:
コアオブジェクト。

getCoreForAttach

public TreeNode getCoreForAttach(JSComponent.AttachContext<TreeNode> ctx)
インタフェース JSComponent の記述:
コアオブジェクトを取得します。

定義:
インタフェース JSComponent<TreeNode> 内の getCoreForAttach
パラメータ:
ctx - コンテキスト。nullは不可。
戻り値:
コアオブジェクト。

getCoreForDetach

public TreeNode getCoreForDetach()
インタフェース JSComponent の記述:
コアオブジェクトを削除用に取得します。

定義:
インタフェース JSComponent<TreeNode> 内の getCoreForDetach
戻り値:
コアオブジェクト。

getType

public String getType()
インタフェース JSComponent の記述:
タイプを取得します。

定義:
インタフェース JSComponent<TreeNode> 内の getType
戻り値:
タイプ。基本的にはクラス名。

getParentNode

public JSTreeNode getParentNode()
インタフェース JSComponent の記述:
親ノードを取得します。

定義:
インタフェース JSComponent<TreeNode> 内の getParentNode
戻り値:
親ノード。

getText

public String getText()
テキストを取得します。

戻り値:
テキスト。

getHTML

public String getHTML()

getHtml

public String getHtml()

setHTML

public void setHTML(String html)
             throws IOException
例外:
IOException

setHtml

public void setHtml(String html)
             throws IOException
例外:
IOException

setText

public void setText(String text)
テキストを設定します。

パラメータ:
text - テキスト。

getNumber

public int getNumber()
番号を取得します。

戻り値:
番号。

isSelected

public boolean isSelected()
選択されているかどうかを判定します。

戻り値:
選択されているかどうか。

setSelected

public void setSelected(boolean selected)
選択されているかどうかを設定します。

パラメータ:
selected - 選択されているかどうか。

getUpdateTime

public long getUpdateTime()
更新日時を取得します。

戻り値:
更新日時。

setUpdateTime

public void setUpdateTime(double time)
更新日時を設定します。

パラメータ:
time - 更新日時。

getCreateTime

public long getCreateTime()
作成日時を取得します。

戻り値:
作成日時。

setCreateTime

public void setCreateTime(double time)
作成日時を設定します。

パラメータ:
time - 作成日時。

getNodeType

public String getNodeType()
ノードタイプを取得します。

戻り値:
ノードタイプ。

setNodeType

public void setNodeType(String nodeType)
ノードタイプを設定します。

パラメータ:
nodeType - ノードタイプ。nullは不可。

getTopicType

public int getTopicType()
トピックタイプを取得します。

戻り値:
トピックタイプ。定数についてはTreeEditorConstクラスを参照。
関連項目:
TreeEditorConst

setTopicType

public void setTopicType(int topicType)
トピックタイプを設定します。

パラメータ:
topicType - トピックタイプ。定数についてはTreeEditorConstクラスを参照。
関連項目:
TreeEditorConst

getForeground

public Color getForeground()
文字色を取得します。

戻り値:
文字色。未指定の場合はnull。

setForeground

public void setForeground(Color foreground)
文字色を設定します。

パラメータ:
foreground - 文字色。null可。

setForeground

public void setForeground(org.mozilla.javascript.Scriptable foreground)
文字色を設定します。

パラメータ:
foreground - 文字色。null可。

getBackground

public Color getBackground()
背景色を取得します。

戻り値:
背景色。未指定の場合はnull。

setBackground

public void setBackground(org.mozilla.javascript.Scriptable background)
背景色を設定します。

パラメータ:
background - 背景色。null可。

setBackground

public void setBackground(Color background)
背景色を設定します。

パラメータ:
background - 背景色。null可。

isExpand

public boolean isExpand()
展開されているかどうかを判定します。

戻り値:
展開されている場合はtrue。

setExpand

public void setExpand(boolean expand)
展開されているかどうかを設定します。

パラメータ:
expand - 展開されている場合はtrue。

appendChild

public JSComponent<TreeNode> appendChild(JSComponent<TreeNode> node)
子を追加します。

定義:
インタフェース JSContainer<TreeNode> 内の appendChild
パラメータ:
node - 追加する子ノード。nullは不可。
戻り値:
追加されたノード。

insertBefore

public JSComponent<TreeNode> insertBefore(JSComponent<TreeNode> newNode,
                                          JSComponent<TreeNode> refNode)
子ノードを挿入します。

定義:
インタフェース JSContainer<TreeNode> 内の insertBefore
パラメータ:
newNode - 追加するノード。nullは不可。
refNode - 挿入先を示すノード。末尾の場合はnull。
戻り値:
追加されたノード。

removeChild

public JSComponent<TreeNode> removeChild(JSComponent<TreeNode> node)
子を削除します。

定義:
インタフェース JSContainer<TreeNode> 内の removeChild
パラメータ:
node - 削除する子ノード。nullは不可。
戻り値:
追加されたノード。

getChildNodes

public JSChildNodes<JSComponent<TreeNode>> getChildNodes()
子ノードのリストを取得します。

定義:
インタフェース JSContainer<TreeNode> 内の getChildNodes
戻り値:
子ノードのリスト。

setImage

public void setImage(String filename,
                     InputStream in)
              throws IOException
画像をノードに設定します。

パラメータ:
filename - ファイル名。nullの場合は画像を削除する。
in - 画像ファイルのストリーム。nullが指定された場合は画像を削除する。
例外:
IOException - 入出力時のエラー。

getImageData

public InputStream getImageData()
                         throws IOException
画像データを取得します。

戻り値:
画像データ。画像が結びついていない場合はnull。
例外:
IOException - 入出力時のエラー。

getImageFilename

public String getImageFilename()
画像ファイル名を取得します。

戻り値:
画像ファイル名。画像が結びついていない場合はnull。
例外:
IOException - 入出力時のエラー。

renderPNGImage

public InputStream renderPNGImage(int preferredWidth,
                                  int preferredHeight)
                           throws IOException
画像データを取得します。データはPNG形式の画像ストリームです。

パラメータ:
preferredWidth - 推奨幅。
preferredHeight - 推奨高さ。
戻り値:
画像。
例外:
IOException - 入出力関係のエラー。

setFile

public void setFile(String filename,
                    long lastModified,
                    InputStream in)
             throws IOException
ファイルをノードに設定します。

パラメータ:
filename - ファイル名。nullの場合は画像を削除する。
lastModified - 最終更新時刻。
in - 画像ファイルのストリーム。nullが指定された場合は画像を削除する。
例外:
IOException - 入出力時のエラー。

getFileData

public InputStream getFileData()
                        throws IOException
ファイルデータを取得します。

戻り値:
ファイルデータ。ファイルが結びついていない場合はnull。
例外:
IOException - 入出力時のエラー。

getFilename

public String getFilename()
ファイル名を取得します。

戻り値:
ファイル名。ファイルが結びついていない場合はnull。
例外:
IOException - 入出力時のエラー。

getFileLastModified

public long getFileLastModified()
ファイルの最終更新時刻を取得します。

戻り値:
ファイルの最終更新時刻。

getColumn

public JSColumn getColumn(int index)
カラムを取得します。

パラメータ:
index - インデックス。
戻り値:
カラム。

isTextEditable

public boolean isTextEditable()
編集可能かどうかを判定します。

戻り値:
編集可能であればtrue。

setTextEditable

public void setTextEditable(boolean editable)
編集可能かどうかを設定します。

パラメータ:
editable - 編集可能な場合はtrue。

isPanelEditable

public boolean isPanelEditable()
編集可能かどうかを判定します。

戻り値:
編集可能であればtrue。

setPanelEditable

public void setPanelEditable(boolean editable)
編集可能かどうかを設定します。

パラメータ:
editable - 編集可能な場合はtrue。

getOwnerOp

public jp.carabiner.treeeditor.op.CompositeOp getOwnerOp()
操作オブジェクトを取得します。

戻り値:
操作オブジェクト。

getClassName

public String getClassName()
定義:
インタフェース org.mozilla.javascript.Scriptable 内の getClassName
定義:
クラス org.mozilla.javascript.ScriptableObject 内の getClassName

get

public Object get(String name,
                  org.mozilla.javascript.Scriptable start)
定義:
インタフェース org.mozilla.javascript.Scriptable 内の get
オーバーライド:
クラス org.mozilla.javascript.ScriptableObject 内の get

getAllIds

public Object[] getAllIds()
定義:
インタフェース org.mozilla.javascript.debug.DebuggableObject 内の getAllIds
オーバーライド:
クラス org.mozilla.javascript.ScriptableObject 内の getAllIds

has

public boolean has(String name,
                   org.mozilla.javascript.Scriptable start)
定義:
インタフェース org.mozilla.javascript.Scriptable 内の has
オーバーライド:
クラス org.mozilla.javascript.ScriptableObject 内の has

getDefaultValue

public Object getDefaultValue(Class<?> typeHint)
定義:
インタフェース org.mozilla.javascript.Scriptable 内の getDefaultValue
オーバーライド:
クラス org.mozilla.javascript.ScriptableObject 内の getDefaultValue