Examples of RankingModel


Examples of org.gephi.ranking.api.RankingModel

            @Override
            public void select(Workspace workspace) {
                model = workspace.getLookup().lookup(RankingUIModel.class);
                if (model == null) {
                    RankingModel rankingModel = rc.getModel(workspace);
                    model = new RankingUIModel(RankingUIController.this, rankingModel);
                    workspace.add(model);
                }
                if (modelChangeListener != null) {
                    modelChangeListener.stateChanged(new ChangeEvent(model));
                }
            }

            @Override
            public void unselect(Workspace workspace) {
                if (model != null) {
                }
            }

            @Override
            public void close(Workspace workspace) {
            }

            @Override
            public void disable() {
                model = null;
                if (modelChangeListener != null) {
                    modelChangeListener.stateChanged(null);
                }
            }
        });

        if (pc.getCurrentWorkspace() != null) {
            model = pc.getCurrentWorkspace().getLookup().lookup(RankingUIModel.class);
            if (model == null) {
                RankingModel rankingModel = rc.getModel(pc.getCurrentWorkspace());
                model = new RankingUIModel(this, rankingModel);
                pc.getCurrentWorkspace().add(model);
            }
        }
    }
View Full Code Here

Examples of org.gephi.ranking.api.RankingModel

    public RankingUIModel getModel(Workspace workspace) {
        final RankingController rc = Lookup.getDefault().lookup(RankingController.class);
        RankingUIModel m = workspace.getLookup().lookup(RankingUIModel.class);
        if (m == null) {
            RankingModel rankingModel = rc.getModel(workspace);
            m = new RankingUIModel(RankingUIController.this, rankingModel);
            workspace.add(m);
        }
        return m;
    }
View Full Code Here

Examples of org.gephi.ranking.api.RankingModel

        if (event.is(RankingEvent.EventType.REFRESH_RANKING)) {
            firePropertyChangeEvent(RANKINGS, null, null);
        } else if (event.is(RankingEvent.EventType.APPLY_TRANSFORMER)) {
            firePropertyChangeEvent(APPLY_TRANSFORMER, null, null);
        } else if (event.is(RankingEvent.EventType.REFRESH_VIEW)) {
            RankingModel rankingModel = event.getSource();
            GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(rankingModel.getWorkspace());
            boolean localScale = shouldLocalScaleEnabled(graphModel.getVisibleView());
            setLocalScaleEnabled(localScale);
        }
    }
View Full Code Here

Examples of org.gephi.ranking.api.RankingModel

        return model;
    }

    @Override
    public RankingModel getModel(Workspace workspace) {
        RankingModel m = workspace.getLookup().lookup(RankingModelImpl.class);
        if (m == null) {
            m = new RankingModelImpl(workspace);
            workspace.add(m);
        }
        return m;
View Full Code Here

Examples of org.gephi.ranking.api.RankingModel

            }
        });

        //Listen to apply button to add recent palettes
        RankingController rankingController = Lookup.getDefault().lookup(RankingController.class);
        RankingModel rankingModel = rankingController.getModel();
        rankingModel.addRankingListener(new RankingListener() {

            public void rankingChanged(RankingEvent event) {
                if (event.is(RankingEvent.EventType.APPLY_TRANSFORMER)) {
                    if (transformer == event.getTransformer()) {
                        addRecentPalette();
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.