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

Minor clean-up

parent 8b49e01e
Branches
Tags
No related merge requests found
Showing with 44 additions and 63 deletions
......@@ -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.CyCore;
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.swing.components.MainPanel;
import de.hhu.ba.yoshikoWrapper.taskFactories.CommandTaskFactory;
......@@ -94,11 +93,11 @@ public class CyActivator extends AbstractCyActivator {
CyCore.rootNetworkManager = getService(context,CyRootNetworkManager.class);
//TODO: Not sure how to correctly infer arguments here
CyCore.renderingEngineFactory = getService(context,RenderingEngineFactory.class);
CyCore.cloneNetworkTaskFactory = getService(context,CloneNetworkTaskFactory.class);
//CyCore.cloneNetworkTaskFactory = getService(context,CloneNetworkTaskFactory.class);
CyCore.commandExecutorTaskFactory = getService(context,CommandExecutorTaskFactory.class);
//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
LocalizationManager.switchLanguage(cm.getProperties().getProperty("locale", "enUS"));
......
......@@ -55,7 +55,7 @@ public class CyCore {
public static CyApplicationManager cy;
public static DialogTaskManager dialogTaskManager;
public static ConfigurationManager cm;
public static BundleContext context;
//public static BundleContext context;
public static CyServiceRegistrar registrar;
public static CyNetworkViewFactory networkViewFactory;
public static CyNetworkFactory networkFactory;
......@@ -68,7 +68,7 @@ public class CyCore {
public static VisualMappingFunctionFactory continuousMappingFactory;
public static CyRootNetworkManager rootNetworkManager;
public static RenderingEngineFactory<CyNetwork> renderingEngineFactory;
public static CloneNetworkTaskFactory cloneNetworkTaskFactory;
//public static CloneNetworkTaskFactory cloneNetworkTaskFactory;
public static CommandExecutorTaskFactory commandExecutorTaskFactory;
//
......
......@@ -71,12 +71,12 @@ public class LocalizationManager {
}
//https://en.wikipedia.org/wiki/Regional_Indicator_Symbol -> Right now there are not enough fonts support this
public static String localeToUnicodeFlag(Locale locale) {
String countryCode = locale.getCountry();
int firstLetter = Character.codePointAt(countryCode, 0)-0x41+0x1F1E6;
int secondLetter = Character.codePointAt(countryCode, 1)-0x41+0x1F1E6;
return new String(Character.toChars(firstLetter))+new String(Character.toChars(secondLetter));
}
// public static String localeToUnicodeFlag(Locale locale) {
// String countryCode = locale.getCountry();
// int firstLetter = Character.codePointAt(countryCode, 0)-0x41+0x1F1E6;
// int secondLetter = Character.codePointAt(countryCode, 1)-0x41+0x1F1E6;
// return new String(Character.toChars(firstLetter))+new String(Character.toChars(secondLetter));
// }
//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 {
return false;
}
public static boolean isDirected(CyNetwork net) {
for (CyEdge e: net.getEdgeList()) {
if (e.isDirected()) {
return true;
}
}
return false;
}
// public static boolean isDirected(CyNetwork net) {
// for (CyEdge e: net.getEdgeList()) {
// if (e.isDirected()) {
// return true;
// }
// }
// return false;
// }
/**
* 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;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.IOException;
import java.net.URI;
import java.util.HashMap;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
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.cytoUtil.CommandExecutor;
......
......@@ -34,12 +34,12 @@ public class IntegerInputField extends JFormattedTextField{
private final NumberFormatter formatter;
public IntegerInputField(int minValue, int maxValue) {
super();
formatter = FormatHelper.getIntegerFormatter(minValue,maxValue);
this.setFormatter(formatter);
this.setColumns(8);
}
// public IntegerInputField(int minValue, int maxValue) {
// super();
// formatter = FormatHelper.getIntegerFormatter(minValue,maxValue);
// this.setFormatter(formatter);
// this.setColumns(8);
// }
public IntegerInputField() {
super();
......
......@@ -34,9 +34,7 @@ public class GetClustersTask implements ObservableTask {
}
@Override
public void cancel() {
}
public void cancel() {}
@SuppressWarnings("unchecked")
@Override
......
package de.hhu.ba.yoshikoWrapper.tasks;
import java.util.ArrayList;
import java.util.Collection;
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