Interface InfoPanelItemProvider
-
- All Known Implementing Classes:
BusinessServiceEdgeInfoPanelItemProvider,BusinessServiceEdgeStatusInfoPanelItemProvider,BusinessServiceVertexAttributesInfoPanelItemProvider,BusinessServiceVertexInfoPanelItemProvider,BusinessServiceVertexStatusInfoPanelItemProvider,DefaultEdgeInfoPanelItemProvider,DefaultVertexInfoPanelItemProvider,EdgeInfoPanelItemProvider,GenericInfoPanelItemProvider,LocationInfoPanelItemProvider,NodeInfoPanelItemProvider,SimulationModeEnabledPanelItemProvider,SimulationModeReductionKeyInfoPanelItemProvider,SingleSelectedInfoPanelItemProvider,VertexInfoPanelItemProvider
public interface InfoPanelItemProviderProvider Interface to provide one to multipleInfoPanelItems.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T extends InfoPanelItem>
Collection<T>contributeIf(boolean predicate, java.util.function.Supplier<T> supplier)Helper method to create the Contributions Collection.Collection<? extends InfoPanelItem>getContributions(GraphContainer container)Returns all contributions for the current state of the given container.
-
-
-
Method Detail
-
getContributions
Collection<? extends InfoPanelItem> getContributions(GraphContainer container)
Returns all contributions for the current state of the given container.- Parameters:
container- the container used to decide which contributions to show- Returns:
- a bunch of contributions, if any. Should NEVER return null
-
contributeIf
static <T extends InfoPanelItem> Collection<T> contributeIf(boolean predicate, java.util.function.Supplier<T> supplier)
Helper method to create the Contributions Collection. Ifpredicateistruea singleton Collection with the value ofSupplier.get()is returned. Ifpredicateisfalsean empty Collection is returned, instead.- Type Parameters:
T- The type of theInfoPanelItem- Parameters:
predicate- Whether or not the value ofSupplier.get()is used (truemeans it is used)supplier- The supplier to use. Ifpredicateistrueit must NOT be null- Returns:
- a singleton Collection with the value of
Supplier.get()ifpredicateistrue, otherwise an empty collection
-
-