Examples of FilterController


Examples of org.gephi.filters.api.FilterController

        public DuplicateAction() {
            super(NbBundle.getMessage(QueryNode.class, "QueryNode.actions.duplicate"));
        }

        public void actionPerformed(ActionEvent e) {
            FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
            if (query.getParent() == null) {
                //filterController.add(query);
                Query q = filterController.createQuery(query.getFilter());
                filterController.add(q);
            } else {
                //filterController.add(query.getParent());
                Query q = filterController.createQuery(query.getParent().getFilter());
                filterController.add(q);
            }
        }
View Full Code Here

Examples of org.gephi.filters.api.FilterController

        public RemoveAction() {
            super(NbBundle.getMessage(SavedQueryNode.class, "SavedQueryNode.actions.remove"));
        }

        public void actionPerformed(ActionEvent e) {
            FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
            FilterLibrary filterLibrary = filterController.getModel().getLibrary();
            filterLibrary.deleteQuery(query);
        }
View Full Code Here

Examples of org.gephi.filters.api.FilterController

            public void run() {
                //UI update
                removeAll();
                setBorder(null);
                if (query != null) {
                    FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
                    FilterBuilder builder = filterController.getModel().getLibrary().getBuilder(query.getFilter());
                    try {
                        JPanel panel = builder.getPanel(query.getFilter());
                        if (panel != null) {
                            add(panel, BorderLayout.CENTER);
                            panel.setOpaque(false);
View Full Code Here

Examples of org.gephi.filters.api.FilterController

        panel = new FiltersPanel();
        add(panel, BorderLayout.CENTER);

        //Model management
        FilterController controller = Lookup.getDefault().lookup(FilterController.class);
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        pc.addWorkspaceListener(new WorkspaceListener() {

            public void initialize(Workspace workspace) {
                workspace.add(new FilterUIModel());
View Full Code Here

Examples of org.gephi.filters.api.FilterController

        }

        if (builder != null) {
            //Create filter
            Filter filter = builder.getFilter();
            FilterController fc = Lookup.getDefault().lookup(FilterController.class);
            Query query = fc.createQuery(filter);

            FilterProperty property = null;
            boolean end = false;
            while (reader.hasNext() && !end) {
                Integer eventType = reader.next();
View Full Code Here

Examples of org.gephi.filters.api.FilterController

        public DuplicateAction() {
            super(NbBundle.getMessage(QueryNode.class, "QueryNode.actions.duplicate"));
        }

        public void actionPerformed(ActionEvent e) {
            FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
            Query ancestor = query;
            while (ancestor.getParent() != null) {
                ancestor = ancestor.getParent();
            }
            duplicateQuery(filterController, null, ancestor);
View Full Code Here

Examples of org.gephi.filters.api.FilterController

    private final boolean dynamic;

    public DynamicAttributesHelper(Filter filter, Graph graph) {
        if (graph != null) {
            Workspace workspace = graph.getGraphModel().getWorkspace();
            FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
            filterModel = filterController.getModel(workspace);

            DynamicController dynamicController = Lookup.getDefault().lookup(DynamicController.class);
            dynamicModel = dynamicController.getModel(workspace);
            dynamic = isDynamic(filter);
        } else {
View Full Code Here

Examples of org.gephi.filters.api.FilterController

    private void initEvents() {
        resetButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                for (Query query : filterModel.getQueries()) {
                    controller.remove(query);
                }
//                uiModel.setSelectedQuery(null);
                controller.selectVisible(null);
                controller.filterVisible(null);
                ((FiltersExplorer) libraryTree).setup(manager, filterModel, uiModel);
            }
        });
        filterButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                //selectButton.setSelected(false);
                if (uiModel.getSelectedQuery() != null && filterButton.isSelected()) {
                    FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                    controller.filterVisible(uiModel.getSelectedRoot());
                } else {
                    FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                    controller.filterVisible(null);
                }
            }
        });
        selectButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                //filterButton.setSelected(false);
                if (uiModel.getSelectedQuery() != null && selectButton.isSelected()) {
                    FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                    controller.selectVisible(uiModel.getSelectedRoot());
                } else {
                    FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                    controller.selectVisible(null);
                }
            }
        });
        exportColumnButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (uiModel.getSelectedQuery() != null) {
                    FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                    NotifyDescriptor.InputLine question = new NotifyDescriptor.InputLine(
                            NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.exportColumn.input"),
                            NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.exportColumn.input.title"));
                    if (DialogDisplayer.getDefault().notify(question) == NotifyDescriptor.OK_OPTION) {
                        String input = question.getInputText();
                        if (input != null && !input.isEmpty()) {
                            controller.exportToColumn(input, uiModel.getSelectedRoot());
                        }
                    }
                }
            }
        });
        exportWorkspaceButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (uiModel.getSelectedQuery() != null) {
                    FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                    controller.exportToNewWorkspace(uiModel.getSelectedRoot());
                }
            }
        });
        exportLabelVisible.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (uiModel.getSelectedQuery() != null) {
                    FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                    controller.exportToLabelVisible(uiModel.getSelectedRoot());
                }
            }
        });
        /*autoRefreshButton.addActionListener(new ActionListener() {

View Full Code Here

Examples of org.gephi.filters.api.FilterController

    }

    public void stateChanged(ChangeEvent e) {
        if (e.getSource() instanceof FilterUIModel) {
            if (uiModel.getSelectedQuery() != null && filterButton.isSelected()) {
                FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                controller.filterVisible(uiModel.getSelectedRoot());
            } else if (uiModel.getSelectedQuery() != null && selectButton.isSelected()) {
                FilterController controller = Lookup.getDefault().lookup(FilterController.class);
                controller.selectVisible(uiModel.getSelectedRoot());
            }
        } else if (e.getSource() instanceof FilterModel) {
            if (uiModel.getSelectedQuery() != null && filterModel.getCurrentQuery() == null) {
                //Remove case
                if(!Arrays.asList(filterModel.getQueries()).contains(uiModel.getSelectedRoot())) {
View Full Code Here

Examples of org.gephi.filters.api.FilterController

    }

    @Override
    public void actionPerformed(ActionEvent ev) {
        SavedQueryNode node = (SavedQueryNode) ev.getSource();
        FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
        filterController.add(node.getQuery());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.