Module ij

Class Editor

All Implemented Interfaces:
Debugger, MacroConstants, PlugIn, ClipboardOwner, ActionListener, FocusListener, ItemListener, KeyListener, MouseListener, TextListener, WindowListener, ImageObserver, MenuContainer, Serializable, Runnable, EventListener, Accessible

This is a simple TextArea based editor for editing and compiling plugins.
See Also:
  • Field Details

  • Constructor Details

    • Editor

      public Editor()
    • Editor

      public Editor(String name)
    • Editor

      public Editor(int rows, int columns, int fontSize, int options)
  • Method Details

    • positionWindow

      public void positionWindow()
    • create

      public void create(String name, String text)
    • createMacro

      public void createMacro(String name, String text)
    • setRejectMacrosMsg

      public void setRejectMacrosMsg(String msg)
    • getRejectMacrosMsg

      public String getRejectMacrosMsg()
    • open

      public void open(String dir, String name)
      Opens a file and replaces the text (if any) by the contents of the file.
    • getText

      public String getText()
    • getTextArea

      public TextArea getTextArea()
    • display

      public void display(String title, String text)
    • doInclude

      public static String doInclude(String code)
      Process optional #include statment at begining of macro.
    • evaluateScript

      public void evaluateScript(String ext)
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • openExample

      public static boolean openExample(String name)
      Opens an example from the Help/Examples menu and runs if "Autorun Exampes" is checked.
    • showMacroFunctions

      protected void showMacroFunctions()
    • textValueChanged

      public void textValueChanged(TextEvent e)
      Specified by:
      textValueChanged in interface TextListener
    • keyPressed

      public void keyPressed(KeyEvent e)
      Specified by:
      keyPressed in interface KeyListener
    • mousePressed

      public void mousePressed(MouseEvent e)
      Specified by:
      mousePressed in interface MouseListener
    • mouseExited

      public void mouseExited(MouseEvent e)
      Specified by:
      mouseExited in interface MouseListener
    • mouseEntered

      public void mouseEntered(MouseEvent e)
      Specified by:
      mouseEntered in interface MouseListener
    • mouseReleased

      public void mouseReleased(MouseEvent e)
      Specified by:
      mouseReleased in interface MouseListener
    • mouseClicked

      public void mouseClicked(MouseEvent e)
      Specified by:
      mouseClicked in interface MouseListener
    • keyReleased

      public void keyReleased(KeyEvent e)
      Specified by:
      keyReleased in interface KeyListener
    • insertText

      public void insertText(String text)
    • keyTyped

      public void keyTyped(KeyEvent e)
      Specified by:
      keyTyped in interface KeyListener
    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      Specified by:
      itemStateChanged in interface ItemListener
    • windowActivated

      public void windowActivated(WindowEvent e)
      Override windowActivated in PlugInFrame to prevent Mac menu bar from being installed.
      Specified by:
      windowActivated in interface WindowListener
      Overrides:
      windowActivated in class PlugInFrame
    • close

      public void close()
      Overrides close() in PlugInFrame.
      Overrides:
      close in class PlugInFrame
    • saveAs

      public void saveAs()
    • revert

      protected void revert()
    • updateClassName

      public void updateClassName(String oldName, String newName)
      Changes a plugins class name to reflect a new file name.
    • setFont

      public void setFont(Font font)
      Overrides:
      setFont in class Container
    • getFontSize

      public int getFontSize()
    • append

      public void append(String s)
    • setIsMacroWindow

      public void setIsMacroWindow(boolean mw)
    • setDefaultDirectory

      public static void setDefaultDirectory(String dir)
    • lostOwnership

      public void lostOwnership(Clipboard clip, Transferable cont)
      Specified by:
      lostOwnership in interface ClipboardOwner
    • debug

      public int debug(Interpreter interp, int mode)
      Specified by:
      debug in interface Debugger
    • getInstance

      public static Editor getInstance()
    • getJSPrefix

      public static String getJSPrefix(String arg)
    • fixLineEndings

      public void fixLineEndings()
      Changes Windows (CRLF) line separators to line feeds (LF).
    • showLogWindow

      public void showLogWindow()
    • fileChanged

      public boolean fileChanged()
    • run

      public void run()
      Downloads BeanShell or Jython interpreter using a separate thread.
      Specified by:
      run in interface Runnable