Enum Class OneClickListManager
- All Implemented Interfaces:
Workspace,Serializable,Comparable<OneClickListManager>,java.lang.constant.Constable
Singleton class to manage global lists that can be used globally across
many tables. This class also provides for notification of changes to the
underlying lists.
Note: Currently only string lists are supported
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interfaceListener contract for changes to underlying listsNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidaddList(String listName, Collection<String> listContents) Add a list to the collection with unpinned and unsorted attributesvoidaddList(String listName, Collection<String> listContents, boolean pinned, boolean sorted, boolean upperCase, OneClickListManager.ListEventSource source) Add a new list to the managed set.voidaddList(String listName, Collection<String> listContents, boolean pinned, boolean sorted, OneClickListManager.ListEventSource source) Add a new list to the managed set.voidaddList(String listName, Collection<String> listContents, OneClickListManager.ListEventSource listEventSource) Add a list to the collection with unpinned and unsorted attributesvoidRegister for notification of change to the underlying listsorg.jdom2.ElementexportShare(Collection<OneClickList> lists) Exports for a shareable workspace.Get the list associated with a particular name, or null if no set with that name existedGet a collection of all the list names that are currently maintainedgetLists()Get all the lists that are currently maintainedorg.jdom2.ElementSerialize the class into an element to be stored in the workspacevoidimportShare(org.jdom2.Element workspaceInfo) Imports one click lists from a shared workspace.voidremoveList(String listName) Remove a list from the set of managed lists.voidremoveList(String listName, OneClickListManager.ListEventSource source) Remove a list from the set of managed lists.voidDeregister for notification of change to the underlying listsvoidrenameList(String origName, String newName, OneClickListManager.ListEventSource source) Rename a list and notify observersvoidsetListPinned(String listName, boolean pinned) Set the Pinned state of a list.voidsetListPinned(String listName, boolean pinned, OneClickListManager.ListEventSource source) Set the Pinned state of a list.voidsetListSorted(String listName, boolean sorted) voidsetListSorted(String listName, boolean sorted, OneClickListManager.ListEventSource source) Mark if the list is sorted or not.voidsetWorkspaceInfo(org.jdom2.Element workspaceInfo) Restore the class to the state defined by the data persisted in workspaceInfostatic OneClickListManagerReturns the enum constant of this class with the specified name.static OneClickListManager[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface com.illumon.iris.gui.workspace.Workspace
isGlobalSetting
-
Enum Constant Details
-
DEFAULT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
addListener
Register for notification of change to the underlying lists- Parameters:
listener- The observer to notify of changes
-
removeListener
Deregister for notification of change to the underlying lists- Parameters:
listener- The observer to remove from notification of changes
-
renameList
Rename a list and notify observers- Parameters:
origName- The name of the list being renamednewName- The new name of the list
-
addList
public void addList(String listName, Collection<String> listContents, boolean pinned, boolean sorted, boolean upperCase, OneClickListManager.ListEventSource source) Add a new list to the managed set. If a list with the same name already exists it will be replaced. The managed lists will contain no duplications and will maintain the same ordering.- Parameters:
listName- The name of the list to add or updatelistContents- A set containing the listpinned- Whether the list is pinned or notsorted- Whether the list is sorted or not
-
addList
public void addList(String listName, Collection<String> listContents, boolean pinned, boolean sorted, OneClickListManager.ListEventSource source) Add a new list to the managed set. If a list with the same name already exists it will be replaced. The managed lists will contain no duplications and will maintain the same ordering.- Parameters:
listName- The name of the list to add or updatelistContents- A set containing the listpinned- Whether the list is pinned or notsorted- Whether the list is sorted or not
-
addList
Add a list to the collection with unpinned and unsorted attributes- Parameters:
listName- The name of the listlistContents- The contents of the list
-
addList
public void addList(String listName, Collection<String> listContents, OneClickListManager.ListEventSource listEventSource) Add a list to the collection with unpinned and unsorted attributes- Parameters:
listName- The name of the listlistContents- The contents of the list
-
getList
Get the list associated with a particular name, or null if no set with that name existed- Parameters:
listName- The name of the list to retrieve- Returns:
- A Set containing all the strings in the list, or null if the list did not exist
-
removeList
Remove a list from the set of managed lists.- Parameters:
listName- the name of the list to removesource- where the event came from
-
removeList
Remove a list from the set of managed lists.- Parameters:
listName- the name of the list to remove
-
setListPinned
Set the Pinned state of a list. A Pinned list will always appear at the top of the list of lists when displayed.- Parameters:
listName- The name of the listpinned- The pinned state to set
-
setListPinned
public void setListPinned(String listName, boolean pinned, OneClickListManager.ListEventSource source) Set the Pinned state of a list. A Pinned list will always appear at the top of the list of lists when displayed.- Parameters:
listName- The name of the listpinned- The pinned state to setsource- The source of the event
-
setListSorted
-
setListSorted
public void setListSorted(String listName, boolean sorted, OneClickListManager.ListEventSource source) Mark if the list is sorted or not. This method will NOT perform a sort- Parameters:
listName- The name of the listsorted- Whether the list has been sorted or not
-
getListNames
Get a collection of all the list names that are currently maintained- Returns:
- A set of the names of each unique list being managed
-
getLists
Get all the lists that are currently maintained- Returns:
- A set of the names of each unique list being managed
-
getWorkspaceInfo
public org.jdom2.Element getWorkspaceInfo()Description copied from interface:WorkspaceSerialize the class into an element to be stored in the workspace- Specified by:
getWorkspaceInfoin interfaceWorkspace- Returns:
- An
Elementcontaining the data to persist.
-
setWorkspaceInfo
public void setWorkspaceInfo(org.jdom2.Element workspaceInfo) Description copied from interface:WorkspaceRestore the class to the state defined by the data persisted in workspaceInfo- Specified by:
setWorkspaceInfoin interfaceWorkspace- Parameters:
workspaceInfo- AnElementcontaining the persisted state.
-