jp.sourceforge.gtibuilder.editor
クラス Editor

java.lang.Object
  拡張java.awt.Component
      拡張java.awt.Container
          拡張javax.swing.JComponent
              拡張javax.swing.JInternalFrame
                  拡張jp.sourceforge.gtibuilder.editor.Editor
すべての実装インタフェース:
Accessible, ImageObserver, MenuContainer, ProjectFile, RootPaneContainer, Serializable, WindowConstants

public class Editor
extends JInternalFrame
implements ProjectFile

このクラスはDesktopPaneに表示されるInternalFrameとなります。
全てのエディタはこのクラスに収納されこのクラスよりいくつかのイベントが渡されます。
このクラスに収納されるエディタは全てEditorComponentを実装しなければなりません。

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

入れ子クラスの概要
private  class Editor.Listener
           
 
クラス javax.swing.JInternalFrame から継承した入れ子クラス
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon
 
クラス javax.swing.JComponent から継承した入れ子クラス
JComponent.AccessibleJComponent
 
クラス java.awt.Container から継承した入れ子クラス
Container.AccessibleAWTContainer
 
クラス java.awt.Component から継承した入れ子クラス
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
フィールドの概要
private  EditorComponent ecomp
           
private  EditorUpdataManager eumanager
           
private  StringArray infomation
           
private  Project project
           
private  Timer timer
           
 
クラス javax.swing.JInternalFrame から継承したフィールド
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
 
クラス javax.swing.JComponent から継承したフィールド
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
クラス java.awt.Container から継承したフィールド
 
クラス java.awt.Component から継承したフィールド
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
インタフェース jp.sourceforge.gtibuilder.main.ProjectFile から継承したフィールド
DIRECTORY, EDITOR, GBFILE, NAME, PROJECT
 
インタフェース javax.swing.WindowConstants から継承したフィールド
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
インタフェース java.awt.image.ImageObserver から継承したフィールド
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
コンストラクタの概要
Editor(EditorComponent ecompx, Project proj)
          このクラスをEditorComponentをエディタとして初期化します。
 
メソッドの概要
 void addEditorUpdataListener(EditorUpdataListener listener)
          このファイルの名前もしくはディレクトリ名が変更されたことを通知するリスナーを追加します。
 void compiled()
          このファイルがコンパイルされたことを通知します。
 void copy()
          エディタにCopyを要求します。
 void cut()
          エディタにCutを要求します。
 void delete()
          エディタにDeleteを要求します。
 EditorComponent getEditorComponent()
          このエディタに収納されているEditorComponentを返します。
 GBFile getFile()
          GBFileを返します。
 FileType getFileType()
          FileTypeを登録されたエディタからかえします。
 String getInfomation(String key)
          このエディタに記憶させているデータを読み出します。
protected  void init(EditorComponent ecompx)
          このクラスをEditorComponentをエディタとして初期化します。
 boolean isAutoCheckProperty()
          DirectoryとFile Nameを自動的にチェックするかをかえします。
 boolean isCompiled()
          このファイルがコンパイルされているかどうかを返します。
 boolean isEdited()
          このファイルが変更されたどうかを返します
 void paste()
          エディタにPasteを要求します。
 boolean readData(byte[] data)
          byte配列を登録されたエディタに渡します。
 void redo()
          エディタにRedoを要求します。
 void removeEditorUpdataListener(EditorUpdataListener listener)
          このファイルの名前もしくはディレクトリ名が変更されたことを通知するリスナーを削除します。
 void saved()
          エディタに保存されたことを通知します。
 void setFile(GBFile file)
          GBFileを設定します。
 boolean setFileType(FileType ft)
          FileTypeを登録されたエディタに渡します。
 void setInfomation(String key, String value)
          このエディタにデータを記憶させます。
 void showFilePreference()
          このファイルの設定を表示します
 void undo()
          エディタにUndoを要求します。
 boolean usingEditMenu()
          編集メニューを使うかどうかをかえします。
 JMenuItem[] usingMenu()
          エディタ独自のメニューをかえします。
 
クラス javax.swing.JInternalFrame から継承したメソッド
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
 
クラス javax.swing.JComponent から継承したメソッド
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
クラス java.awt.Container から継承したメソッド
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
クラス java.awt.Component から継承したメソッド
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

ecomp

private EditorComponent ecomp

timer

private Timer timer

eumanager

private EditorUpdataManager eumanager

project

private Project project

infomation

private StringArray infomation
コンストラクタの詳細

Editor

public Editor(EditorComponent ecompx,
              Project proj)
このクラスをEditorComponentをエディタとして初期化します。

メソッドの詳細

init

protected final void init(EditorComponent ecompx)
このクラスをEditorComponentをエディタとして初期化します。


readData

public boolean readData(byte[] data)
byte配列を登録されたエディタに渡します。失敗するとfalseをかえします。


getFileType

public FileType getFileType()
FileTypeを登録されたエディタからかえします。

定義:
インタフェース ProjectFile 内の getFileType
戻り値:
ファイルタイプ

setFileType

public boolean setFileType(FileType ft)
FileTypeを登録されたエディタに渡します。 このときエディタがサポートしているかを確認ししていなければfalseをかえします。

定義:
インタフェース ProjectFile 内の setFileType
パラメータ:
ft - 指定するファイルタイプ
戻り値:
成功するとtrue

isAutoCheckProperty

public boolean isAutoCheckProperty()
DirectoryとFile Nameを自動的にチェックするかをかえします。 主にJavaのソースコードに使われます。

定義:
インタフェース ProjectFile 内の isAutoCheckProperty
戻り値:
対応していればtrue

setInfomation

public void setInfomation(String key,
                          String value)
このエディタにデータを記憶させます。


getInfomation

public String getInfomation(String key)
このエディタに記憶させているデータを読み出します。


getEditorComponent

public EditorComponent getEditorComponent()
このエディタに収納されているEditorComponentを返します。


usingMenu

public JMenuItem[] usingMenu()
エディタ独自のメニューをかえします。

定義:
インタフェース ProjectFile 内の usingMenu
戻り値:
独自のメニュー

usingEditMenu

public boolean usingEditMenu()
編集メニューを使うかどうかをかえします。

定義:
インタフェース ProjectFile 内の usingEditMenu
戻り値:
使うときはtrue

copy

public void copy()
エディタにCopyを要求します。

定義:
インタフェース ProjectFile 内の copy

cut

public void cut()
エディタにCutを要求します。

定義:
インタフェース ProjectFile 内の cut

delete

public void delete()
エディタにDeleteを要求します。

定義:
インタフェース ProjectFile 内の delete

paste

public void paste()
エディタにPasteを要求します。

定義:
インタフェース ProjectFile 内の paste

undo

public void undo()
エディタにUndoを要求します。

定義:
インタフェース ProjectFile 内の undo

redo

public void redo()
エディタにRedoを要求します。

定義:
インタフェース ProjectFile 内の redo

saved

public void saved()
エディタに保存されたことを通知します。

定義:
インタフェース ProjectFile 内の saved

showFilePreference

public void showFilePreference()
このファイルの設定を表示します


compiled

public void compiled()
このファイルがコンパイルされたことを通知します。 この通知が関係するのはJava Sourceのみです。

定義:
インタフェース ProjectFile 内の compiled

isCompiled

public boolean isCompiled()
このファイルがコンパイルされているかどうかを返します。 この通知が関係するのはJava Sourceのみです。

定義:
インタフェース ProjectFile 内の isCompiled
戻り値:
コンパイル済みならばtrue

isEdited

public boolean isEdited()
このファイルが変更されたどうかを返します

定義:
インタフェース ProjectFile 内の isEdited
戻り値:
変更があった場合true

addEditorUpdataListener

public void addEditorUpdataListener(EditorUpdataListener listener)
このファイルの名前もしくはディレクトリ名が変更されたことを通知するリスナーを追加します。

定義:
インタフェース ProjectFile 内の addEditorUpdataListener
パラメータ:
listener - 追加するリスナー

removeEditorUpdataListener

public void removeEditorUpdataListener(EditorUpdataListener listener)
このファイルの名前もしくはディレクトリ名が変更されたことを通知するリスナーを削除します。

定義:
インタフェース ProjectFile 内の removeEditorUpdataListener
パラメータ:
listener - 削除するリスナー

getFile

public GBFile getFile()
インタフェース ProjectFile の記述:
GBFileを返します。

定義:
インタフェース ProjectFile 内の getFile
戻り値:
このエディタを保持するGBFile

setFile

public void setFile(GBFile file)
インタフェース ProjectFile の記述:
GBFileを設定します。

定義:
インタフェース ProjectFile 内の setFile
パラメータ:
file - このエディタを関連づけるGBFile