jp.sourceforge.gtibuilder.editor
インタフェース EditorComponent

すべてのスーパーインタフェース:
ProjectFile
既知の実装クラスの一覧:
HTMLEditor, ImageViewer, TextEditor

public interface EditorComponent
extends ProjectFile

全てのエディタはこのインターフェイスを実装しなければなりません。


フィールドの概要
 
インタフェース jp.sourceforge.gtibuilder.main.ProjectFile から継承したフィールド
DIRECTORY, EDITOR, GBFILE, NAME, PROJECT
 
メソッドの概要
 Component getComponent()
          クラスEditorの中に表示されるコンポーネントを返します。
 Dialog getFilePreference()
          ファイルの設定ダイアログを返します。
 NewPanel getNewFilePropertyPane()
          ファイルを新たに作成する場合の設定ダイアログを返します。
 Component getPrintComponent()
          印刷されるコンポーネントを返します。
 FileType[] getSupportedTypes()
          このエディターでサポートされているファイルタイプの配列を返します。
 void init(StringArray map, FileType type)
          StringArrayとFileTypeからEditorを初期化します。
 boolean isSupportedType(FileType ft)
          このファイルタイプの閲覧もしくは編集がこのエディタでサポートされているかを返します。
 boolean readData(byte[] data)
          バイト配列からデータを読み込みます。
 void save()
          ファイルをGBFileに保存します。
 void setEditor(Editor editor)
          Editorに収納されたときにそのエディターが渡されます。
 
インタフェース jp.sourceforge.gtibuilder.main.ProjectFile から継承したメソッド
addEditorUpdataListener, compiled, copy, cut, delete, getFile, getFileType, isAutoCheckProperty, isCompiled, isEdited, paste, redo, removeEditorUpdataListener, saved, setFile, setFileType, undo, usingEditMenu, usingMenu
 

メソッドの詳細

getNewFilePropertyPane

public NewPanel getNewFilePropertyPane()
ファイルを新たに作成する場合の設定ダイアログを返します。


getSupportedTypes

public FileType[] getSupportedTypes()
このエディターでサポートされているファイルタイプの配列を返します。


isSupportedType

public boolean isSupportedType(FileType ft)
このファイルタイプの閲覧もしくは編集がこのエディタでサポートされているかを返します。


getComponent

public Component getComponent()
クラスEditorの中に表示されるコンポーネントを返します。 例えばTextEditorを作りたい場合はJTextPaneが収納されたJScrollPaneを返します。


getPrintComponent

public Component getPrintComponent()
印刷されるコンポーネントを返します。 例えばTextEditorを作りたい場合はJTextPaneを返します。


getFilePreference

public Dialog getFilePreference()
ファイルの設定ダイアログを返します。


init

public void init(StringArray map,
                 FileType type)
StringArrayとFileTypeからEditorを初期化します。


setEditor

public void setEditor(Editor editor)
Editorに収納されたときにそのエディターが渡されます。


save

public void save()
ファイルをGBFileに保存します。


readData

public boolean readData(byte[] data)
バイト配列からデータを読み込みます。

パラメータ:
data - 読み込むデータ
戻り値:
成功するとtrue