Class AbstractFilePickList<T extends IFilePickItem>
java.lang.Object
org.pentaho.mantle.client.solutionbrowser.filepicklist.AbstractFilePickList<T>
- Direct Known Subclasses:
FavoritePickList
,RecentPickList
-
Constructor Summary
ConstructorDescriptionAbstractFilePickList
(com.google.gwt.json.client.JSONArray jsonFilePickList) AbstractFilePickList
(ArrayList<T> filePickList) -
Method Summary
Modifier and TypeMethodDescriptionvoid
If the object is already in the list it will be removed first and the index adjusted accordingly.void
void
addPickListListener
(IFilePickListListener<T> listener) void
clear()
abstract boolean
boolean
void
int
void
reloadFavorites
(T pickListItem, String command) void
reloadRecents
(T pickListItem, String command) remove
(int index) void
void
removePickListListener
(IFilePickListListener<T> listener) void
Convert the FilePickList to JSON and save it to a user settingvoid
setFilePickList
(ArrayList<T> filePickList) void
setMaxSize
(int maxSize) int
size()
com.google.gwt.json.client.JSONArray
toJson()
toString()
helper method for debugging.
-
Constructor Details
-
AbstractFilePickList
public AbstractFilePickList() -
AbstractFilePickList
-
AbstractFilePickList
public AbstractFilePickList(com.google.gwt.json.client.JSONArray jsonFilePickList)
-
-
Method Details
-
contains
-
toJson
public com.google.gwt.json.client.JSONArray toJson()- Returns:
- JSONArray representation of list suitable for storage
-
size
public int size() -
add
-
add
If the object is already in the list it will be removed first and the index adjusted accordingly. If maxSize is positive and adding the item would exceed maxSize, then the item will not be added.- Parameters:
index
-pickListItem
-
-
remove
-
remove
-
clear
public void clear() -
contains
-
fireItemsChangedEvent
public void fireItemsChangedEvent() -
addPickListListener
-
removePickListListener
-
stringify
- Returns:
- serialize to JSON String suitable for storage
-
toString
helper method for debugging. Usestringify()
for formal JSON conversion. -
getFilePickList
-
setFilePickList
-
getMaxSize
public int getMaxSize()- Returns:
- the maxSize
-
setMaxSize
public void setMaxSize(int maxSize) - Parameters:
maxSize
- Set Maximum number of entries in list, 0 = unlimited
-
save
Convert the FilePickList to JSON and save it to a user setting- Parameters:
settingName
-
-
reloadFavorites
-
reloadRecents
-