com.borland.primetime.editor
Class EditorActions.TabKeyAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--com.borland.primetime.editor.EditorAction
              |
              +--com.borland.primetime.editor.EditorActions.TabKeyAction
Enclosing class:
EditorActions

public static class EditorActions.TabKeyAction
extends EditorAction

Does one of three things:

  1. If EditorManager.isSmartTabs is true, places enough spaces on the the line to line up the next character typed with the next non-whitespace character on the previous non-blank line. If there is a selection, it is simply moved with the spaces.

    For example, if the caret was at position '1' in the code snippet below, it would end up at position '2'.

    
           boolean enableAdvancedNuclearHydrodyneDrive = false;
           boolean enableWarpCore                      = true;
           boolean enableFusionGun 1                   2
         
  2. If EditorManager.isUseTabCharacter is true, places a tab character into the document. If there is a selection, it is removed before the tab is added.
  3. If EditorManager.isUseTabCharacter is false, places enough space characters into the document to align with the next tabstop. If there is a selection, it is removed before the spaces are added.
EditorManager.isSmartTabs is checked first, so it overrides the EditorManager.isUseTabCharacter setting.

See Also:
Serialized Form

Inner classes inherited from class com.borland.primetime.editor.EditorAction
EditorAction.SubKeymapAction
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Constructor Summary
EditorActions.TabKeyAction(java.lang.String nm)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 
Methods inherited from class com.borland.primetime.editor.EditorAction
getEditorTarget, getFocusedEditor, setFocusedEditor
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorActions.TabKeyAction

public EditorActions.TabKeyAction(java.lang.String nm)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Overrides:
actionPerformed in class javax.swing.AbstractAction