Package jexer
Class TDirectoryList
- java.lang.Object
-
- jexer.TWidget
-
- jexer.TScrollable
-
- jexer.TList
-
- jexer.TDirectoryList
-
- All Implemented Interfaces:
java.lang.Comparable<TWidget>,Scrollable
public class TDirectoryList extends TList
TDirectoryList shows the files within a directory.
-
-
Field Summary
-
Fields inherited from class jexer.TList
enterAction, moveAction, singleClickAction
-
Fields inherited from class jexer.TScrollable
hScroller, vScroller
-
-
Constructor Summary
Constructors Constructor Description TDirectoryList(TWidget parent, java.lang.String path, int x, int y, int width, int height)Public constructor.TDirectoryList(TWidget parent, java.lang.String path, int x, int y, int width, int height, TAction action)Public constructor.TDirectoryList(TWidget parent, java.lang.String path, int x, int y, int width, int height, TAction action, TAction singleClickAction)Public constructor.TDirectoryList(TWidget parent, java.lang.String path, int x, int y, int width, int height, TAction action, TAction singleClickAction, java.util.List<java.lang.String> filters)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.FilegetPath()Get the path that is being displayed.voidreflowData()Resize for a new width/height.voidsetPath(java.lang.String path)Set the new path to display.-
Methods inherited from class jexer.TList
dispatchEnter, dispatchMove, dispatchSingleClick, draw, getList, getListItem, getMaxSelectedIndex, getSelected, getSelectedIndex, onKeypress, onMouseDoubleClick, onMouseDown, onResize, setHeight, setList, setListItem, setSelectedIndex, setWidth
-
Methods inherited from class jexer.TScrollable
bigHorizontalDecrement, bigHorizontalIncrement, bigVerticalDecrement, bigVerticalIncrement, getBottomValue, getHorizontalBigChange, getHorizontalScroller, getHorizontalSmallChange, getHorizontalValue, getLeftValue, getRightValue, getTopValue, getVerticalBigChange, getVerticalScroller, getVerticalSmallChange, getVerticalValue, horizontalDecrement, horizontalIncrement, placeScrollbars, setBottomValue, setHorizontalBigChange, setHorizontalSmallChange, setHorizontalValue, setLeftValue, setRightValue, setTopValue, setVerticalBigChange, setVerticalSmallChange, setVerticalValue, toBottom, toEnd, toHome, toLeft, toRight, toTop, verticalDecrement, verticalIncrement
-
Methods inherited from class jexer.TWidget
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addField, addImage, addImage, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addProgressBar, addRadioGroup, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, applyCellTransform, applyCellTransform, close, compareTo, doRepaint, drawBox, drawBoxShadow, drawChildren, drawForegroundBox, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getAttrXY, getChildren, getClipboard, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getCustomMousePointer, getHeight, getLayoutManager, getLocale, getMouseStyle, getParent, getScreen, getTheme, getWidgetUnderMouse, getWidth, getWindow, getX, getY, handleEvent, hasChild, hForegroundLineXY, hLineXY, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEchoKeystrokes, isEnabled, isPixelMouse, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onMenu, onMouseMotion, onMouseUp, putAll, putAttrXY, putAttrXY, putBackgroundAttrBox, putBackgroundAttrXY, putBackgroundAttrXY, putCharXY, putCharXY, putCharXY, putForegroundCharXY, putForegroundStringXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setCustomMousePointer, setDimensions, setEchoKeystrokes, setEchoKeystrokes, setEnabled, setLayoutManager, setLocale, setMouseStyle, setParent, setupForTWindow, setVisible, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY, vLineXY
-
-
-
-
Constructor Detail
-
TDirectoryList
public TDirectoryList(TWidget parent, java.lang.String path, int x, int y, int width, int height)
Public constructor.- Parameters:
parent- parent widgetpath- directory path, must be a directoryx- column relative to parenty- row relative to parentwidth- width of text areaheight- height of text area
-
TDirectoryList
public TDirectoryList(TWidget parent, java.lang.String path, int x, int y, int width, int height, TAction action)
Public constructor.- Parameters:
parent- parent widgetpath- directory path, must be a directoryx- column relative to parenty- row relative to parentwidth- width of text areaheight- height of text areaaction- action to perform when an item is selected (enter or double-click)
-
TDirectoryList
public TDirectoryList(TWidget parent, java.lang.String path, int x, int y, int width, int height, TAction action, TAction singleClickAction)
Public constructor.- Parameters:
parent- parent widgetpath- directory path, must be a directoryx- column relative to parenty- row relative to parentwidth- width of text areaheight- height of text areaaction- action to perform when an item is selected (enter or double-click)singleClickAction- action to perform when an item is selected (single-click)
-
TDirectoryList
public TDirectoryList(TWidget parent, java.lang.String path, int x, int y, int width, int height, TAction action, TAction singleClickAction, java.util.List<java.lang.String> filters)
Public constructor.- Parameters:
parent- parent widgetpath- directory path, must be a directoryx- column relative to parenty- row relative to parentwidth- width of text areaheight- height of text areaaction- action to perform when an item is selected (enter or double-click)singleClickAction- action to perform when an item is selected (single-click)filters- a list of strings that files must match to be displayed
-
-
Method Detail
-
reflowData
public void reflowData()
Resize for a new width/height.- Overrides:
reflowDatain classTList
-
setPath
public void setPath(java.lang.String path)
Set the new path to display.- Parameters:
path- new path to list files for
-
getPath
public java.io.File getPath()
Get the path that is being displayed.- Returns:
- the path
-
-