Interface TFileExplorerPanel.FileExplorerPanelProxy
- All Superinterfaces:
TitleBar.TitleBarProxy
- Enclosing class:
TFileExplorerPanel
This
interface
defines the "current state" a TFileExplorerPanel
is in at a given moment. Because changes to the game's window and GUI components
triggers a GUI "reset" for technical reasons, this interface
is responsible
for properly preserving and communicating the state of the TFileExplorerPanel
to the said panel.-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
canClose()
default boolean
canDrag()
Returns true if theTFileExplorerPanel
may be dragged by the user's mouse by clicking and dragging theTitleBar
.default boolean
default boolean
Returns thePath
of a directory that should currently be displayed by theTFileExplorerPanel
.Returns theFileChooserDialogType
associated with the correspondingTFileExplorerPanel
.default UITexture
getIcon()
Returns theTitleBar
icon for thisTFileExplorerPanel
.@Nullable String
Returns theFile
extension that should be used when "saving" files.default net.minecraft.text.Text
getTitle()
Returns the titleText
that should be used for thisTFileExplorerPanel
dialog.void
onComplete
(TFileChooserResult result) A method that is called once the user makes a choice in theTFileExplorerPanel
.void
setCurrentDirectory
(Path directory) Called byTFileExplorerPanel
to indicate user directory navigation.void
setSelectedFileFilter
(TFileFilter fileFilter) Methods inherited from interface io.github.thecsdev.tcdcommons.api.client.gui.panel.explorer.TitleBar.TitleBarProxy
onClose, onMinimize, onRestore
-
Method Details
-
getDialogType
FileChooserDialogType getDialogType()Returns theFileChooserDialogType
associated with the correspondingTFileExplorerPanel
. -
onComplete
A method that is called once the user makes a choice in theTFileExplorerPanel
. -
getFileFilters
Iterable<TFileFilter> getFileFilters() -
getSelectedFileFilter
TFileFilter getSelectedFileFilter() -
setSelectedFileFilter
-
getCurrentDirectory
Path getCurrentDirectory()Returns thePath
of a directory that should currently be displayed by theTFileExplorerPanel
. -
setCurrentDirectory
Called byTFileExplorerPanel
to indicate user directory navigation. -
getTargetFileExtension
Returns theFile
extension that should be used when "saving" files. Primarily used forFileChooserDialogType.SAVE_FILE
, as the dialog has to somehow know what extension you wish to "save as". -
canDrag
default boolean canDrag()Returns true if theTFileExplorerPanel
may be dragged by the user's mouse by clicking and dragging theTitleBar
.- See Also:
-
getTitle
default net.minecraft.text.Text getTitle()Returns the titleText
that should be used for thisTFileExplorerPanel
dialog.- Specified by:
getTitle
in interfaceTitleBar.TitleBarProxy
- See Also:
-
getIcon
Returns theTitleBar
icon for thisTFileExplorerPanel
.- Specified by:
getIcon
in interfaceTitleBar.TitleBarProxy
-
canClose
default boolean canClose()- Specified by:
canClose
in interfaceTitleBar.TitleBarProxy
-
canRestore
default boolean canRestore()- Specified by:
canRestore
in interfaceTitleBar.TitleBarProxy
-
canMinimize
default boolean canMinimize()- Specified by:
canMinimize
in interfaceTitleBar.TitleBarProxy
-