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 enum
static interface
Listener 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 TypeMethodDescriptionvoid
addList
(String listName, Collection<String> listContents) Add a list to the collection with unpinned and unsorted attributesvoid
addList
(String listName, Collection<String> listContents, boolean pinned, boolean sorted, boolean upperCase, OneClickListManager.ListEventSource source) Add a new list to the managed set.void
addList
(String listName, Collection<String> listContents, boolean pinned, boolean sorted, OneClickListManager.ListEventSource source) Add a new list to the managed set.void
addList
(String listName, Collection<String> listContents, OneClickListManager.ListEventSource listEventSource) Add a list to the collection with unpinned and unsorted attributesvoid
Register for notification of change to the underlying listsorg.jdom2.Element
exportShare
(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.Element
Serialize the class into an element to be stored in the workspacevoid
importShare
(org.jdom2.Element workspaceInfo) Imports one click lists from a shared workspace.void
removeList
(String listName) Remove a list from the set of managed lists.void
removeList
(String listName, OneClickListManager.ListEventSource source) Remove a list from the set of managed lists.void
Deregister for notification of change to the underlying listsvoid
renameList
(String origName, String newName, OneClickListManager.ListEventSource source) Rename a list and notify observersvoid
setListPinned
(String listName, boolean pinned) Set the Pinned state of a list.void
setListPinned
(String listName, boolean pinned, OneClickListManager.ListEventSource source) Set the Pinned state of a list.void
setListSorted
(String listName, boolean sorted) void
setListSorted
(String listName, boolean sorted, OneClickListManager.ListEventSource source) Mark if the list is sorted or not.void
setWorkspaceInfo
(org.jdom2.Element workspaceInfo) Restore the class to the state defined by the data persisted in workspaceInfostatic OneClickListManager
Returns 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, valueOf
Methods 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:Workspace
Serialize the class into an element to be stored in the workspace- Specified by:
getWorkspaceInfo
in interfaceWorkspace
- Returns:
- An
Element
containing the data to persist.
-
setWorkspaceInfo
public void setWorkspaceInfo(org.jdom2.Element workspaceInfo) Description copied from interface:Workspace
Restore the class to the state defined by the data persisted in workspaceInfo- Specified by:
setWorkspaceInfo
in interfaceWorkspace
- Parameters:
workspaceInfo
- AnElement
containing the persisted state.
-