gate.util
Class RawEditorKit

java.lang.Object
  |
  +--javax.swing.text.EditorKit
        |
        +--javax.swing.text.DefaultEditorKit
              |
              +--javax.swing.text.StyledEditorKit
                    |
                    +--gate.util.RawEditorKit
All Implemented Interfaces:
Cloneable, Serializable

public class RawEditorKit
extends StyledEditorKit

This class provides an editor kit that does not change \n\r to \n but instead it leaves the original text as is. Needed for GUI components

See Also:
Serialized Form

Inner classes inherited from class javax.swing.text.StyledEditorKit
StyledEditorKit.AlignmentAction, StyledEditorKit.AttributeTracker, StyledEditorKit.BoldAction, StyledEditorKit.FontFamilyAction, StyledEditorKit.FontSizeAction, StyledEditorKit.ForegroundAction, StyledEditorKit.ItalicAction, StyledEditorKit.StyledTextAction, StyledEditorKit.StyledViewFactory, StyledEditorKit.UnderlineAction
 
Inner classes inherited from class javax.swing.text.DefaultEditorKit
DefaultEditorKit.BeepAction, DefaultEditorKit.BeginAction, DefaultEditorKit.BeginLineAction, DefaultEditorKit.BeginParagraphAction, DefaultEditorKit.BeginWordAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.DeleteNextCharAction, DefaultEditorKit.DeletePrevCharAction, DefaultEditorKit.DumpModelAction, DefaultEditorKit.EndAction, DefaultEditorKit.EndLineAction, DefaultEditorKit.EndParagraphAction, DefaultEditorKit.EndWordAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.NextVisualPositionAction, DefaultEditorKit.NextWordAction, DefaultEditorKit.PageAction, DefaultEditorKit.PageDownAction, DefaultEditorKit.PageUpAction, DefaultEditorKit.PasteAction, DefaultEditorKit.PreviousWordAction, DefaultEditorKit.ReadOnlyAction, DefaultEditorKit.SelectAllAction, DefaultEditorKit.SelectLineAction, DefaultEditorKit.SelectParagraphAction, DefaultEditorKit.SelectWordAction, DefaultEditorKit.ToggleComponentOrientationAction, DefaultEditorKit.UnselectAction, DefaultEditorKit.WritableAction
 
Field Summary
private static boolean DEBUG
          Debug flag
 
Fields inherited from class javax.swing.text.StyledEditorKit
currentParagraph, currentRun, defaultActions, defaultFactory, inputAttributes, inputAttributeUpdater
 
Fields inherited from class javax.swing.text.DefaultEditorKit
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deletePrevCharAction, downAction, endAction, endLineAction, EndOfLineStringProperty, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPageDownAction, selectionPageLeftAction, selectionPageRightAction, selectionPageUpAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, toggleComponentOrientationAction, unselectAction, upAction, writableAction
 
Constructor Summary
RawEditorKit()
           
 
Method Summary
 void read(Reader in, Document doc, int pos)
          Inserts content from the given stream, which will be treated as plain text.
 
Methods inherited from class javax.swing.text.StyledEditorKit
, clone, createDefaultDocument, createInputAttributes, deinstall, getActions, getCharacterAttributeRun, getInputAttributes, getViewFactory, install
 
Methods inherited from class javax.swing.text.DefaultEditorKit
createCaret, getContentType, read, write, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
Debug flag
Constructor Detail

RawEditorKit

public RawEditorKit()
Method Detail

read

public void read(Reader in,
                 Document doc,
                 int pos)
          throws IOException,
                 BadLocationException
Inserts content from the given stream, which will be treated as plain text. This insertion is done without checking \r or \r \n sequence. It takes the text from the Reader and place it into Document at position pos
Overrides:
read in class DefaultEditorKit