Package com.illumon.iris.gui.filterlink
Enum FilterLinkRegistry
- All Implemented Interfaces:
Workspace
,Serializable
,Comparable<FilterLinkRegistry>
,java.lang.constant.Constable
public enum FilterLinkRegistry extends Enum<FilterLinkRegistry> implements Workspace
This class maintains a registry of link sources/targets. It does NOT however maintain the links themselves. This class
will register itself as a workspace and facilitate the saving and restoring of links.
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT
-
Method Summary
Modifier and Type Method Description void
deregisterSource(LinkSource source, boolean retainLinks)
void
deregisterTarget(LinkTarget target, boolean retainLinks)
org.jdom2.Element
exportShare(Collection<LinkSource> sources, Collection<LinkTarget> targets)
Exports for a shareable workspace.WeakReference<LinkTarget>
getLinkTargetReference(String targetId)
boolean
getShouldMatchColumns()
Indicates whether or not filter link panels should attempt to match the source column to the target column when the pull down is changed.Set<String>
getTargetIds()
Get all of the known target IDs.Collection<WeakReference<LinkTarget>>
getTargets()
Get all of the known targets.org.jdom2.Element
getWorkspaceInfo()
Serialize the class into an element to be stored in the workspacevoid
importShare(org.jdom2.Element workspaceInfo, Map<String,String> viewIdMap)
Imports links from a shared workspace.void
registerSource(LinkSource source)
Register the specified source with the registry.void
registerTarget(LinkTarget target)
Register the specified target with the registry.void
setShouldMatchColumns(boolean shouldMatchColumns)
Sets whether or not filter link panels should attempt to match the source column to the target column when the pull down is changed.void
setWorkspaceInfo(org.jdom2.Element workspaceInfo)
Restore the class to the state defined by the data persisted in workspaceInfostatic FilterLinkRegistry
valueOf(String name)
Returns the enum constant of this type with the specified name.static FilterLinkRegistry[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getShouldMatchColumns
public boolean getShouldMatchColumns()Indicates whether or not filter link panels should attempt to match the source column to the target column when the pull down is changed.- Returns:
- true if the panel should match columns, false otherwise
-
setShouldMatchColumns
public void setShouldMatchColumns(boolean shouldMatchColumns)Sets whether or not filter link panels should attempt to match the source column to the target column when the pull down is changed.- Parameters:
shouldMatchColumns
- true to match
-
registerTarget
Register the specified target with the registry. This method will automatically complete any links that have not been made yet.- Parameters:
target
- The target to register.- ImplNote:
- This method should only be called by a class to register itself.
-
registerSource
Register the specified source with the registry. This method will automatically complete any links that have not been made yet.- Parameters:
source
- The source to register.- ImplNote:
- This method should only be called by a class to register itself.
-
deregisterSource
-
deregisterTarget
-
getTargets
Get all of the known targets.- Returns:
- An unmodifiable collection of all of the known targets.
-
getTargetIds
Get all of the known target IDs.- Returns:
- An unmodifiable set of all the known target IDs.
-
getLinkTargetReference
-
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.
-
exportShare
public org.jdom2.Element exportShare(Collection<LinkSource> sources, Collection<LinkTarget> targets)Exports for a shareable workspace.- Parameters:
sources
- the source links to exporttargets
- the target links to export- Returns:
- An
Element
containing the data to persist.
-
importShare
Imports links from a shared workspace.- Parameters:
workspaceInfo
- the element containing the shared workspaceviewIdMap
- a map from old to new view IDs
-