Package com.jidesoft.editor

Examples of com.jidesoft.editor.CodeEditor


   *
   * @param content
   * @return
   */
  public static CodeEditor getCodeEditor(String content) {
    CodeEditor code = new CodeEditor();
    code.setVirtualSpaceAllowed(false);
    code.setLineHighlight(true);
    code.setText(content);
    return code;
  }
View Full Code Here


    final JPanel j = new JPanel(new BorderLayout());
    j.add(f.getPanel(true), BorderLayout.NORTH);

    // add code
    final CodeEditor code = JRubyPlugin.getCodeEditor(content);
    code.addKeyListener(new KeyListener() {

      @Override
      public void keyTyped(final KeyEvent arg0) {}

      @Override
      public void keyReleased(final KeyEvent e) {
        // wrong keys?
        if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_DOWN
            || e.getKeyCode() == KeyEvent.VK_RIGHT) {
          return;
        }

        if (!modified) {
          modified = true;
        }

        content = code.getText();
      }

      @Override
      public void keyPressed(final KeyEvent arg0) {}
    });
View Full Code Here

TOP

Related Classes of com.jidesoft.editor.CodeEditor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.