Package org.gephi.appearance.api

Examples of org.gephi.appearance.api.AppearanceModel


            @Override
            public void select(Workspace workspace) {
                AppearanceUIModel oldModel = model;
                model = workspace.getLookup().lookup(AppearanceUIModel.class);
                if (model == null) {
                    AppearanceModel appearanceModel = appearanceController.getModel(workspace);
                    model = new AppearanceUIModel(AppearanceUIController.this, appearanceModel);
                    workspace.add(model);
                }
                model.select();
                if (tableObserver != null) {
                    tableObserver.destroy();
                }
                tableObserver = new ColumnObserver(workspace);
                tableObserver.start();

                firePropertyChangeEvent(AppearanceUIModelEvent.MODEL, oldModel, model);
            }

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

            @Override
            public void close(Workspace workspace) {
            }

            @Override
            public void disable() {
                AppearanceUIModel oldModel = model;
                model = null;
                firePropertyChangeEvent(AppearanceUIModelEvent.MODEL, oldModel, model);
                if (tableObserver != null) {
                    tableObserver.destroy();
                }
            }
        });

        if (pc.getCurrentWorkspace() != null) {
            model = pc.getCurrentWorkspace().getLookup().lookup(AppearanceUIModel.class);
            if (model == null) {
                AppearanceModel appearanceModel = appearanceController.getModel(pc.getCurrentWorkspace());
                model = new AppearanceUIModel(this, appearanceModel);
                pc.getCurrentWorkspace().add(model);
            }
        }
View Full Code Here


    public AppearanceUIModel getModel(Workspace workspace) {
        AppearanceUIModel m = workspace.getLookup().lookup(AppearanceUIModel.class);
        if (m == null) {
            AppearanceController ac = Lookup.getDefault().lookup(AppearanceController.class);
            AppearanceModel appearanceModel = ac.getModel(workspace);
            m = new AppearanceUIModel(this, appearanceModel);
            workspace.add(m);
        }
        return m;
    }
View Full Code Here

TOP

Related Classes of org.gephi.appearance.api.AppearanceModel

Copyright © 2018 www.massapicom. 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.