Groovy 1.8.4

groovy.ui.text
[Java] Class TextEditor

java.lang.Object
  java.awt.Component
      java.awt.Container
          javax.swing.JComponent
              javax.swing.text.JTextComponent
                  javax.swing.JEditorPane
                      javax.swing.JTextPane
                          groovy.ui.text.TextEditor
All Implemented Interfaces:
Pageable, Printable

public class TextEditor
extends JTextPane

A simple text pane that is printable and wrapping is optional.

Authors:
Evan "Hippy" Slatis


Field Summary
static String AUTO_INDENT

static String FIND

static String FIND_NEXT

static String FIND_PREVIOUS

static String REPLACE

 
Fields inherited from class JTextPane
W3C_LENGTH_UNITS, HONOR_DISPLAY_PROPERTIES, FOCUS_ACCELERATOR_KEY, DEFAULT_KEYMAP, WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT
 
Fields inherited from class JEditorPane
W3C_LENGTH_UNITS, HONOR_DISPLAY_PROPERTIES, FOCUS_ACCELERATOR_KEY, DEFAULT_KEYMAP, WHEN_FOCUSED, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_WINDOW, UNDEFINED_CONDITION, TOOL_TIP_TEXT_KEY, TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, WIDTH, HEIGHT, PROPERTIES, SOMEBITS, FRAMEBITS, ALLBITS, ERROR, ABORT
 
Constructor Summary
TextEditor()

Creates a new instance of TextEditor

TextEditor(boolean tabsAsSpaces)

Creates a new instance of TextEditor

TextEditor(boolean tabsAsSpaces, boolean multiLineTab)

Creates a new instance of TextEditor

TextEditor(boolean tabsAsSpaces, boolean multiLineTab, boolean unwrapped)

Creates a new instance of TextEditor

 
Method Summary
void addNotify()

int getNumberOfPages()

PageFormat getPageFormat(int pageIndex)

Printable getPrintable(int param)

boolean getScrollableTracksViewportWidth()

boolean isMultiLineTabbed()

void isMultiLineTabbed(boolean multiLineTab)

@param multiLineTab

static boolean isOvertypeMode()

boolean isTabsAsSpaces()

void isTabsAsSpaces(boolean tabsAsSpaces)

@param tabsAsSpaces

boolean isUnwrapped()

int print(Graphics graphics, PageFormat pageFormat, int page)

protected void processKeyEvent(KeyEvent e)

void removeNotify()

void replaceSelection(String text)

void setBounds(int x, int y, int width, int height)

void setOvertypeMode(boolean isOvertypeMode)

Set the caret to use depending on overtype/insert mode

void setUnwrapped(boolean unwrapped)

@param unwrapped

 
Methods inherited from class JTextPane
getUIClassID, addStyle, getCharacterAttributes, getInputAttributes, getLogicalStyle, getParagraphAttributes, getStyle, getStyledDocument, insertComponent, insertIcon, removeStyle, replaceSelection, setCharacterAttributes, setDocument, setEditorKit, setLogicalStyle, setParagraphAttributes, setStyledDocument, read, getContentType, setContentType, getText, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getAccessibleContext, getPreferredSize, getEditorKit, getEditorKitClassNameForContentType, setEditorKitForContentType, addHyperlinkListener, createEditorKitForContentType, fireHyperlinkUpdate, getEditorKitForContentType, getHyperlinkListeners, getPage, registerEditorKitForContentType, registerEditorKitForContentType, removeHyperlinkListener, scrollToReference, setPage, setPage, setText, write, getActions, print, print, print, copy, read, getText, setDropMode, select, getDragEnabled, getDropLocation, getDropMode, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableUnitIncrement, setDragEnabled, addInputMethodListener, getToolTipText, getMargin, setMargin, removeNotify, getInputMethodRequests, setComponentOrientation, getDocument, getUI, isEditable, setEditable, setUI, updateUI, getPrintable, selectAll, getCaret, getCaretPosition, getSelectionEnd, getSelectionStart, setCaretPosition, addCaretListener, addKeymap, cut, getCaretListeners, getDisabledTextColor, getFocusAccelerator, getKeymap, getKeymap, getSelectedTextColor, getSelectionColor, loadKeymap, moveCaretPosition, paste, removeCaretListener, removeKeymap, setCaret, setCaretColor, setDisabledTextColor, setFocusAccelerator, setHighlighter, setKeymap, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, getCaretColor, getHighlighter, getNavigationFilter, getSelectedText, modelToView, viewToModel, contains, getLocation, print, getSize, isOpaque, disable, enable, update, setEnabled, addNotify, getAlignmentX, getAlignmentY, getHeight, getInsets, getInsets, getMaximumSize, getMinimumSize, firePropertyChange, firePropertyChange, firePropertyChange, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, requestDefaultFocus, resetKeyboardActions, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setInheritsPopupMenu, setInputMap, setInputVerifier, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, getListeners, addVetoableChangeListener, computeVisibleRect, createToolTip, getActionForKeyStroke, getActionMap, getAncestorListeners, getAutoscrolls, getBorder, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, grabFocus, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, getWidth, getX, getY, isValidateRoot, paint, requestFocus, requestFocus, setFocusTraversalKeys, setFont, setVisible, getBaseline, getBaselineResizeBehavior, getBounds, getFontMetrics, getGraphics, isDoubleBuffered, printAll, repaint, repaint, requestFocusInWindow, reshape, revalidate, setBackground, setForeground, setMaximumSize, setMinimumSize, setPreferredSize, addAncestorListener, add, add, add, add, add, remove, remove, list, list, removeAll, validate, getLayout, setLayout, layout, addPropertyChangeListener, addPropertyChangeListener, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponentAt, getComponentAt, getComponentCount, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, locate, minimumSize, paintComponents, preferredSize, printComponents, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, invalidate, getComponent, getComponents, add, toString, getName, contains, size, getLocation, getParent, remove, setName, list, list, list, getSize, isValid, setSize, setSize, resize, resize, location, enable, setLocation, setLocation, getLocale, setLocale, isEnabled, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, getFocusCycleRootAncestor, getFont, getGraphicsConfiguration, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getMousePosition, getPeer, getTreeLock, handleEvent, isDisplayable, isFocusOwner, isFocusable, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isVisible, postEvent, setBounds, setBounds, transferFocus, transferFocusBackward, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getToolkit, gotFocus, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isFocusTraversable, isFontSet, isForegroundSet, keyDown, keyUp, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, nextFocus, paintAll, prepareImage, prepareImage, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, setCursor, setDropTarget, setFocusTraversalKeysEnabled, setFocusable, setIgnoreRepaint, transferFocusUpCycle, move, action, hide, show, show, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll
 
Methods inherited from class JEditorPane
read, getContentType, setContentType, getText, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getAccessibleContext, getPreferredSize, getUIClassID, getEditorKit, getEditorKitClassNameForContentType, replaceSelection, setEditorKit, setEditorKitForContentType, addHyperlinkListener, createEditorKitForContentType, fireHyperlinkUpdate, getEditorKitForContentType, getHyperlinkListeners, getPage, registerEditorKitForContentType, registerEditorKitForContentType, removeHyperlinkListener, scrollToReference, setPage, setPage, setText, write, getActions, print, print, print, copy, read, getText, setDropMode, select, getDragEnabled, getDropLocation, getDropMode, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableUnitIncrement, setDragEnabled, addInputMethodListener, getToolTipText, getMargin, setMargin, removeNotify, getInputMethodRequests, setComponentOrientation, getDocument, getUI, isEditable, setEditable, setUI, updateUI, getPrintable, selectAll, getCaret, getCaretPosition, getSelectionEnd, getSelectionStart, setDocument, setCaretPosition, addCaretListener, addKeymap, cut, getCaretListeners, getDisabledTextColor, getFocusAccelerator, getKeymap, getKeymap, getSelectedTextColor, getSelectionColor, loadKeymap, moveCaretPosition, paste, removeCaretListener, removeKeymap, setCaret, setCaretColor, setDisabledTextColor, setFocusAccelerator, setHighlighter, setKeymap, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, getCaretColor, getHighlighter, getNavigationFilter, getSelectedText, modelToView, viewToModel, contains, getLocation, print, getSize, isOpaque, disable, enable, update, setEnabled, addNotify, getAlignmentX, getAlignmentY, getHeight, getInsets, getInsets, getMaximumSize, getMinimumSize, firePropertyChange, firePropertyChange, firePropertyChange, paintImmediately, paintImmediately, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, requestDefaultFocus, resetKeyboardActions, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setInheritsPopupMenu, setInputMap, setInputVerifier, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, getListeners, addVetoableChangeListener, computeVisibleRect, createToolTip, getActionForKeyStroke, getActionMap, getAncestorListeners, getAutoscrolls, getBorder, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, grabFocus, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, getWidth, getX, getY, isValidateRoot, paint, requestFocus, requestFocus, setFocusTraversalKeys, setFont, setVisible, getBaseline, getBaselineResizeBehavior, getBounds, getFontMetrics, getGraphics, isDoubleBuffered, printAll, repaint, repaint, requestFocusInWindow, reshape, revalidate, setBackground, setForeground, setMaximumSize, setMinimumSize, setPreferredSize, addAncestorListener, add, add, add, add, add, remove, remove, list, list, removeAll, validate, getLayout, setLayout, layout, addPropertyChangeListener, addPropertyChangeListener, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponentAt, getComponentAt, getComponentCount, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, locate, minimumSize, paintComponents, preferredSize, printComponents, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, invalidate, getComponent, getComponents, add, toString, getName, contains, size, getLocation, getParent, remove, setName, list, list, list, getSize, isValid, setSize, setSize, resize, resize, location, enable, setLocation, setLocation, getLocale, setLocale, isEnabled, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, getFocusCycleRootAncestor, getFont, getGraphicsConfiguration, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getMousePosition, getPeer, getTreeLock, handleEvent, isDisplayable, isFocusOwner, isFocusable, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isVisible, postEvent, setBounds, setBounds, transferFocus, transferFocusBackward, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getToolkit, gotFocus, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isFocusTraversable, isFontSet, isForegroundSet, keyDown, keyUp, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, nextFocus, paintAll, prepareImage, prepareImage, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, setCursor, setDropTarget, setFocusTraversalKeysEnabled, setFocusable, setIgnoreRepaint, transferFocusUpCycle, move, action, hide, show, show, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll
 

Field Detail

AUTO_INDENT

public static final String AUTO_INDENT


FIND

public static final String FIND


FIND_NEXT

public static final String FIND_NEXT


FIND_PREVIOUS

public static final String FIND_PREVIOUS


REPLACE

public static final String REPLACE


 
Constructor Detail

TextEditor

public TextEditor()
Creates a new instance of TextEditor


TextEditor

public TextEditor(boolean tabsAsSpaces)
Creates a new instance of TextEditor


TextEditor

public TextEditor(boolean tabsAsSpaces, boolean multiLineTab)
Creates a new instance of TextEditor


TextEditor

public TextEditor(boolean tabsAsSpaces, boolean multiLineTab, boolean unwrapped)
Creates a new instance of TextEditor


 
Method Detail

addNotify

public void addNotify()


getNumberOfPages

public int getNumberOfPages()


getPageFormat

public PageFormat getPageFormat(int pageIndex)


getPrintable

public Printable getPrintable(int param)


getScrollableTracksViewportWidth

public boolean getScrollableTracksViewportWidth()


isMultiLineTabbed

public boolean isMultiLineTabbed()


isMultiLineTabbed

public void isMultiLineTabbed(boolean multiLineTab)
Parameters:
multiLineTab


isOvertypeMode

public static boolean isOvertypeMode()


isTabsAsSpaces

public boolean isTabsAsSpaces()


isTabsAsSpaces

public void isTabsAsSpaces(boolean tabsAsSpaces)
Parameters:
tabsAsSpaces


isUnwrapped

public boolean isUnwrapped()


print

public int print(Graphics graphics, PageFormat pageFormat, int page)


processKeyEvent

protected void processKeyEvent(KeyEvent e)


removeNotify

public void removeNotify()


replaceSelection

public void replaceSelection(String text)


setBounds

public void setBounds(int x, int y, int width, int height)


setOvertypeMode

public void setOvertypeMode(boolean isOvertypeMode)
Set the caret to use depending on overtype/insert mode
Parameters:
isOvertypeMode


setUnwrapped

public void setUnwrapped(boolean unwrapped)
Parameters:
unwrapped


 

Copyright © 2003-2011 The Codehaus. All rights reserved.