public class TFileOpenBox extends TWindow
filename = fileOpenBox("/path/to/file.ext",
TFileOpenBox.Type.OPEN);
if (filename != null) {
... the user selected a file, go open it ...
}
Modifier and Type | Class and Description |
---|---|
static class |
TFileOpenBox.Type
TFileOpenBox can be called for either Open or Save actions.
|
ABSOLUTEXY, CENTERED, HIDEONCLOSE, inKeyboardResize, inWindowMove, inWindowResize, MODAL, mouse, NOCLOSEBOX, NOZOOMBOX, OVERRIDEMENU, RESIZABLE, statusBar
Constructor and Description |
---|
TFileOpenBox(TApplication application,
java.lang.String path,
TFileOpenBox.Type type)
Public constructor.
|
TFileOpenBox(TApplication application,
java.lang.String path,
TFileOpenBox.Type type,
java.util.List<java.lang.String> filters)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
draw()
Draw me on screen.
|
java.lang.String |
getFilename()
Get the return string.
|
void |
onKeypress(TKeypressEvent keypress)
Handle keystrokes.
|
activate, addShortcutKeypress, center, clearShortcutKeypresses, close, getApplication, getBackground, getBorder, getBorderControls, getScreen, getStatusBar, getTitle, getZ, hasCloseBox, hasHiddenMouse, hasOverriddenMenu, hasZoomBox, hide, inMovements, isHidden, isModal, isShortcutKeypress, isShown, maximize, mouseOnClose, mouseOnMaximize, mouseOnResize, newStatusBar, onClose, onCommand, onFocus, onHide, onMenu, onMouseDown, onMouseMotion, onMouseUp, onPreClose, onResize, onShow, onUnfocus, removeShortcutKeypress, restore, 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 TFileOpenBox(TApplication application, java.lang.String path, TFileOpenBox.Type type) throws java.io.IOException
application
- the TApplication that manages this windowpath
- path of selected filetype
- one of the Type constantsjava.io.IOException
- of a java.io operation throwspublic TFileOpenBox(TApplication application, java.lang.String path, TFileOpenBox.Type type, java.util.List<java.lang.String> filters) throws java.io.IOException
application
- the TApplication that manages this windowpath
- path of selected filetype
- one of the Type constantsfilters
- a list of strings that files must match to be displayedjava.io.IOException
- of a java.io operation throwspublic void onKeypress(TKeypressEvent keypress)
onKeypress
in class TWindow
keypress
- keystroke eventpublic java.lang.String getFilename()
Copyright © 2019 Kevin Lamonte. Licensed MIT.