Package snap.viewx
Class WebSitePane
java.lang.Object
snap.props.PropObject
snap.view.ViewOwner
snap.viewx.WebSitePane
- All Implemented Interfaces:
PropChange.DoChange
- Direct Known Subclasses:
RecentFilesSitePane
,WebSitePaneX
This class is the base class for WebSite open/save browsers.
-
Field Summary
Modifier and TypeFieldDescriptionprotected EventListener
protected boolean
protected WebFile
protected WebSite
protected WebFile
protected String[]
static final String
static final String
Fields inherited from class snap.view.ViewOwner
Action, DragDrop, DragEnter, DragEvents, DragExit, DragGesture, DragOver, KeyEvents, KeyPress, KeyRelease, KeyType, MouseDrag, MouseEnter, MouseEvents, MouseExit, MouseMove, MousePress, MouseRelease, Showing_Prop, WinClose
Fields inherited from class snap.props.PropObject
_pcs, EMPTY_OBJECT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
fireActionEvent
(ViewEvent anEvent) Called on FileBrowser double-click or InputText enter key.Returns the listener triggered when action event is fired.protected WebFile
Resets the selected file.Returns the function that determines whether file can be selected.Returns the selected directory.Returns the selected file.getSite()
Returns the site currently being browsed.Returns the file targeted by the input text.String[]
getTypes()
Returns the file types.Returns the selected or targeted file if valid.boolean
Returns whether is opening.boolean
isSaving()
Returns whether is saving.boolean
isValidFile
(WebFile aFile) Returns whether given file is valid.protected void
Called when Showing changes.void
setActionHandler
(EventListener actionListener) Sets the listener triggered when action event is fired.void
setFileValidator
(Predicate<WebFile> fileValidator) Sets the function that determines whether file can be selected.void
setSaving
(boolean aValue) Sets whether is saving.void
setSelFile
(WebFile aFile) Sets the selected file or directory.protected void
setShowing
(boolean aValue) Override to reset files UI when showing.void
Sets the site for the panel.protected void
Called to set the WebFiles in UI.void
setTargFile
(WebFile aFile) Sets the file targeted by the input text.void
Sets the file types.Methods inherited from class snap.view.ViewOwner
addKeyActionFilter, addKeyActionHandler, addViewEventHandler, beep, cancelReset, createUI, createUIForClass, dispatchEventToOwner, enableEvents, fireActionEventForObject, getEnv, getFirstFocus, getImage, getNative, getToggleGroup, getUI, getUI, getUISource, getView, getView, getViewBoolValue, getViewFloatValue, getViewIntValue, getViewItems, getViewSelIndex, getViewSelItem, getViewStringValue, getViewText, getViewValue, getWindow, initShowing, initUI, initWindow, invokeResetUI, invokeRespondUI, isEventThread, isSendEventDisabled, isShowing, isUISet, isViewDisabled, isViewEnabled, isViewVisible, isWindowSet, isWindowVisible, requestFocus, resetLater, resetUI, respondUI, runDelayed, runLater, setFirstFocus, setSendEventDisabled, setViewDisabled, setViewEnabled, setViewItems, setViewItems, setViewSelIndex, setViewSelItem, setViewText, setViewValue, setViewVisible, setWindowVisible
Methods inherited from class snap.props.PropObject
addDeepChangeListener, addPropChangeListener, addPropChangeListener, clone, firePropChange, firePropChange, firePropChange, getPropDefault, getPropForName, getPropParent, getPropSet, getPropsForArchival, getPropsForArchivalExtra, getPropsString, getPropValue, initProps, isPropDefault, processPropChange, removeDeepChangeListener, removePropChangeListener, removePropChangeListener, setPropsString, setPropValue, setPropValues, toString, toStringProps
-
Field Details
-
_site
-
_selFile
-
_targFile
-
_saving
protected boolean _saving -
_types
-
_actionHandler
-
SelFile_Prop
- See Also:
-
TargFile_Prop
- See Also:
-
-
Constructor Details
-
WebSitePane
public WebSitePane()Constructor.
-
-
Method Details
-
getSite
Returns the site currently being browsed. -
setSite
Sets the site for the panel. -
getSelFile
Returns the selected file. -
setSelFile
Sets the selected file or directory. -
getSelDir
Returns the selected directory. -
getTargFile
Returns the file targeted by the input text. -
setTargFile
Sets the file targeted by the input text. -
getValidSelOrTargFile
Returns the selected or targeted file if valid. -
isOpening
public boolean isOpening()Returns whether is opening. -
isSaving
public boolean isSaving()Returns whether is saving. -
setSaving
public void setSaving(boolean aValue) Sets whether is saving. -
getFileValidator
Returns the function that determines whether file can be selected. -
setFileValidator
Sets the function that determines whether file can be selected. -
getTypes
Returns the file types. -
setTypes
Sets the file types. -
getActionHandler
Returns the listener triggered when action event is fired. -
setActionHandler
Sets the listener triggered when action event is fired. -
isValidFile
Returns whether given file is valid. -
fireActionEvent
Called on FileBrowser double-click or InputText enter key. -
setShowing
protected void setShowing(boolean aValue) Override to reset files UI when showing.- Overrides:
setShowing
in classViewOwner
-
resetFilesUI
protected void resetFilesUI()Called when Showing changes. -
getDefaultSelFile
Resets the selected file. -
setSiteFilesInUI
protected void setSiteFilesInUI()Called to set the WebFiles in UI.
-