Package snap.web
Class RecentFiles
java.lang.Object
snap.props.PropObject
snap.view.ViewOwner
snap.web.RecentFiles
- All Implemented Interfaces:
PropChange.DoChange
A class to manage UI for recent files (can show a panel or a menu).
-
Field Summary
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 TypeMethodDescriptionstatic void
Adds a URL string to recent files and updates the users preferences.static void
addUrlString
(String urlString) Adds a URL string to recent files and updates the users preferences.static void
Clears recent files from preferences.static WebFile[]
getFiles()
Returns the array of recent files.static String
getNormalizedUrlString
(String urlString) Returns a standard URL String for given URL string.static WebURL[]
getRecentUrlsForTypes
(String[] theTypes) Returns the most recent file for given type.static WebURL[]
getURLs()
Returns the array of recent file URLs.static String[]
Returns the array of recent file URL strings.static void
Removes a URL string from recent files and updates the users preferences.static void
removeUrlString
(String urlString) Removes a URL string from recent files and updates the users preferences.static void
setPrefsKey
(String aKey) Sets the Recent files key.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, setShowing, 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
-
Constructor Details
-
RecentFiles
public RecentFiles()
-
-
Method Details
-
getFiles
Returns the array of recent files. -
getURLs
Returns the array of recent file URLs. -
getUrlStrings
Returns the array of recent file URL strings. -
addUrlString
Adds a URL string to recent files and updates the users preferences. -
removeUrlString
Removes a URL string from recent files and updates the users preferences. -
clearRecentFiles
public static void clearRecentFiles()Clears recent files from preferences. -
addURL
Adds a URL string to recent files and updates the users preferences. -
removeURL
Removes a URL string from recent files and updates the users preferences. -
getRecentUrlsForTypes
Returns the most recent file for given type. -
getNormalizedUrlString
Returns a standard URL String for given URL string. -
setPrefsKey
Sets the Recent files key.
-