Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilayer Network Visualization. #282

Open
wants to merge 16 commits into
base: master-forge
Choose a base branch
from
4 changes: 4 additions & 0 deletions modules/MultiVizPlugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## MultiVizPlugin

MultiViz: A Gephi Plugin for Scalable Visualization of Multi-Layer Networks
https://arxiv.org/abs/2209.03149
88 changes: 88 additions & 0 deletions modules/MultiVizPlugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>gephi-plugin-parent</artifactId>
<groupId>org.gephi</groupId>
<version>0.9.3</version>
</parent>

<groupId>amrita</groupId>
<artifactId>multiviz</artifactId>
<version>1.0.0</version>
<packaging>nbm</packaging>

<name>MultiVizPlugin</name>

<dependencies>
<!-- Insert dependencies here -->
<dependency>
<groupId>org.gephi</groupId>
<artifactId>layout-api</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>graph-api</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>layout-plugin</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>ui-utils</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>filters-api</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>appearance-api</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>filters-plugin</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
<type>jar</type>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<configuration>
<licenseName>MIT</licenseName>
<author>J</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl></authorUrl>
<publicPackages>
<!-- Insert public packages -->
</publicPackages>
</configuration>
</plugin>
</plugins>
</build>

<!-- Snapshot Repositories (only needed if developing against a SNAPSHOT version) -->
<repositories>
<repository>
<id>oss-sonatype</id>
<name>oss-sonatype</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
Copyright 2008 WebAtlas
Authors : Mathieu Bastian, Alexis Jacomy, Julian Bilcke
Website : http://www.gephi.org

This file is part of Gephi.

Gephi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Gephi is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Gephi. If not, see <http://www.gnu.org/licenses/>.
*/
package helpers;

import java.beans.PropertyEditorSupport;

/**
*
* @author J
*/
abstract class AbstractProjectionPropertyEditor extends PropertyEditorSupport {

protected AbstractProjectionPropertyEditor() {
this.defaultColumns = new String[]{"Node Label", "Edge Type"};
}

private String selectedColumn;
private final String[] defaultColumns;

@Override
public String[] getTags() {
if (multiviz.MultiLayerVisualization.selectableColumns.isEmpty()){
return defaultColumns;
} else {
return multiviz.MultiLayerVisualization.selectableColumns.toArray(String[]::new);
}
}

@Override
public Object getValue() {
return selectedColumn;
}

@Override
public void setValue(Object value) {
if(multiviz.MultiLayerVisualization.selectableColumns.isEmpty()){
for (String gColumn : defaultColumns) {
if (gColumn.equals((String)value)) {
selectedColumn = gColumn;
break;
}
}
} else {
for(int i=0;i<multiviz.MultiLayerVisualization.selectableColumns.toArray().length;i++){
if(multiviz.MultiLayerVisualization.selectableColumns.get(i).equals((String)value)){
selectedColumn = multiviz.MultiLayerVisualization.selectableColumns.get(i);
break;
}
}
}
}

@Override
public String getAsText() {
return (String)getValue();
}

@Override
public void setAsText(String text) throws IllegalArgumentException {
setValue(text);
}

public boolean isNumberColumn(String column) {
return false;
}

public boolean isStringColumn(String column) {
return true;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
Copyright 2008 WebAtlas
Authors : Mathieu Bastian, Mathieu Jacomy, Julian Bilcke
Website : http://www.gephi.org

This file is part of Gephi.

Gephi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Gephi is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Gephi. If not, see <http://www.gnu.org/licenses/>.
*/
package helpers;

/**
*
* @author Alexis Jacomy
*/
public class CustomComboBoxEditor extends AbstractProjectionPropertyEditor {
public CustomComboBoxEditor() {
super();
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
Copyright 2008 WebAtlas
Authors : Mathieu Bastian, Mathieu Jacomy, Julian Bilcke
Website : http://www.gephi.org

This file is part of Gephi.

Gephi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Gephi is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Gephi. If not, see <http://www.gnu.org/licenses/>.
*/
package helpers;

import java.beans.PropertyEditorSupport;

/**
*
* @author J
*/
public abstract class LayoutAlgorithmProperty extends PropertyEditorSupport{

private final String[] listOfAlgorithms;
private String selectedAlgorithm = "Linear Layout";

protected LayoutAlgorithmProperty(){
this.listOfAlgorithms = new String[]{"Circle Layout", "Grid Layout", "Linear Layout", "Random Layout", "ForceAtlas2", "Fruchterman Reingold", "Yifan Hu"};
}


@Override
public String[] getTags() {
return listOfAlgorithms;
}

@Override
public Object getValue() {
return selectedAlgorithm;
}

@Override
public void setValue(Object value) {
for (String algorithm : listOfAlgorithms) {
if(algorithm.equals((String) value)) {
selectedAlgorithm = algorithm;
break;
}
}
}

@Override
public String getAsText() {
return getValue().toString();
}

@Override
public void setAsText(String text) throws IllegalArgumentException {
setValue(text);
}
}
33 changes: 33 additions & 0 deletions modules/MultiVizPlugin/src/main/java/helpers/LayoutDropDowns.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Copyright 2008 WebAtlas
Authors : Mathieu Bastian, Mathieu Jacomy, Julian Bilcke
Website : http://www.gephi.org

This file is part of Gephi.

Gephi is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Gephi is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Gephi. If not, see <http://www.gnu.org/licenses/>.
*/


package helpers;

/**
*
* @author J
*/
public class LayoutDropDowns extends LayoutAlgorithmProperty{
public LayoutDropDowns() {
super();
}
}
39 changes: 39 additions & 0 deletions modules/MultiVizPlugin/src/main/java/helpers/Point.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package helpers;

public class Point
{

public Point(float x, float y)
{
this.x = x;
this.y = y;
}
public Point()
{
this(0,0);
}
public float GetX()
{
return x;
}
public float GetY()
{
return y;
}
public void SetX(float x)
{
this.x = x;
}
public void SetY(float y)
{
this.y = y;
}

public void Print()
{
System.out.print("(" + x + "," + y + ")");
}

private float x;
private float y;
}
Loading