Search in sources :

Example 6 with NumberIndex

use of org.cytoscape.filter.internal.widgets.autocomplete.index.NumberIndex in project cytoscape-impl by cytoscape.

the class RangeSelectionListener method stateChanged.

/**
 * State Change Event.
 *
 * @param e ChangeEvent Object.
 */
public void stateChanged(ChangeEvent e) {
    final CyNetwork cyNetwork = applicationManager.getCurrentNetwork();
    GenericIndex index = quickFind.getIndex(cyNetwork);
    NumberRangeModel model = (NumberRangeModel) slider.getModel();
    if (slider.isVisible()) {
        if (index instanceof NumberIndex) {
            Number lowValue = (Number) model.getLowValue();
            Number highValue = (Number) model.getHighValue();
            quickFind.selectRange(cyNetwork, lowValue, highValue);
        }
    }
}
Also used : GenericIndex(org.cytoscape.filter.internal.widgets.autocomplete.index.GenericIndex) NumberIndex(org.cytoscape.filter.internal.widgets.autocomplete.index.NumberIndex) NumberRangeModel(org.cytoscape.filter.internal.prefuse.data.query.NumberRangeModel) CyNetwork(org.cytoscape.model.CyNetwork)

Aggregations

NumberIndex (org.cytoscape.filter.internal.widgets.autocomplete.index.NumberIndex)6 NumberRangeModel (org.cytoscape.filter.internal.prefuse.data.query.NumberRangeModel)3 GenericIndex (org.cytoscape.filter.internal.widgets.autocomplete.index.GenericIndex)3 CyNetwork (org.cytoscape.model.CyNetwork)3 JRangeSliderExtended (org.cytoscape.filter.internal.widgets.slider.JRangeSliderExtended)2 Dimension (java.awt.Dimension)1 ArrayList (java.util.ArrayList)1 BitSet (java.util.BitSet)1 List (java.util.List)1 CyFilter (org.cytoscape.filter.internal.filters.model.CyFilter)1 NumericFilter (org.cytoscape.filter.internal.filters.model.NumericFilter)1 StringFilter (org.cytoscape.filter.internal.filters.model.StringFilter)1 TaskMonitorBase (org.cytoscape.filter.internal.quickfind.util.TaskMonitorBase)1 TextIndex (org.cytoscape.filter.internal.widgets.autocomplete.index.TextIndex)1 TextIndexComboBox (org.cytoscape.filter.internal.widgets.autocomplete.view.TextIndexComboBox)1 CyEdge (org.cytoscape.model.CyEdge)1 CyNode (org.cytoscape.model.CyNode)1 CyNetworkView (org.cytoscape.view.model.CyNetworkView)1