JET

edu.utep.cs.jet.gui.editor
Class LineNumberedEditor

java.lang.Object
  extended by edu.utep.cs.jet.gui.editor.DefaultEditor
      extended by edu.utep.cs.jet.gui.editor.LineNumberedEditor
All Implemented Interfaces:
Editor

public class LineNumberedEditor
extends DefaultEditor

An editor that displays the line numbers. A separed panel associated with a text pane handles painting the line numbers.


Nested Class Summary
protected  class LineNumberedEditor.LineNumberPane
          A special panel attached to a text pane to display the line numbers.
 
Constructor Summary
LineNumberedEditor()
          Creates a new instance.
 
Method Summary
protected  JTextPane createTextPane(DefaultStyledDocument doc)
          Creates a new text pane for this editor.
 JComponent getView()
          Returns the view of this editor.
 
Methods inherited from class edu.utep.cs.jet.gui.editor.DefaultEditor
addFileChangeListener, addLineChangeListener, document, getCopy, getCut, getDelete, getFind, getGoto, getIcon, getOptionPanel, getPaste, getRedo, getUndo, highlight, highlight, isDirty, newDocument, openFile, saveFile, setDropTarget, setHideViewAction, setPopupOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineNumberedEditor

public LineNumberedEditor()
Creates a new instance.

Method Detail

getView

public JComponent getView()
Returns the view of this editor. This method is overridden here to return a view that displays line numbers.

Specified by:
getView in interface Editor
Overrides:
getView in class DefaultEditor

createTextPane

protected JTextPane createTextPane(DefaultStyledDocument doc)
Creates a new text pane for this editor. This method is overridden here to create a text pane that shows line numbers.

Overrides:
createTextPane in class DefaultEditor

JET

JET is Copyright (C) 2005-2008 by The University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.