Search in sources :

Example 1 with TransformerElementViewModel

use of org.cytoscape.filter.internal.view.TransformerElementViewModel in project cytoscape-impl by cytoscape.

the class CompositeTransformerPanel method createViewModel.

private TransformerElementViewModel<TransformerPanel> createViewModel(Transformer<CyNetwork, CyIdentifiable> transformer) {
    JComponent component = transformerPanelController.createView(parent, transformer, 0);
    TransformerElementViewModel<TransformerPanel> viewModel = new TransformerElementViewModel<>(component, transformerPanelController, parent);
    if (transformer instanceof ValidatableTransformer) {
        transformerPanelController.getValidationManager().register((ValidatableTransformer<CyNetwork, CyIdentifiable>) transformer, viewModel);
    }
    return viewModel;
}
Also used : TransformerPanel(org.cytoscape.filter.internal.view.TransformerPanel) JComponent(javax.swing.JComponent) TransformerElementViewModel(org.cytoscape.filter.internal.view.TransformerElementViewModel) CyNetwork(org.cytoscape.model.CyNetwork) ValidatableTransformer(org.cytoscape.filter.model.ValidatableTransformer) CyIdentifiable(org.cytoscape.model.CyIdentifiable)

Example 2 with TransformerElementViewModel

use of org.cytoscape.filter.internal.view.TransformerElementViewModel in project cytoscape-impl by cytoscape.

the class CompositeFilterPanel method createViewModel.

@SuppressWarnings("unchecked")
private TransformerElementViewModel<P> createViewModel(Filter<CyNetwork, CyIdentifiable> filter) {
    JComponent component = filterPanelController.createView(parent, filter, depth + 1);
    TransformerElementViewModel<P> viewModel = new TransformerElementViewModel<P>(component, filterPanelController, parent);
    if (filter instanceof ValidatableTransformer) {
        filterPanelController.getValidationManager().register((ValidatableTransformer<CyNetwork, CyIdentifiable>) filter, viewModel);
    }
    return viewModel;
}
Also used : JComponent(javax.swing.JComponent) TransformerElementViewModel(org.cytoscape.filter.internal.view.TransformerElementViewModel) CyNetwork(org.cytoscape.model.CyNetwork) ValidatableTransformer(org.cytoscape.filter.model.ValidatableTransformer) CyIdentifiable(org.cytoscape.model.CyIdentifiable)

Aggregations

JComponent (javax.swing.JComponent)2 TransformerElementViewModel (org.cytoscape.filter.internal.view.TransformerElementViewModel)2 ValidatableTransformer (org.cytoscape.filter.model.ValidatableTransformer)2 CyIdentifiable (org.cytoscape.model.CyIdentifiable)2 CyNetwork (org.cytoscape.model.CyNetwork)2 TransformerPanel (org.cytoscape.filter.internal.view.TransformerPanel)1