Package com.illumon.iris.gui.filterlink
Interface LinkTarget
- All Superinterfaces:
Linkable
- All Known Subinterfaces:
BidirectionalLink
- All Known Implementing Classes:
FilterSortPivotWidget
,InputOverlayTable
,IrisTable
,LinkableChartPanel
,OneClickTablePanel
public interface LinkTarget extends Linkable
A target for a
LinkSource
.-
Method Summary
Modifier and Type Method Description default void
applyDefaultFilters()
Requests that LinkTarget apply its own default filters (if any) to a column.default void
applyFilters(String column, Collection<FilterData> filters)
Requests that LinkTarget apply a collection of filters to a column.default void
applyFilters(org.jdom2.Element filters)
Requests that LinkTarget apply a saved filter stateboolean
getClearFiltersBeforeUpdate()
Indicates if a Link Target will clear its filters before an update.default org.jdom2.Element
getCurrentFilters()
Return a persistable copy of the current filters (if any).Map<LinkSource,Collection<LinkDescriptor>>
getLinks()
Collection<LinkDescriptor>
getLinks(LinkSource source)
default LinkTarget
getTrueTarget()
Gets the true target if this link target is a proxy.void
makeLink(LinkSource from, String sourceColumn, String targetColumn, Condition condition)
Create a link from sourceColumn on aLinkSource
to the targetColumn of thisLinkTarget
using the specifiedCondition
as a filter conditionvoid
removeAllLinks(LinkSource from)
Remove all column filter links between this object and the specified source.void
removeLink(LinkSource from, String srcColumn, String targetColumn, Condition condition)
Remove a link between the specified columns and condition between this target and it's source.void
setClearFiltersBeforeUpdate(boolean shouldClear)
Sets if a Link Target should clear its filters before an update.void
update(LinkEvent event)
Notify this LinkTarget of an event from a source.Methods inherited from interface com.illumon.iris.gui.filterlink.Linkable
getAllowedConditions, getComponent, getFriendlyName, getId, getLinkableColumns, getTrueLinkable, isLinked, readyForLinks, removeAllLinks
-
Method Details
-
makeLink
Create a link from sourceColumn on aLinkSource
to the targetColumn of thisLinkTarget
using the specifiedCondition
as a filter condition- Parameters:
from
- The source of the filter link.sourceColumn
- The source column of the filter linktargetColumn
- The column to compare to the sourceColumncondition
- The condition to apply to the matching- ImplNote:
- It's the responsibility of the implementer to call
LinkSource.addTarget(LinkTarget)
to set up the callbacks.
-
removeLink
Remove a link between the specified columns and condition between this target and it's source. Note that for a link to be removed all of the specified parameters must match what was added viamakeLink(LinkSource, String, String, Condition)
.- Parameters:
from
- The source to remove a link tosrcColumn
- The column link being removedtargetColumn
- The column being linked tocondition
- The condition of the filter
-
removeAllLinks
Remove all column filter links between this object and the specified source.- Parameters:
from
- The source of the links to remove.
-
update
Notify this LinkTarget of an event from a source.- Parameters:
event
- A LinkEvent containing the details of the event.
-
applyFilters
Requests that LinkTarget apply a collection of filters to a column.- Parameters:
column
- the column to filterfilters
- the filters to apply
-
applyDefaultFilters
default void applyDefaultFilters()Requests that LinkTarget apply its own default filters (if any) to a column. -
getCurrentFilters
default org.jdom2.Element getCurrentFilters()Return a persistable copy of the current filters (if any). -
applyFilters
default void applyFilters(org.jdom2.Element filters)Requests that LinkTarget apply a saved filter state- Parameters:
filters
- The saved workspace data to apply.
-
getLinks
Map<LinkSource,Collection<LinkDescriptor>> getLinks()- Returns:
- A collection of all links attached to this target.
-
getLinks
- Parameters:
source
- The source to check links from.- Returns:
- A collection of all links between the specified source and this target.
-
getTrueTarget
Gets the true target if this link target is a proxy.- Returns:
- the true target for this link
-
getClearFiltersBeforeUpdate
boolean getClearFiltersBeforeUpdate()Indicates if a Link Target will clear its filters before an update.- Returns:
- true if it will clear, false otherwise
-
setClearFiltersBeforeUpdate
void setClearFiltersBeforeUpdate(boolean shouldClear)Sets if a Link Target should clear its filters before an update.- Parameters:
shouldClear
- true to clear, false otherwise
-