Search in sources :

Example 1 with CytoPanelStateChangedEvent

use of org.cytoscape.application.swing.events.CytoPanelStateChangedEvent in project cytoscape-impl by cytoscape.

the class CytoPanelImpl method notifyListeners.

private void notifyListeners(int notificationType) {
    final CyEventHelper eventHelper = serviceRegistrar.getService(CyEventHelper.class);
    // determine what event to fire
    switch(notificationType) {
        case NOTIFICATION_STATE_CHANGE:
            eventHelper.fireEvent(new CytoPanelStateChangedEvent(this, this, cytoPanelState));
            break;
        case NOTIFICATION_COMPONENT_SELECTED:
            int selectedIndex = getTabbedPane().getSelectedIndex();
            eventHelper.fireEvent(new CytoPanelComponentSelectedEvent(this, this, selectedIndex));
            break;
        case NOTIFICATION_COMPONENT_ADDED:
            break;
        case NOTIFICATION_COMPONENT_REMOVED:
            break;
    }
}
Also used : CyEventHelper(org.cytoscape.event.CyEventHelper) CytoPanelStateChangedEvent(org.cytoscape.application.swing.events.CytoPanelStateChangedEvent) CytoPanelComponentSelectedEvent(org.cytoscape.application.swing.events.CytoPanelComponentSelectedEvent)

Aggregations

CytoPanelComponentSelectedEvent (org.cytoscape.application.swing.events.CytoPanelComponentSelectedEvent)1 CytoPanelStateChangedEvent (org.cytoscape.application.swing.events.CytoPanelStateChangedEvent)1 CyEventHelper (org.cytoscape.event.CyEventHelper)1