Search in sources :

Example 1 with SetCurrentVisualStyleEvent

use of org.cytoscape.view.vizmap.events.SetCurrentVisualStyleEvent in project cytoscape-impl by cytoscape.

the class VisualMappingManagerImpl method setCurrentVisualStyle.

@Override
public void setCurrentVisualStyle(VisualStyle newStyle) {
    if (newStyle == null)
        newStyle = defaultStyle;
    boolean changed = !newStyle.equals(currentStyle);
    this.currentStyle = newStyle;
    if (changed) {
        final CyEventHelper eventHelper = serviceRegistrar.getService(CyEventHelper.class);
        eventHelper.fireEvent(new SetCurrentVisualStyleEvent(this, currentStyle));
    }
}
Also used : CyEventHelper(org.cytoscape.event.CyEventHelper) SetCurrentVisualStyleEvent(org.cytoscape.view.vizmap.events.SetCurrentVisualStyleEvent)

Aggregations

CyEventHelper (org.cytoscape.event.CyEventHelper)1 SetCurrentVisualStyleEvent (org.cytoscape.view.vizmap.events.SetCurrentVisualStyleEvent)1