use of org.cytoscape.filter.internal.filters.composite.CompositeFilterController in project cytoscape-impl by cytoscape.
the class TransformerPanelController method createView.
@Override
public JComponent createView(TransformerPanel parent, Transformer<CyNetwork, CyIdentifiable> transformer, int depth) {
// CompositeFilterImpl needs a CompositeFilterPanel but the top is blank so view will be null
JComponent view = transformerViewManager.createView(transformer);
if (transformer instanceof SubFilterTransformer || transformer instanceof CompositeFilter) {
String addButtonTT = transformerViewManager.getAddButtonTooltip(transformer);
CompositeFilterController controller = CompositeFilterController.createFor(view, addButtonTT);
CompositeFilter<CyNetwork, CyIdentifiable> compositeFilter;
if (transformer instanceof SubFilterTransformer)
compositeFilter = ((SubFilterTransformer<CyNetwork, CyIdentifiable>) transformer).getCompositeFilter();
else
compositeFilter = (CompositeFilter<CyNetwork, CyIdentifiable>) transformer;
return new CompositeFilterPanel<TransformerPanel>(parent, this, controller, compositeFilter, depth);
}
if (view == null)
throw new IllegalArgumentException("view could not be created for: " + transformer.getId());
return view;
}
use of org.cytoscape.filter.internal.filters.composite.CompositeFilterController in project cytoscape-impl by cytoscape.
the class FilterPanelController method createView.
@Override
public JComponent createView(FilterPanel parent, Transformer<CyNetwork, CyIdentifiable> filter, int depth) {
// CompositeFilterImpl needs a CompositeFilterPanel but the top is blank so view will be null
JComponent view = transformerViewManager.createView(filter);
if (view instanceof InteractivityChangedListener) {
((InteractivityChangedListener) view).handleInteractivityChanged(isInteractive);
}
if (filter instanceof CompositeFilter) {
String addButtonTT = transformerViewManager.getAddButtonTooltip(filter);
CompositeFilterController controller = CompositeFilterController.createFor(view, addButtonTT);
return new CompositeFilterPanel<FilterPanel>(parent, this, controller, (CompositeFilter<CyNetwork, CyIdentifiable>) filter, depth);
}
if (view == null)
throw new IllegalArgumentException("view could not be created for: " + filter.getId());
return view;
}
Aggregations