public class TEditorWindow extends TScrollableWindow
hScroller, vScroller
ABSOLUTEXY, CENTERED, HIDEONCLOSE, inKeyboardResize, inWindowMove, inWindowResize, MODAL, mouse, NOCLOSEBOX, NOZOOMBOX, OVERRIDEMENU, RESIZABLE, statusBar
Constructor and Description |
---|
TEditorWindow(TApplication parent)
Public constructor.
|
TEditorWindow(TApplication parent,
java.io.File file)
Public constructor opens a file.
|
TEditorWindow(TApplication parent,
java.lang.String title)
Public constructor sets window title.
|
TEditorWindow(TApplication parent,
java.lang.String title,
java.lang.String contents)
Public constructor sets window title and contents.
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draw the window.
|
boolean |
hasHiddenMouse()
Returns true if this window does not want the application-wide mouse
cursor drawn over it.
|
void |
onCommand(TCommandEvent command)
Method that subclasses can override to handle posted command events.
|
void |
onKeypress(TKeypressEvent keypress)
Handle keystrokes.
|
void |
onMouseDown(TMouseEvent mouse)
Handle mouse press events.
|
void |
onMouseMotion(TMouseEvent mouse)
Method that subclasses can override to handle mouse movements.
|
void |
onMouseUp(TMouseEvent mouse)
Handle mouse release events.
|
void |
onResize(TResizeEvent event)
Handle window/screen resize events.
|
bigHorizontalDecrement, bigHorizontalIncrement, bigVerticalDecrement, bigVerticalIncrement, getBottomValue, getHorizontalBigChange, getHorizontalScroller, getHorizontalSmallChange, getHorizontalValue, getLeftValue, getRightValue, getTopValue, getVerticalBigChange, getVerticalScroller, getVerticalSmallChange, getVerticalValue, horizontalDecrement, horizontalIncrement, maximize, mouseOnHorizontalScroller, mouseOnVerticalScroller, placeScrollbars, reflowData, restore, setBottomValue, setHorizontalBigChange, setHorizontalSmallChange, setHorizontalValue, setLeftValue, setRightValue, setTopValue, setVerticalBigChange, setVerticalSmallChange, setVerticalValue, toBottom, toEnd, toHome, toLeft, toRight, toTop, verticalDecrement, verticalIncrement
activate, addShortcutKeypress, center, clearShortcutKeypresses, close, getApplication, getBackground, getBorder, getBorderControls, getScreen, getStatusBar, getTitle, getZ, hasCloseBox, hasOverriddenMenu, hasZoomBox, hide, inMovements, isHidden, isModal, isShortcutKeypress, isShown, mouseOnClose, mouseOnMaximize, mouseOnResize, newStatusBar, onClose, onFocus, onHide, onMenu, onPreClose, onShow, onUnfocus, removeShortcutKeypress, setHiddenMouse, setMaximumWindowHeight, setMaximumWindowWidth, setMinimumWindowHeight, setMinimumWindowWidth, setTitle, setZ, show, stopMovements, toString
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, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getAttrXY, getChildren, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getTheme, getWidth, getWindow, getX, getY, handleEvent, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onIdle, onMouseDoubleClick, 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, vLineXY
public TEditorWindow(TApplication parent, java.lang.String title)
parent
- the main applicationtitle
- the window titlepublic TEditorWindow(TApplication parent, java.lang.String title, java.lang.String contents)
parent
- the main applicationtitle
- the window title, usually a filenamecontents
- the data for the editing window, usually the file datapublic TEditorWindow(TApplication parent, java.io.File file) throws java.io.IOException
parent
- the main applicationfile
- the file to openjava.io.IOException
- if a java.io operation throwspublic TEditorWindow(TApplication parent)
parent
- the main applicationpublic void onMouseDown(TMouseEvent mouse)
onMouseDown
in class TWindow
mouse
- mouse button press eventpublic void onMouseUp(TMouseEvent mouse)
public void onMouseMotion(TMouseEvent mouse)
onMouseMotion
in class TWindow
mouse
- mouse motion eventpublic void onKeypress(TKeypressEvent keypress)
onKeypress
in class TWindow
keypress
- keystroke eventpublic void onResize(TResizeEvent event)
onResize
in class TScrollableWindow
event
- resize eventpublic void onCommand(TCommandEvent command)
public boolean hasHiddenMouse()
hasHiddenMouse
in class TWindow
Copyright © 2019 Kevin Lamonte. Licensed MIT.