当前位置: 首页>>代码示例>>Java>>正文


Java Workspace类代码示例

本文整理汇总了Java中org.gephi.project.api.Workspace的典型用法代码示例。如果您正苦于以下问题:Java Workspace类的具体用法?Java Workspace怎么用?Java Workspace使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Workspace类属于org.gephi.project.api包,在下文中一共展示了Workspace类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: load

import org.gephi.project.api.Workspace; //导入依赖的package包/类
/**
 * Will load a network file, based on the Gephi ImportController
 * 
 * @param netFile
 * @throws IOException
 */
public void load(File netFile) throws IOException {
	Workspace workspace = Lookup.getDefault()
			.lookup(ProjectController.class).getCurrentWorkspace();

	ImportController importController = Lookup.getDefault().lookup(
			ImportController.class);

	// Import file
	Container container;
	container = importController.importFile(netFile);
	container.getLoader().setEdgeDefault(EdgeDefault.DIRECTED);

	// Append imported data to GraphAPI
	importController.process(container, new DefaultProcessor(), workspace);
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:22,代码来源:BrowsableNetwork.java

示例2: GephiProcessing

import org.gephi.project.api.Workspace; //导入依赖的package包/类
public GephiProcessing(Workspace workspace, GraphModel graphModel, 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<>();

    this.workspace = workspace;
    this.graphModel = graphModel;
    this.reportingIntervalCount = reportingIntervalCount;
    filePath = null;
}
 
开发者ID:vizpub,项目名称:vizpub,代码行数:24,代码来源:GephiProcessing.java

示例3: mouseReleased

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public void mouseReleased(PreviewMouseEvent event, PreviewProperties properties, Workspace workspace) {
	if (!isReactiveFor(event))
		return;

	if (startX != endX || startY != endY) {
		logger.info("Dragged from (" + startX + "," + startY + ") to (" + endX + "," + endY + ")");
		Lookup.getDefault().lookup(MouseRenderer.class).endDragging();

		gc.selectNodesFromCoords(startX, startY, endX, endY);

	} else {
		gc.showNodeInfo(startX, startY);
	}

}
 
开发者ID:nullbox,项目名称:Data-and-Information-Visualization-Project,代码行数:17,代码来源:GraphMouseListener.java

示例4: setGraphModel

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public void setGraphModel(GraphModel graphModel) {
    this.graphModel = graphModel;
    Workspace workspace = graphModel.getWorkspace();
    DynamicController dynamicController = Lookup.getDefault().lookup(DynamicController.class);
    if (dynamicController != null && workspace != null) {
        dynamicModel = dynamicController.getModel(workspace);
    }
    // Trick: reset here to take the profile of the graph in account for default values
    resetPropertiesValues();
}
 
开发者ID:nolanlab,项目名称:vortex,代码行数:12,代码来源:ForceAtlas2.java

示例5: bootstrapGephi

import org.gephi.project.api.Workspace; //导入依赖的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;
}
 
开发者ID:ServiceCutter,项目名称:ServiceCutter,代码行数:11,代码来源:GephiSolver.java

示例6: mouseDragged

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public void mouseDragged(PreviewMouseEvent event, PreviewProperties properties, Workspace workspace) {
	if (!isReactiveFor(event))
		return;
	if (startX == endX && startY == endY) {
		Lookup.getDefault().lookup(MouseRenderer.class).startDragging(startX, startY);
	}
	endX = event.x;
	endY = event.y;
	Lookup.getDefault().lookup(MouseRenderer.class).dragStep(endX, endY);

	event.setConsumed(true);

}
 
开发者ID:nullbox,项目名称:Data-and-Information-Visualization-Project,代码行数:15,代码来源:GraphMouseListener.java

示例7: mousePressed

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public void mousePressed(PreviewMouseEvent event, PreviewProperties properties, Workspace workspace) {
	if (!isReactiveFor(event))
		return;
	startX = endX = event.x;
	startY = endY = event.y;

	event.setConsumed(true);

}
 
开发者ID:nullbox,项目名称:Data-and-Information-Visualization-Project,代码行数:11,代码来源:GraphMouseListener.java

示例8: setWorkspace

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public void setWorkspace(Workspace workspace) {
	this.workspace = workspace;
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:5,代码来源:TikzExporter.java

示例9: getWorkspace

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public Workspace getWorkspace() {
	return workspace;
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:5,代码来源:TikzExporter.java

示例10: setWorkspace

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public void setWorkspace(Workspace workspace) {
    this.workspace = workspace;
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:5,代码来源:TikzExport.java

示例11: getWorkspace

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public Workspace getWorkspace() {
    return workspace;
}
 
开发者ID:dev-cuttlefish,项目名称:cuttlefish,代码行数:5,代码来源:TikzExport.java

示例12: mouseClicked

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public void mouseClicked(PreviewMouseEvent event, PreviewProperties properties, Workspace workspace) {
    return;
}
 
开发者ID:nolanlab,项目名称:vortex,代码行数:5,代码来源:MyPreviewMouseListener.java

示例13: mouseDragged

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public void mouseDragged(PreviewMouseEvent event,
        PreviewProperties properties, Workspace workspace) {
}
 
开发者ID:nolanlab,项目名称:vortex,代码行数:5,代码来源:MyPreviewMouseListener.java

示例14: mouseReleased

import org.gephi.project.api.Workspace; //导入依赖的package包/类
@Override
public void mouseReleased(PreviewMouseEvent event,
        PreviewProperties properties, Workspace workspace) {
}
 
开发者ID:nolanlab,项目名称:vortex,代码行数:5,代码来源:MyPreviewMouseListener.java

示例15: convert

import org.gephi.project.api.Workspace; //导入依赖的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();

   }
 
开发者ID:learning-layers,项目名称:Expert-Identification-Service,代码行数:27,代码来源:GraphMl2GEXFConverter.java


注:本文中的org.gephi.project.api.Workspace类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。