Examples of FilterController


Examples of org.freeplane.features.filter.FilterController

        setBackgroundColor(ColorUtils.stringToColor(rgbString));
    }

  // Map: R/W
  public void setFilter(final Closure<Boolean> closure) {
    final FilterController filterController = FilterController.getCurrentFilterController();
    if (closure == null) {
      filterController.applyNoFiltering();
    }
    else {
      final Filter filter = new Filter(ProxyUtils.createCondition(closure, getScriptContext()), false, false,
          true);
      filterController.applyFilter(filter, getDelegate(), true);
    }
  }
View Full Code Here

Examples of org.freeplane.features.filter.FilterController

    setFilter(closure);
  }

  // Map: R/W
  public void setFilter(final boolean showAncestors, final boolean showDescendants, final Closure<Boolean> closure) {
    final FilterController filterController = FilterController.getCurrentFilterController();
    if (closure == null) {
      filterController.applyNoFiltering();
    }
    else {
      final Filter filter = new Filter(ProxyUtils.createCondition(closure, getScriptContext()), showAncestors,
          showDescendants, true);
      filterController.applyFilter(filter, getDelegate(), true);
    }
  }
View Full Code Here

Examples of org.freeplane.features.filter.FilterController

  public MapModel() {
    extensionContainer = new ExtensionContainer(new HashMap<Class<? extends IExtension>, IExtension>());
    this.root = null;
    listeners = new LinkedList<IMapChangeListener>();
    nodes = new HashMap<String, NodeModel>();
    final FilterController filterController = FilterController.getCurrentFilterController();
    if (filterController != null) {
      filter = filterController.createTransparentFilter();
    }
    final ModeController modeController = Controller.getCurrentModeController();
    iconRegistry = new IconRegistry(modeController.getMapController(), this);
  }
View Full Code Here

Examples of org.freeplane.features.filter.FilterController

    final Point origin = new Point();
    UITools.convertPointToAncestor(mainView, origin, this);
    g.translate(origin.x, origin.y);
    mainView.paintDecoration(this, g);
    g.translate(-origin.x, -origin.y);
    final FilterController filterController = FilterController.getController(getMap().getModeController().getController());
    if(filterController.isNodeHighlighted(getModel())){
      final Color oldColor = g.getColor();
      final Stroke oldStroke = g.getStroke();
      g.setColor(Color.MAGENTA);
      g.setStroke(getMap().getStandardSelectionStroke());
      final JComponent content = getContent();
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

            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

        }

        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

        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

    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
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.