Package org.cytoscape.view.vizmap
Interface VisualMappingManager
-
public interface VisualMappingManager
Manager for VisualStyles. This object manages mapping from view model to VisualStyle. User objects can access all VisualStyles and VisualMappingFunctions through this class.Add/Remove operations will be done through events. For more information, read JavaDoc for VisualStyleAddedEvent and VisualStyleAboutToBeRemovedEvent.
Module:
vizmap-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>vizmap-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addVisualStyle(VisualStyle visualStyle)
Add a newVisualStyle
to this manager.Set<VisualLexicon>
getAllVisualLexicon()
Returns a Set of allVisualLexicon
s.Set<VisualStyle>
getAllVisualStyles()
Returns all available VisualStyles managed by this object.VisualStyle
getCurrentVisualStyle()
Returns currently selected Visual Style.VisualStyle
getDefaultVisualStyle()
Return defaultVisualStyle
.VisualStyle
getVisualStyle(CyNetworkView networkViewModel)
Returns the VisualStyle associated with the target network view model.void
removeVisualStyle(VisualStyle visualStyle)
Remove a VisualStyle from this manager.void
setCurrentVisualStyle(VisualStyle visualStyle)
Set the specifiedVisualStyle
as the current one.void
setVisualStyle(VisualStyle visualStyle, CyNetworkView networkViewModel)
Set a VisualStyle to the target network view model.
-
-
-
Method Detail
-
setVisualStyle
void setVisualStyle(VisualStyle visualStyle, CyNetworkView networkViewModel)
Set a VisualStyle to the target network view model.- Parameters:
visualStyle
- Visual Style to be set.networkViewModel
- The target network view model.
-
getVisualStyle
VisualStyle getVisualStyle(CyNetworkView networkViewModel)
Returns the VisualStyle associated with the target network view model.- Parameters:
networkViewModel
- Target network view- Returns:
- VisualStyle associated with the network view model. This is always non-null value. If there is no mapping from given view model to a style, then default style will be used.
-
getAllVisualStyles
Set<VisualStyle> getAllVisualStyles()
Returns all available VisualStyles managed by this object.- Returns:
- Set of all registered VisualStyles.
-
addVisualStyle
void addVisualStyle(VisualStyle visualStyle)
Add a newVisualStyle
to this manager.- Parameters:
visualStyle
- new visual style to be registered.
-
removeVisualStyle
void removeVisualStyle(VisualStyle visualStyle)
Remove a VisualStyle from this manager.- Parameters:
visualStyle
- VisualStyle to be removed.
-
getDefaultVisualStyle
VisualStyle getDefaultVisualStyle()
Return defaultVisualStyle
. This is just an empty visual style.- Returns:
- default Visual Style.
-
setCurrentVisualStyle
void setCurrentVisualStyle(VisualStyle visualStyle)
Set the specifiedVisualStyle
as the current one.- Parameters:
visualStyle
- theVisualStyle
that will become the current style.
-
getCurrentVisualStyle
VisualStyle getCurrentVisualStyle()
Returns currently selected Visual Style.- Returns:
- Selected Visual Style.
-
getAllVisualLexicon
Set<VisualLexicon> getAllVisualLexicon()
Returns a Set of allVisualLexicon
s.- Returns:
- a Set of all
VisualLexicon
s.
-
-