Constructor and Description |
---|
TEditorWidget(TWidget parent,
java.lang.String text,
int x,
int y,
int width,
int height)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draw the text box.
|
int |
getEditingColumnNumber()
Get the current editing column number.
|
int |
getEditingRowNumber()
Get the current editing row number.
|
int |
getLineCount()
Get the number of lines in the underlying Document.
|
int |
getMaximumColumnNumber()
Get the maximum possible column number.
|
int |
getMaximumRowNumber()
Get the maximum possible row number.
|
int |
getVisibleColumnNumber()
Set the current visible column number.
|
int |
getVisibleRowNumber()
Get the current visible top row number.
|
boolean |
isDirty()
Get the dirty value.
|
void |
onKeypress(TKeypressEvent keypress)
Handle keystrokes.
|
void |
onMouseDown(TMouseEvent mouse)
Handle mouse press events.
|
void |
onResize(TResizeEvent resize)
Method that subclasses can override to handle window/screen resize
events.
|
void |
saveToFilename(java.lang.String filename)
Save contents to file.
|
void |
setEditingColumnNumber(int column)
Set the current editing column number.
|
void |
setEditingRowNumber(int row)
Set the current editing row number.
|
void |
setVisibleColumnNumber(int column)
Set the current visible column number.
|
void |
setVisibleRowNumber(int row)
Set the current visible row number.
|
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getScreen, getTheme, getWidth, getWindow, getX, getY, handleEvent, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onMenu, onMouseDoubleClick, onMouseMotion, onMouseUp, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setDimensions, setEnabled, setHeight, setLayoutManager, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY
public TEditorWidget(TWidget parent, java.lang.String text, int x, int y, int width, int height)
parent
- parent widgettext
- text on the screenx
- column relative to parenty
- row relative to parentwidth
- width of text areaheight
- height of text areapublic void onMouseDown(TMouseEvent mouse)
onMouseDown
in class TWidget
mouse
- mouse button press eventpublic void onKeypress(TKeypressEvent keypress)
onKeypress
in class TWidget
keypress
- keystroke eventpublic void onResize(TResizeEvent resize)
public int getLineCount()
public int getVisibleRowNumber()
public void setVisibleRowNumber(int row)
row
- the new visible row number. Row 1 is the first row.public int getEditingRowNumber()
public void setEditingRowNumber(int row)
row
- the new editing row number. Row 1 is the first row.public int getVisibleColumnNumber()
public void setVisibleColumnNumber(int column)
column
- the new visible column number. Column 1 is the first
column.public int getEditingColumnNumber()
public void setEditingColumnNumber(int column)
column
- the new editing column number. Column 1 is the first
column.public int getMaximumRowNumber()
public int getMaximumColumnNumber()
public boolean isDirty()
public void saveToFilename(java.lang.String filename) throws java.io.IOException
filename
- file to save tojava.io.IOException
- if a java.io operation throwsCopyright © 2019 Kevin Lamonte. Licensed MIT.