Interface EditorInterface

    • Method Detail

      • addDocumentListener

        void addDocumentListener​(DocumentListener listener)
        Add document listener.
        Parameters:
        listener - listener
      • removeDocumentListener

        void removeDocumentListener​(DocumentListener listener)
        Remove document listener.
        Parameters:
        listener - listener
      • addCaretListener

        void addCaretListener​(CaretListener listener)
        Add caret listener.
        Parameters:
        listener - listener
      • removeCaretListener

        void removeCaretListener​(CaretListener listener)
        Remove caret listener.
        Parameters:
        listener - listener
      • accept

        boolean accept​(File file)
        If return true, this editor support this file type. Default implementation return true.
        Parameters:
        file - file to test
        Returns:
        if return true, this editor support this file type.
      • accept

        boolean accept​(Editor.EditorSyntaxConstant editorSyntaxConstant)
        If return true, this editor support the syntax type. Default implementation return true.
        Parameters:
        editorSyntaxConstant - syntaxe type to test
        Returns:
        if return true, this editor support this syntax type.
      • isModified

        boolean isModified()
        Indicate if current opened file has been modified.
        Returns:
        true if current file is modified
      • open

        boolean open​(File file)
        Replace the current edited file by file passed in argument.
        Parameters:
        file - the file to open
        Returns:
        true if file has been opened
      • saveAs

        boolean saveAs​(File file)
        Replace the current edited file by file passed in argument.
        Parameters:
        file - the file to open
        Returns:
        true if file has been saved and reopen with new name
      • getText

        String getText()
        Return the current content text of the editor as String.
        Returns:
        return the current content text of the editor as String
      • setText

        void setText​(String text)
        Set all text with text in argument.
        Parameters:
        text - test to set
      • cut

        void cut()
        Cut current editor selection into system clipboard.
      • copy

        void copy()
        Copy current current selection into system clipboard.
      • paste

        void paste()
        Paste current clicboard content into editor at caret position.
      • setEnabled

        void setEnabled​(boolean b)
        Enable/disable editor.
        Parameters:
        b - enable