Java JTextArea fixTabKeys(JTextArea textArea)

Here you can find the source of fixTabKeys(JTextArea textArea)

Description

fix Tab Keys

License

Open Source License

Declaration

public static JTextArea fixTabKeys(JTextArea textArea) 

Method Source Code


//package com.java2s;
/*/*from ww  w.j a  v  a  2s.c o m*/
(C) 2007 Stefan Reich (jazz@drjava.de)
This source file is part of Project Prophecy.
For up-to-date information, see http://www.drjava.de/prophecy
    
This source file is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, version 2.1.
*/

import javax.swing.*;

public class Main {
    public static JTextArea fixTabKeys(JTextArea textArea) {
        /*
        Action nextFocusAction = new AbstractAction("Move Focus Forwards") {
        public void actionPerformed(ActionEvent evt) {
        ((Component)evt.getSource()).transferFocus();
        }
        };
        Action prevFocusAction = new AbstractAction("Move Focus Backwards") {
        public void actionPerformed(ActionEvent evt) {
        ((Component)evt.getSource()).transferFocusBackward();
        }
        };
        textArea.getActionMap().put(nextFocusAction.getValue(Action.NAME), nextFocusAction);
        textArea.getActionMap().put(prevFocusAction.getValue(Action.NAME), prevFocusAction);
         */

        /*textArea.addKeyListener(new KeyListener() {
          public void keyTyped(KeyEvent e) {
        if (e.getKeyCode() == e.VK_TAB) {
          System.out.println("Tab pressed");
        }
          }
            
          public void keyPressed(KeyEvent e) {
        //To change body of implemented methods use File | Settings | File Templates.
          }
            
          public void keyReleased(KeyEvent e) {
        //To change body of implemented methods use File | Settings | File Templates.
          }
        });*/
        //TODO
        return textArea;
    }
}

Related

  1. commentSQL(JTextArea scriptPanel, String commentCharacter)
  2. copyFontAndMargins(final JTextArea target, final JComponent source)
  3. createTabArea(JTextArea area, int width)
  4. display(JTextArea txtOutput, String text)
  5. estimatedRows(JTextArea text)
  6. getAreaValue(JTextArea ta)
  7. getTextAreaScrollPaneContainer(JTextArea textArea, int nbLines)
  8. getTextDimension(JTextArea textArea, Dimension maxDimension)
  9. initLogConsole(final JTextArea textArea)