本文整理汇总了Java中org.gephi.project.api.ProjectController.getCurrentWorkspace方法的典型用法代码示例。如果您正苦于以下问题:Java ProjectController.getCurrentWorkspace方法的具体用法?Java ProjectController.getCurrentWorkspace怎么用?Java ProjectController.getCurrentWorkspace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gephi.project.api.ProjectController
的用法示例。
在下文中一共展示了ProjectController.getCurrentWorkspace方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initProject
import org.gephi.project.api.ProjectController; //导入方法依赖的package包/类
/**
* Initialize a Gephi Toolkit project.
*/
private static void initProject() {
ProjectController pc = Lookup.getDefault().lookup(
ProjectController.class);
pc.newProject();
pc.getCurrentWorkspace();
}
示例2: bootstrapGephi
import org.gephi.project.api.ProjectController; //导入方法依赖的package包/类
private GraphModel bootstrapGephi() {
// boostrap gephi
Lookup lookup = Lookup.getDefault();
ProjectController pc = lookup.lookup(ProjectController.class);
pc.newProject();
@SuppressWarnings("unused")
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
return graphModel;
}
示例3: GephiProcessing
import org.gephi.project.api.ProjectController; //导入方法依赖的package包/类
public GephiProcessing(final String filePath, final double reportingIntervalCount) {
betweennessAverages = new ArrayList<>();
closenessAverages = new ArrayList<>();
eccentricityAverages = new ArrayList<>();
clusteringCoefficientAverages = new ArrayList<>();
topicDiameterAverages = new ArrayList<>();
degreeAverages = new ArrayList<>();
inDegreeAverages = new ArrayList<>();
outDegreeAverages = new ArrayList<>();
controlMsgsSentAvg = new ArrayList<>();
controlMsgsRcvdAvg = new ArrayList<>();
controlKbSentAvg = new ArrayList<>();
controlKbRcvdAvg = new ArrayList<>();
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
workspace = pc.getCurrentWorkspace();
this.filePath = filePath;
open();
graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
this.reportingIntervalCount = reportingIntervalCount;
}
示例4: GephiController
import org.gephi.project.api.ProjectController; //导入方法依赖的package包/类
public GephiController(DataController dc) {
ProjectController projectController = Lookup.getDefault().lookup(ProjectController.class);
workspace = projectController.getCurrentWorkspace();
projectController.newProject();
this.dataController = dc;
ipMap = dc.getMongoController().getIpToNodeMap();
GraphMouseListener gml = Lookup.getDefault().lookup(GraphMouseListener.class);
gml.setGephiController(this);
// By now the JPanel on which to draw on is not known, so we cannot set up the RenderTarget.
// This is done in setGraphPanel(...)
}
示例5: convert
import org.gephi.project.api.ProjectController; //导入方法依赖的package包/类
/**
*
* @param srcpath
* @throws IOException
*/
public void convert(String srcpath) throws IOException {
File graphmlFile = new File(srcpath);
// Init a project - and therefore a workspace
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
// get import controller
ImportController importController = Lookup.getDefault().lookup(ImportController.class);
// Import file
Container container = importController.importFile(graphmlFile);
// Append imported data to GraphAPI
importController.process(container, new DefaultProcessor(), workspace);
graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
}