examples.history
Class TextComponentDemo

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--examples.history.TextComponentDemo

public class TextComponentDemo
extends JFrame

*******************************************************

Title: Vemaxs VML Editor


Description:


Copyright: Copyright (c) 2002


Company: 5Freunde(Tanja Bellaire, Carsten Fritz,
Nadja Schemmert, Lothar Schulz, Daniel Thöne)

Author:
$author$
Version: 1.0

Inner Class Summary
 protected classTextComponentDemo.CaretListenerLabel
           
 protected classTextComponentDemo.MyDocumentListener
           
 protected classTextComponentDemo.MyUndoableEditListener
           
 (package private) classTextComponentDemo.RedoAction
           
 (package private) classTextComponentDemo.UndoAction
           

Field Summary
 (package private) Hashtableactions
           
 (package private) JTextAreachangeLog
           
 (package private) LimitedStyledDocumentlsd
           
 (package private) final static intMAX_CHARACTERS
           
 (package private) Stringnewline
           
 protected RedoActionredoAction
           
 (package private) JTextPanetextPane
           
 protected UndoManagerundo
           
 protected UndoActionundoAction
           

Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled, accessibleContext

Fields inherited from class java.awt.Frame
DEFAULT_CURSOR, CROSSHAIR_CURSOR, TEXT_CURSOR, WAIT_CURSOR, SW_RESIZE_CURSOR, SE_RESIZE_CURSOR, NW_RESIZE_CURSOR, NE_RESIZE_CURSOR, N_RESIZE_CURSOR, S_RESIZE_CURSOR, W_RESIZE_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, MOVE_CURSOR, NORMAL, ICONIFIED

Fields inherited from class java.awt.Component
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT

Constructor Summary
TextComponentDemo()
           

Method Summary
 protected voidaddKeymapBindings()
          *****************************************************
BITTE DOKUMENTIEREN!
 private voidcreateActionTable(JTextComponent textComponent)
          *****************************************************
BITTE DOKUMENTIEREN!
 protected JMenucreateEditMenu()
          *****************************************************
BITTE DOKUMENTIEREN!
 protected JMenucreateStyleMenu()
          *****************************************************
BITTE DOKUMENTIEREN!
 private ActiongetActionByName(String name)
          *****************************************************
BITTE DOKUMENTIEREN!
 protected SimpleAttributeSet[]initAttributes(int length)
          *****************************************************
BITTE DOKUMENTIEREN!
 protected voidinitDocument()
          *****************************************************
BITTE DOKUMENTIEREN!
 static voidmain(String[] args)
          *****************************************************
BITTE DOKUMENTIEREN!

Methods inherited from class javax.swing.JFrame
frameInit, createRootPane, processKeyEvent, processWindowEvent, setDefaultCloseOperation, getDefaultCloseOperation, update, setJMenuBar, getJMenuBar, isRootPaneCheckingEnabled, setRootPaneCheckingEnabled, addImpl, remove, setLayout, getRootPane, setRootPane, getContentPane, setContentPane, getLayeredPane, setLayeredPane, getGlassPane, setGlassPane, paramString, getAccessibleContext

Methods inherited from class java.awt.Frame
finalize, addNotify, getTitle, setTitle, getIconImage, setIconImage, getMenuBar, setMenuBar, isResizable, setResizable, setState, getState, remove, removeNotify, setCursor, getCursorType, getFrames

Methods inherited from class java.awt.Window
pack, show, hide, dispose, toFront, toBack, getToolkit, getWarningString, getLocale, getInputContext, setCursor, getOwner, getOwnedWindows, addWindowListener, removeWindowListener, getListeners, processEvent, getFocusOwner, postEvent, isShowing, applyResourceBundle, applyResourceBundle, getGraphicsConfiguration

Methods inherited from class java.awt.Container
getComponentCount, countComponents, getComponent, getComponents, getInsets, insets, add, add, add, add, add, remove, removeAll, getLayout, doLayout, layout, invalidate, validate, validateTree, setFont, getPreferredSize, preferredSize, getMinimumSize, minimumSize, getMaximumSize, getAlignmentX, getAlignmentY, paint, print, paintComponents, printComponents, addContainerListener, removeContainerListener, processContainerEvent, deliverEvent, getComponentAt, locate, getComponentAt, findComponentAt, findComponentAt, isAncestorOf, list, list

Methods inherited from class java.awt.Component
getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getTreeLock, isValid, isDisplayable, isVisible, isEnabled, setEnabled, enable, enable, disable, isDoubleBuffered, enableInputMethods, setVisible, show, getForeground, setForeground, getBackground, setBackground, getFont, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, reshape, setBounds, getX, getY, getWidth, getHeight, getBounds, getSize, getLocation, isOpaque, isLightweight, getGraphics, getFontMetrics, getCursor, paintAll, repaint, repaint, repaint, repaint, printAll, imageUpdate, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, contains, inside, contains, dispatchEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, addKeyListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getInputMethodRequests, enableEvents, disableEvents, coalesceEvents, processComponentEvent, processFocusEvent, processMouseEvent, processMouseMotionEvent, processInputMethodEvent, processHierarchyEvent, processHierarchyBoundsEvent, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, gotFocus, lostFocus, isFocusTraversable, requestFocus, transferFocus, nextFocus, hasFocus, add, toString, list, list, list, addPropertyChangeListener, removePropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, firePropertyChange, setComponentOrientation, getComponentOrientation

Methods inherited from class java.lang.Object
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait

Field Detail

actions

Hashtable actions

changeLog

JTextArea changeLog

lsd

LimitedStyledDocument lsd

MAX_CHARACTERS

final static int MAX_CHARACTERS

newline

String newline

redoAction

protected RedoAction redoAction

textPane

JTextPane textPane

undo

protected UndoManager undo

undoAction

protected UndoAction undoAction
Constructor Detail

TextComponentDemo

public TextComponentDemo()
Method Detail

addKeymapBindings

protected void addKeymapBindings()
*****************************************************
BITTE DOKUMENTIEREN!

createActionTable

private void createActionTable(JTextComponent textComponent)
*****************************************************
BITTE DOKUMENTIEREN!
Parameters:
textComponent BITTE DOKUMENTIEREN!

createEditMenu

protected JMenu createEditMenu()
*****************************************************
BITTE DOKUMENTIEREN!
Returns: BITTE DOKUMENTIEREN!

createStyleMenu

protected JMenu createStyleMenu()
*****************************************************
BITTE DOKUMENTIEREN!
Returns: BITTE DOKUMENTIEREN!

getActionByName

private Action getActionByName(String name)
*****************************************************
BITTE DOKUMENTIEREN!
Parameters:
name BITTE DOKUMENTIEREN!
Returns: BITTE DOKUMENTIEREN!

initAttributes

protected SimpleAttributeSet[] initAttributes(int length)
*****************************************************
BITTE DOKUMENTIEREN!
Parameters:
length BITTE DOKUMENTIEREN!
Returns: BITTE DOKUMENTIEREN!

initDocument

protected void initDocument()
*****************************************************
BITTE DOKUMENTIEREN!

main

public static void main(String[] args)
*****************************************************
BITTE DOKUMENTIEREN!
Parameters:
args BITTE DOKUMENTIEREN!

Association Links

to Class examples.history.TextComponentDemo.RedoAction

to Class examples.history.TextComponentDemo.UndoAction

to Class javax.swing.undo.UndoManager

to Class java.util.Hashtable

to Class javax.swing.JTextArea

to Class javax.swing.JTextPane

to Class examples.history.LimitedStyledDocument

to Class java.lang.String