[Java] Class TextEditor
- groovy.ui.text.TextEditor
@Deprecated public class TextEditor extends JTextPane implements Pageable, Printable
A simple text pane that is printable and wrapping is optional.
Field Summary
Modifiers | Name | Description |
---|---|---|
static String | AUTO_INDENT | |
static String | FIND | |
static String | FIND_NEXT | |
static String | FIND_PREVIOUS | |
static String | REPLACE |
Fields inherited from class | Fields |
---|---|
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 |
Constructor Summary
Constructor and description |
---|
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 |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public void |
addNotify() | |
public int |
getNumberOfPages() | |
public PageFormat |
getPageFormat(int pageIndex) | |
public Printable |
getPrintable(int param) | |
public boolean |
getScrollableTracksViewportWidth() | |
public boolean |
isMultiLineTabbed() Whether using the tab key indents the selected lines of code | |
public void |
isMultiLineTabbed(boolean multiLineTab)
| |
public static boolean |
isOvertypeMode()
| |
public boolean |
isTabsAsSpaces()
| |
public void |
isTabsAsSpaces(boolean tabsAsSpaces)
| |
public boolean |
isUnwrapped()
| |
public void |
mouseEntered(MouseEvent me) | |
public void |
mouseExited(MouseEvent me) | |
public int |
print(Graphics graphics, PageFormat pageFormat, int page) | |
protected void |
processKeyEvent(KeyEvent e) | |
public void |
removeNotify() | |
public void |
replaceSelection(String text) | |
public void |
setBounds(int x, int y, int width, int height) | |
public void |
setOvertypeMode(boolean isOvertypeMode) Set the caret to use depending on overtype/insert mode | |
public void |
setUnwrapped(boolean unwrapped)
|
Inherited Methods Summary
Field Detail
public static final String AUTO_INDENT
public static final String FIND
public static final String FIND_NEXT
public static final String FIND_PREVIOUS
public static final String REPLACE
Constructor Detail
public TextEditor()
Creates a new instance of TextEditor
public TextEditor(boolean tabsAsSpaces)
Creates a new instance of TextEditor
public TextEditor(boolean tabsAsSpaces, boolean multiLineTab)
Creates a new instance of TextEditor
public TextEditor(boolean tabsAsSpaces, boolean multiLineTab, boolean unwrapped)
Creates a new instance of TextEditor
Method Detail
public void addNotify()
public int getNumberOfPages()
public PageFormat getPageFormat(int pageIndex)
public Printable getPrintable(int param)
public boolean getScrollableTracksViewportWidth()
public boolean isMultiLineTabbed()
Whether using the tab key indents the selected lines of code
- Returns:
- true if multiline tabbing is active
public void isMultiLineTabbed(boolean multiLineTab)
- Parameters:
-
multiLineTab
- the new multiLine tab value
public static boolean isOvertypeMode()
- Returns:
- true if overtype mode is active, false for insert mode
public boolean isTabsAsSpaces()
- Returns:
- true if tabs are converted to spaces upon typing
public void isTabsAsSpaces(boolean tabsAsSpaces)
- Parameters:
-
tabsAsSpaces
- whether tabs are converted to spaces
public boolean isUnwrapped()
- Returns:
- true if text wrapping is disabled
public void mouseEntered(MouseEvent me)
public void mouseExited(MouseEvent me)
public int print(Graphics graphics, PageFormat pageFormat, int page)
protected void processKeyEvent(KeyEvent e)
public void removeNotify()
public void replaceSelection(String text)
public void setBounds(int x, int y, int width, int height)
public void setOvertypeMode(boolean isOvertypeMode)
Set the caret to use depending on overtype/insert mode
- Parameters:
-
isOvertypeMode
- the new mode; true = overtype
public void setUnwrapped(boolean unwrapped)
- Parameters:
-
unwrapped
- the new unwrapped value
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/groovy/ui/text/TextEditor.html