com.intel.gui.editors.text
Class TextEditor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.intel.gui.editors.text.TextEditor
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

Deprecated. Since 1.4.2

public class TextEditor
extends javax.swing.JPanel

A simple text editor with file loading and sacing and undo mechanism

Version:
$Id$
Author:
Ralf Ratering
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  com.intel.gui.editors.text.TextEditor.CopyAction copyAction
          Deprecated. copy text
protected  javax.swing.JMenuItem copyItem
          Deprecated. edit menu entries
protected  com.intel.gui.editors.text.TextEditor.CutAction cutAction
          Deprecated. cut text
protected  javax.swing.JMenuItem cutItem
          Deprecated. edit menu entries
protected  java.io.File file
          Deprecated. file to edit
protected  javax.swing.JFileChooser fileChooser
          Deprecated. standard file chooser
protected  java.util.Vector fileFilters
          Deprecated. list of file filters
protected static java.util.logging.Logger logger
          Deprecated. java logger
protected  javax.swing.JMenuBar menubar
          Deprecated.  
protected  com.intel.gui.editors.text.TextEditor.NewAction newAction
          Deprecated. new file
protected  javax.swing.JMenuItem newItem
          Deprecated. file menu entries
protected  com.intel.gui.editors.text.TextEditor.OpenAction openAction
          Deprecated. open file
protected  javax.swing.JMenuItem openItem
          Deprecated. file menu entries
protected  com.intel.gui.editors.text.TextEditor.PasteAction pasteAction
          Deprecated. paste text
protected  javax.swing.JMenuItem pasteItem
          Deprecated. edit menu entries
protected  com.intel.gui.editors.text.TextEditor.RedoAction redoAction
          Deprecated. redo
protected  javax.swing.JMenuItem redoItem
          Deprecated. edit menu entries
protected  com.intel.gui.editors.text.TextEditor.SaveAction saveAction
          Deprecated. save file
protected  com.intel.gui.editors.text.TextEditor.SaveAction saveAsAction
          Deprecated. save file as
protected  javax.swing.JMenuItem saveAsItem
          Deprecated. file menu entries
protected  javax.swing.JMenuItem saveItem
          Deprecated. file menu entries
protected  javax.swing.filechooser.FileFilter selectedFileFilter
          Deprecated. current file filter
protected  javax.swing.JTextArea textArea
          Deprecated. edit area
protected  javax.swing.undo.UndoManager undo
          Deprecated. UndoManager that we add edits to.
protected  com.intel.gui.editors.text.TextEditor.UndoAction undoAction
          Deprecated. undo
protected  javax.swing.event.UndoableEditListener undoHandler
          Deprecated. Listener for the edits on the current document.
protected  javax.swing.JMenuItem undoItem
          Deprecated. edit menu entries
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TextEditor()
          Deprecated. Constructor
 
Method Summary
 void addFileFilter(javax.swing.filechooser.FileFilter filter)
          Deprecated. add a file filter to file chooser list
protected  void buildActions()
          Deprecated. build actions
protected  javax.swing.JMenuBar buildMenubar()
          Deprecated. build menu bar
protected  javax.swing.text.JTextComponent getEditor()
          Deprecated. Fetch the editor contained in this panel
 java.awt.Font getEditorFont()
          Deprecated. get editor font
 java.io.File getFile()
          Deprecated. get file
protected  java.awt.Frame getFrame()
          Deprecated. Find the hosting frame, for the file-chooser dialog.
 boolean getLineWrap()
          Deprecated. lien wrap on?
protected  java.lang.String getStatusMessage()
          Deprecated. get status message
 java.lang.String getText()
          Deprecated. get current editor contents
protected  void initMenuItem(javax.swing.JMenuItem item, javax.swing.Action action)
          Deprecated. Helper method initializes menu items
protected  void initMenuItem(javax.swing.JMenuItem item, javax.swing.Action action, int keyCode)
          Deprecated. Helper method initializing menu item including a CTRL-Shortcut
 void load()
          Deprecated. Load current file into editor
static void main(java.lang.String[] args)
          Deprecated. a simple test main
 void removeFileFilter(javax.swing.filechooser.FileFilter filter)
          Deprecated. remove a file filter from file chooser
protected  void resetUndoManager()
          Deprecated. Resets the undo manager.
 void save()
          Deprecated. Save current editor contents to current file
 void setEditorFont(java.awt.Font font)
          Deprecated. set editor font
 void setEnabled(boolean enabled)
          Deprecated.  
 void setFile(java.io.File file)
          Deprecated. Set the file
 void setFileFilter(javax.swing.filechooser.FileFilter selectedFileFilter)
          Deprecated. Set current file filter
 void setLineWrap(boolean wrap)
          Deprecated. Line wrapping on?
protected  void setStatusMessage(java.lang.String message)
          Deprecated. Set status message
 void setText(java.lang.String text)
          Deprecated. Set editor contents
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static java.util.logging.Logger logger
Deprecated. 
java logger


copyAction

protected com.intel.gui.editors.text.TextEditor.CopyAction copyAction
Deprecated. 
copy text


cutAction

protected com.intel.gui.editors.text.TextEditor.CutAction cutAction
Deprecated. 
cut text


cutItem

protected javax.swing.JMenuItem cutItem
Deprecated. 
edit menu entries


copyItem

protected javax.swing.JMenuItem copyItem
Deprecated. 
edit menu entries


pasteItem

protected javax.swing.JMenuItem pasteItem
Deprecated. 
edit menu entries


undoItem

protected javax.swing.JMenuItem undoItem
Deprecated. 
edit menu entries


redoItem

protected javax.swing.JMenuItem redoItem
Deprecated. 
edit menu entries


file

protected java.io.File file
Deprecated. 
file to edit


fileChooser

protected javax.swing.JFileChooser fileChooser
Deprecated. 
standard file chooser


fileFilters

protected java.util.Vector fileFilters
Deprecated. 
list of file filters


newAction

protected com.intel.gui.editors.text.TextEditor.NewAction newAction
Deprecated. 
new file


newItem

protected javax.swing.JMenuItem newItem
Deprecated. 
file menu entries


openItem

protected javax.swing.JMenuItem openItem
Deprecated. 
file menu entries


saveItem

protected javax.swing.JMenuItem saveItem
Deprecated. 
file menu entries


saveAsItem

protected javax.swing.JMenuItem saveAsItem
Deprecated. 
file menu entries


openAction

protected com.intel.gui.editors.text.TextEditor.OpenAction openAction
Deprecated. 
open file


pasteAction

protected com.intel.gui.editors.text.TextEditor.PasteAction pasteAction
Deprecated. 
paste text


redoAction

protected com.intel.gui.editors.text.TextEditor.RedoAction redoAction
Deprecated. 
redo


saveAction

protected com.intel.gui.editors.text.TextEditor.SaveAction saveAction
Deprecated. 
save file


saveAsAction

protected com.intel.gui.editors.text.TextEditor.SaveAction saveAsAction
Deprecated. 
save file as


selectedFileFilter

protected javax.swing.filechooser.FileFilter selectedFileFilter
Deprecated. 
current file filter


textArea

protected javax.swing.JTextArea textArea
Deprecated. 
edit area


menubar

protected javax.swing.JMenuBar menubar
Deprecated. 

undo

protected javax.swing.undo.UndoManager undo
Deprecated. 
UndoManager that we add edits to.


undoAction

protected com.intel.gui.editors.text.TextEditor.UndoAction undoAction
Deprecated. 
undo


undoHandler

protected javax.swing.event.UndoableEditListener undoHandler
Deprecated. 
Listener for the edits on the current document.

Constructor Detail

TextEditor

public TextEditor()
Deprecated. 
Constructor

Method Detail

save

public void save()
Deprecated. 
Save current editor contents to current file


load

public void load()
Deprecated. 
Load current file into editor


addFileFilter

public void addFileFilter(javax.swing.filechooser.FileFilter filter)
Deprecated. 
add a file filter to file chooser list

Parameters:
filter - a new file filter

buildActions

protected void buildActions()
Deprecated. 
build actions


buildMenubar

protected javax.swing.JMenuBar buildMenubar()
Deprecated. 
build menu bar

Returns:
menu bar

getEditor

protected javax.swing.text.JTextComponent getEditor()
Deprecated. 
Fetch the editor contained in this panel

Returns:
edit area

getEditorFont

public java.awt.Font getEditorFont()
Deprecated. 
get editor font

Returns:
editor font

getFile

public java.io.File getFile()
Deprecated. 
get file

Returns:
file

getFrame

protected java.awt.Frame getFrame()
Deprecated. 
Find the hosting frame, for the file-chooser dialog.

Returns:
parent frame

getLineWrap

public boolean getLineWrap()
Deprecated. 
lien wrap on?

Returns:
true, if yes

getStatusMessage

protected java.lang.String getStatusMessage()
Deprecated. 
get status message

Returns:
status message

getText

public java.lang.String getText()
Deprecated. 
get current editor contents

Returns:
text string

initMenuItem

protected void initMenuItem(javax.swing.JMenuItem item,
                            javax.swing.Action action)
Deprecated. 
Helper method initializes menu items

Parameters:
item -
action -

initMenuItem

protected void initMenuItem(javax.swing.JMenuItem item,
                            javax.swing.Action action,
                            int keyCode)
Deprecated. 
Helper method initializing menu item including a CTRL-Shortcut

Parameters:
item -
keyCode -
action -

removeFileFilter

public void removeFileFilter(javax.swing.filechooser.FileFilter filter)
Deprecated. 
remove a file filter from file chooser

Parameters:
filter - file filter

resetUndoManager

protected void resetUndoManager()
Deprecated. 
Resets the undo manager.


setEditorFont

public void setEditorFont(java.awt.Font font)
Deprecated. 
set editor font

Parameters:
font - editor font

setFile

public void setFile(java.io.File file)
Deprecated. 
Set the file

Parameters:
file - file to edit

setFileFilter

public void setFileFilter(javax.swing.filechooser.FileFilter selectedFileFilter)
Deprecated. 
Set current file filter

Parameters:
selectedFileFilter - file filter

setLineWrap

public void setLineWrap(boolean wrap)
Deprecated. 
Line wrapping on?

Parameters:
wrap - true, if yes

setStatusMessage

protected void setStatusMessage(java.lang.String message)
Deprecated. 
Set status message

Parameters:
message - status message

setText

public void setText(java.lang.String text)
Deprecated. 
Set editor contents

Parameters:
text - new text

main

public static void main(java.lang.String[] args)
Deprecated. 
a simple test main

Parameters:
args - The command line arguments

setEnabled

public void setEnabled(boolean enabled)
Deprecated. 
Overrides:
setEnabled in class javax.swing.JComponent


Copyright © 2008. All Rights Reserved.