Skip to content
Snippets Groups Projects
Commit 986525a3 authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Minor clean-up

parent 8b49e01e
No related branches found
No related tags found
No related merge requests found
Showing with 44 additions and 63 deletions
...@@ -52,7 +52,6 @@ import static org.cytoscape.work.ServiceProperties.COMMAND_NAMESPACE; ...@@ -52,7 +52,6 @@ import static org.cytoscape.work.ServiceProperties.COMMAND_NAMESPACE;
import de.hhu.ba.yoshikoWrapper.core.ConfigurationManager; import de.hhu.ba.yoshikoWrapper.core.ConfigurationManager;
import de.hhu.ba.yoshikoWrapper.core.CyCore; import de.hhu.ba.yoshikoWrapper.core.CyCore;
import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; import de.hhu.ba.yoshikoWrapper.core.LocalizationManager;
import de.hhu.ba.yoshikoWrapper.core.YoshUtil;
import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader; import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader;
import de.hhu.ba.yoshikoWrapper.swing.components.MainPanel; import de.hhu.ba.yoshikoWrapper.swing.components.MainPanel;
import de.hhu.ba.yoshikoWrapper.taskFactories.CommandTaskFactory; import de.hhu.ba.yoshikoWrapper.taskFactories.CommandTaskFactory;
...@@ -94,11 +93,11 @@ public class CyActivator extends AbstractCyActivator { ...@@ -94,11 +93,11 @@ public class CyActivator extends AbstractCyActivator {
CyCore.rootNetworkManager = getService(context,CyRootNetworkManager.class); CyCore.rootNetworkManager = getService(context,CyRootNetworkManager.class);
//TODO: Not sure how to correctly infer arguments here //TODO: Not sure how to correctly infer arguments here
CyCore.renderingEngineFactory = getService(context,RenderingEngineFactory.class); CyCore.renderingEngineFactory = getService(context,RenderingEngineFactory.class);
CyCore.cloneNetworkTaskFactory = getService(context,CloneNetworkTaskFactory.class); //CyCore.cloneNetworkTaskFactory = getService(context,CloneNetworkTaskFactory.class);
CyCore.commandExecutorTaskFactory = getService(context,CommandExecutorTaskFactory.class); CyCore.commandExecutorTaskFactory = getService(context,CommandExecutorTaskFactory.class);
//Store a reference to the Version for easier access //Store a reference to the Version for easier access
YoshUtil.version = context.getBundle().getVersion(); //YoshUtil.version = context.getBundle().getVersion();
//Set language according to settings -> Default to enUS //Set language according to settings -> Default to enUS
LocalizationManager.switchLanguage(cm.getProperties().getProperty("locale", "enUS")); LocalizationManager.switchLanguage(cm.getProperties().getProperty("locale", "enUS"));
......
...@@ -55,7 +55,7 @@ public class CyCore { ...@@ -55,7 +55,7 @@ public class CyCore {
public static CyApplicationManager cy; public static CyApplicationManager cy;
public static DialogTaskManager dialogTaskManager; public static DialogTaskManager dialogTaskManager;
public static ConfigurationManager cm; public static ConfigurationManager cm;
public static BundleContext context; //public static BundleContext context;
public static CyServiceRegistrar registrar; public static CyServiceRegistrar registrar;
public static CyNetworkViewFactory networkViewFactory; public static CyNetworkViewFactory networkViewFactory;
public static CyNetworkFactory networkFactory; public static CyNetworkFactory networkFactory;
...@@ -68,7 +68,7 @@ public class CyCore { ...@@ -68,7 +68,7 @@ public class CyCore {
public static VisualMappingFunctionFactory continuousMappingFactory; public static VisualMappingFunctionFactory continuousMappingFactory;
public static CyRootNetworkManager rootNetworkManager; public static CyRootNetworkManager rootNetworkManager;
public static RenderingEngineFactory<CyNetwork> renderingEngineFactory; public static RenderingEngineFactory<CyNetwork> renderingEngineFactory;
public static CloneNetworkTaskFactory cloneNetworkTaskFactory; //public static CloneNetworkTaskFactory cloneNetworkTaskFactory;
public static CommandExecutorTaskFactory commandExecutorTaskFactory; public static CommandExecutorTaskFactory commandExecutorTaskFactory;
// //
......
...@@ -71,12 +71,12 @@ public class LocalizationManager { ...@@ -71,12 +71,12 @@ public class LocalizationManager {
} }
//https://en.wikipedia.org/wiki/Regional_Indicator_Symbol -> Right now there are not enough fonts support this //https://en.wikipedia.org/wiki/Regional_Indicator_Symbol -> Right now there are not enough fonts support this
public static String localeToUnicodeFlag(Locale locale) { // public static String localeToUnicodeFlag(Locale locale) {
String countryCode = locale.getCountry(); // String countryCode = locale.getCountry();
int firstLetter = Character.codePointAt(countryCode, 0)-0x41+0x1F1E6; // int firstLetter = Character.codePointAt(countryCode, 0)-0x41+0x1F1E6;
int secondLetter = Character.codePointAt(countryCode, 1)-0x41+0x1F1E6; // int secondLetter = Character.codePointAt(countryCode, 1)-0x41+0x1F1E6;
return new String(Character.toChars(firstLetter))+new String(Character.toChars(secondLetter)); // return new String(Character.toChars(firstLetter))+new String(Character.toChars(secondLetter));
} // }
//SETTER/GETTER methods //SETTER/GETTER methods
......
package de.hhu.ba.yoshikoWrapper.core;
import org.osgi.framework.Version;
public class YoshUtil {
public static Version version;
public static final String ABOUT_LINK = "https://spqrph.github.io/cytoscape-tutorials/presentations/yoshiko/yoshiko.html#/title";
}
...@@ -55,14 +55,14 @@ public class GraphAnalyzer { ...@@ -55,14 +55,14 @@ public class GraphAnalyzer {
return false; return false;
} }
public static boolean isDirected(CyNetwork net) { // public static boolean isDirected(CyNetwork net) {
for (CyEdge e: net.getEdgeList()) { // for (CyEdge e: net.getEdgeList()) {
if (e.isDirected()) { // if (e.isDirected()) {
return true; // return true;
} // }
} // }
return false; // return false;
} // }
/** /**
* Generates a fitting bitmask by choosing the reduction rules that appear to be the best choice based on current research * Generates a fitting bitmask by choosing the reduction rules that appear to be the best choice based on current research
......
...@@ -4,16 +4,11 @@ import java.awt.event.ActionEvent; ...@@ -4,16 +4,11 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.io.IOException;
import java.net.URI;
import java.util.HashMap;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.ImageIcon; import javax.swing.ImageIcon;
import javax.swing.JButton; import javax.swing.JButton;
import javax.swing.JOptionPane;
import org.cytoscape.command.CommandExecutorTaskFactory;
import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; import de.hhu.ba.yoshikoWrapper.core.LocalizationManager;
import de.hhu.ba.yoshikoWrapper.cytoUtil.CommandExecutor; import de.hhu.ba.yoshikoWrapper.cytoUtil.CommandExecutor;
......
...@@ -34,12 +34,12 @@ public class IntegerInputField extends JFormattedTextField{ ...@@ -34,12 +34,12 @@ public class IntegerInputField extends JFormattedTextField{
private final NumberFormatter formatter; private final NumberFormatter formatter;
public IntegerInputField(int minValue, int maxValue) { // public IntegerInputField(int minValue, int maxValue) {
super(); // super();
formatter = FormatHelper.getIntegerFormatter(minValue,maxValue); // formatter = FormatHelper.getIntegerFormatter(minValue,maxValue);
this.setFormatter(formatter); // this.setFormatter(formatter);
this.setColumns(8); // this.setColumns(8);
} // }
public IntegerInputField() { public IntegerInputField() {
super(); super();
......
...@@ -34,9 +34,7 @@ public class GetClustersTask implements ObservableTask { ...@@ -34,9 +34,7 @@ public class GetClustersTask implements ObservableTask {
} }
@Override @Override
public void cancel() { public void cancel() {}
}
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
......
package de.hhu.ba.yoshikoWrapper.tasks; package de.hhu.ba.yoshikoWrapper.tasks;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import org.cytoscape.work.ObservableTask; import org.cytoscape.work.ObservableTask;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment