public class TImageWindow extends TScrollableWindow
hScroller, vScroller
ABSOLUTEXY, CENTERED, HIDEONCLOSE, inKeyboardResize, inWindowMove, inWindowResize, MODAL, mouse, NOCLOSEBOX, NOZOOMBOX, OVERRIDEMENU, RESIZABLE, statusBar
Constructor and Description |
---|
TImageWindow(TApplication parent,
java.io.File file)
Public constructor opens a file.
|
TImageWindow(TApplication parent,
java.io.File file,
int x,
int y,
int width,
int height)
Public constructor opens a file.
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draw the window.
|
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, hasHiddenMouse, hasOverriddenMenu, hasZoomBox, hide, inMovements, isHidden, isModal, isShortcutKeypress, isShown, mouseOnClose, mouseOnMaximize, mouseOnResize, newStatusBar, onClose, onCommand, 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 TImageWindow(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 TImageWindow(TApplication parent, java.io.File file, int x, int y, int width, int height) throws java.io.IOException
parent
- the main applicationfile
- the file to openx
- column relative to parenty
- row relative to parentwidth
- width of windowheight
- height of windowjava.io.IOException
- if a java.io operation throwspublic 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 onResize(TResizeEvent event)
onResize
in class TScrollableWindow
event
- resize eventpublic void onKeypress(TKeypressEvent keypress)
onKeypress
in class TWindow
keypress
- keystroke eventCopyright © 2019 Kevin Lamonte. Licensed MIT.