Groovy 1.8.7

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()

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 tabsAsSpaces

static boolean isOvertypeMode()

boolean isTabsAsSpaces()

void isTabsAsSpaces(boolean 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)

@param multiLineTab

void setOvertypeMode(boolean isOvertypeMode)

@param unwrapped

void setUnwrapped(boolean unwrapped)

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


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:
tabsAsSpaces


isOvertypeMode

public static boolean isOvertypeMode()


isTabsAsSpaces

public boolean isTabsAsSpaces()


isTabsAsSpaces

public void isTabsAsSpaces(boolean 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)
Parameters:
multiLineTab


setOvertypeMode

public void setOvertypeMode(boolean isOvertypeMode)
Parameters:
unwrapped


setUnwrapped

public void setUnwrapped(boolean unwrapped)


 

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