Package com.illumon.iris.gui.filterlink
Class FilterLinkHelper
java.lang.Object
com.illumon.iris.gui.filterlink.FilterLinkHelper
A helper class that implements basic Filter Link functionality. Classes that implement LinkSource or LinkTarget can
delegate many of their methods to this class.
-
Constructor Summary
ConstructorsConstructorDescriptionFilterLinkHelper(com.fishlib.io.logger.Logger log, IrisView view, Linkable linkable) FilterLinkHelper(com.fishlib.io.logger.Logger log, IrisView view, Linkable linkable, Consumer<ImageIcon> filterIconChangedHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTarget(LinkTarget target) voidOpens the link editor dialog.voidSends a link event to all targets.voidforEachTarget(Consumer<LinkTarget> action) Execute the specified action against each target of this linkable.Get the appropriate link icon for the currently established set of links.getLinks()getLinks(LinkSource source) voidinit()booleanisLinked()voidmakeLink(LinkSource from, String sourceColumn, String targetColumn, Condition condition) voidIf this helper was constructed with an iconChangedHandler it invokes that with the appropriate icon, otherwise it will update the view icon based on the current link status.voidvoidremoveAllLinks(LinkSource from) voidremoveBrokenLinks(LinkTarget target) Search for and remove all links to the specified target that are broken (a column does not exist on one or both sides)voidremoveLink(LinkSource from, String srcColumn, String targetColumn, Condition condition) voidremoveLink(LinkTarget to, String srcColumn, String targetColumn, Condition condition) Remove the specified link from this object to the specified target.voidremoveTarget(LinkTarget target) voidtryLinkFrom(Window win) Initiates the process of creating a link from another Linkable.voidInitiates the process of creating a link to another Linkable.
-
Constructor Details
-
FilterLinkHelper
-
FilterLinkHelper
-
-
Method Details
-
init
public void init() -
addTarget
- See Also:
-
removeTarget
- See Also:
-
getTargets
- See Also:
-
makeLink
public void makeLink(LinkSource from, String sourceColumn, String targetColumn, Condition condition) -
removeLink
-
removeLink
Remove the specified link from this object to the specified target.- Parameters:
to- the target object of the linksrcColumn- the source column of the linktargetColumn- the target column of the linkcondition- the link condition
-
removeAllLinks
- See Also:
-
getLinks
- See Also:
-
getLinks
- See Also:
-
removeAllLinks
public void removeAllLinks()- See Also:
-
isLinked
public boolean isLinked()- See Also:
-
getSourceLinkColumns
- See Also:
-
maybeUpdateIcon
public void maybeUpdateIcon()If this helper was constructed with an iconChangedHandler it invokes that with the appropriate icon, otherwise it will update the view icon based on the current link status. -
getLinkIcon
Get the appropriate link icon for the currently established set of links.- Returns:
- an
ImageIconrepresenting the proper link state, or null if no links
-
tryLinkFrom
Initiates the process of creating a link from another Linkable.- Parameters:
win- the parent window for the link dialog
-
tryLinkTo
Initiates the process of creating a link to another Linkable.- Parameters:
win- the parent window for the link dialog
-
editLinks
Opens the link editor dialog.- Parameters:
win- the parent window for the link dialog
-
fireEvent
Sends a link event to all targets. This may be hooked up to a double click. If any links are detected as broken it will notify the user with an option to ignore, repair, or break the suspect links.- Parameters:
event- the link event to send
-
forEachTarget
Execute the specified action against each target of this linkable.- Parameters:
action- the action to execute
-
removeBrokenLinks
Search for and remove all links to the specified target that are broken (a column does not exist on one or both sides)- Parameters:
target- the target to remove broken links from
-