Class AbstractFilePickList<T extends IFilePickItem>
java.lang.Object
org.pentaho.mantle.client.solutionbrowser.filepicklist.AbstractFilePickList<T>
- Direct Known Subclasses:
FavoritePickList,RecentPickList
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractFilePickList(com.google.gwt.json.client.JSONArray jsonFilePickList) AbstractFilePickList(ArrayList<T> filePickList) -
Method Summary
Modifier and TypeMethodDescriptionvoidIf the object is already in the list it will be removed first and the index adjusted accordingly.voidvoidaddPickListListener(IFilePickListListener<T> listener) voidclear()abstract booleanbooleanvoidintvoidreloadFavorites(T pickListItem, String command) voidreloadRecents(T pickListItem, String command) remove(int index) voidvoidremovePickListListener(IFilePickListListener<T> listener) voidConvert the FilePickList to JSON and save it to a user settingvoidsetFilePickList(ArrayList<T> filePickList) voidsetMaxSize(int maxSize) intsize()com.google.gwt.json.client.JSONArraytoJson()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
-