Commit e17a86c6 authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Merge remote-tracking branch 'origin/dev_general'

# Conflicts:
#	src/main/java/de/hhu/ba/yoshikoWrapper/core/YoshikoLoader.java
parents 76d61ceb 0ddc91f1
......@@ -110,7 +110,7 @@ public class CyActivator extends AbstractCyActivator {
}
}
//Register commands / CyRest
//Register commands / CyRest //TODO: Group shared calls for better code readability / less lines of code
TaskFactory commandTaskFactory_PERFORM_ALGORITHM = new CommandTaskFactory(YoshikoCommand.PERFORM_ALGORITHM);
Properties props_PERFORM_ALGORITHM = new Properties();
props_PERFORM_ALGORITHM.setProperty(COMMAND_NAMESPACE, "yoshiko");
......
/*******************************************************************************
* Copyright (C) 2017 Philipp Spohr
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
......@@ -25,9 +25,9 @@ import org.cytoscape.property.AbstractConfigDirPropsReader;
import org.cytoscape.property.CyProperty;
public class ConfigurationManager extends AbstractConfigDirPropsReader{
public ConfigurationManager(String appName, String fileName){
super(appName, fileName, CyProperty.SavePolicy.CONFIG_DIR);
this.getProperties().list(System.out);
}
//this.getProperties().list(System.out);
}
}
......@@ -4,21 +4,25 @@ package de.hhu.ba.yoshikoWrapper.core;
import java.io.IOException;
import org.cytoscape.model.CyColumn;
import org.cytoscape.model.CyNetwork;
import org.cytoscape.work.Tunable;
import org.cytoscape.work.TunableValidator;
public class ParameterSet implements TunableValidator
{
@Tunable(description="Network to analyze for clusters", context="nogui")
public CyNetwork net = CyCore.cy.getCurrentNetwork();
@Tunable(description="Time Limit for the ILP mode", context="nogui")
public int timeLimit = -1;
@Tunable(description="A column in the edge table containing weights", context="nogui")
public CyColumn weightColumn;
public String weightColumnName;
@Tunable(description="A column containing boolean entries for edges that are to be treated as permanent",context="nogui")
public CyColumn permanentColumn;
public String permanentColumnName;
@Tunable(description="A column containing boolean entries for edges that are to be treated as forbidden",context="nogui")
public CyColumn forbiddenColumn;
public String forbiddenColumnName;
@Tunable(description="The default insertion cost that is to be used for non-existing edges",context="nogui")
public double defaultInsertionCost = -1;
......@@ -48,18 +52,36 @@ public class ParameterSet implements TunableValidator
/**Describes whether auto configuration of the reduction rules is to be used. Overrides the bit mask.**/
public boolean suggestReduction = true;
@Tunable(description="Determines the number of clusters that are to be generated. -1 generates the optimal amount of clusters in the sense of WCE",context="nogui")
public int clusterCount = -1;
@Override
public ValidationState getValidationState(Appendable errMsg) {
if (!checkBitmask(reductionRulesBitMask)) {
try {
errMsg.append("The Bitmask provided is invalid! Needs to be six bit binary (example: 011001)");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println("DEBUG: Running VALIDATION of tunables"); //TODO: Move to logger (if it would work)
try {
if (net!= null) {
//Verify column validity
CyColumn weightColumn = net.getDefaultEdgeTable().getColumn(weightColumnName);
if (weightColumn == null) {
errMsg.append("Could not find a column named: "+weightColumnName+"\n");
return ValidationState.INVALID;
}
}
if (!checkBitmask(reductionRulesBitMask)) {
errMsg.append("The Bitmask provided is invalid! Needs to be six bit binary (example: 011001)\n");
return ValidationState.INVALID;
}
//Checks for cluster count number
if ((clusterCount < 0 && clusterCount != -1)||(clusterCount == 0)) {
errMsg.append("Invalid cluster count number!");
return ValidationState.INVALID;
}
return ValidationState.INVALID;
return ValidationState.OK;
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return ValidationState.OK;
return ValidationState.INVALID;
}
/**
......@@ -79,4 +101,12 @@ public class ParameterSet implements TunableValidator
return true;
}
@Override
public String toString(){
String ret = "";
ret += "Target Cluster Count: "+clusterCount+"\n";
//TODO
return ret;
}
}
......@@ -15,6 +15,11 @@ public class GraphAnalyzer {
//private static Logger logger = YoshikoLogger.getInstance().getLogger();
/**
* Simple helper function, checks if a network contains multiple edges between a pair of nodes
* @param net The CyNetwork that is to be analyzed
* @return <b>true</b> if a pair of nodes exists that is connected with more than one edge, <b>false</b> otherwise
*/
public static boolean isMultiGraph(CyNetwork net) {
//TODO: Better algorithm?
......@@ -43,7 +48,7 @@ public class GraphAnalyzer {
* This function is symmetric
* @param e1 An arbitrary CyEdge
* @param e2 An arbitrary CyEdge
* @return true if the edges connect the same pair of nodes, false otherwise
* @return <b>true</b> if the edges connect the same pair of nodes, <b>false</b> otherwise
*/
private static boolean connectSameNodes(CyEdge e1, CyEdge e2) {
if (//Treating all edges as undirected here
......@@ -98,12 +103,23 @@ public class GraphAnalyzer {
ret += (usePDRRule ? "1" : "0");
ret += (useSNRule ? "1" : "0");
//TODO: Spend some thoughts on logging, make a coherent design decision on logging
//logger.info("Suggesting the following reduction-rules bitmask: "+ret);
System.out.println("Suggesting the following reduction-rules bitmask: "+ret);
//System.out.println("Suggesting the following reduction-rules bitmask: "+ret);
return ret;
}
/**
* Simple helper function that checks if a WCE instance contains real values (as opposed to only integers)
* @param net The network from which the WCE instance is to be derived
* @param weightColumn The CyColumn from which - if != null - the edge weights are taken
* @param permanentColumn The CyColumn from which - if != null - we derive if edges are permanent
* @param forbiddenColumn The CyColumn from which - if != null - we derive if edges are forbidden
* @param defaultInsertionCost The insertion cost used for non-existing edges or ones with no mapping associated
* @param defaultDeletionCost The deletion cost for edges with no mapping associated
* @return true if the WCE instance is real-valued, false otherwise
*/
public static boolean containsRealValues(
CyNetwork net,
CyColumn weightColumn,
......
......@@ -27,7 +27,8 @@ public final class HelpLinks {
public static final HashMap<String,Object> mainInfo = new HashMap<String,Object>();
static {
mainInfo.put("url", "https://spqrph.github.io/cytoscape-tutorials/presentations/yoshiko.html#/title");
mainInfo.put("url", "file:///home/philipp/workspace/cs/cytoscape-tutorials/presentations/yoshiko.html");
//mainInfo.put("url", "https://spqrph.github.io/cytoscape-tutorials/presentations/yoshiko.html#/title");
}
}
......@@ -59,6 +59,10 @@ public class ClusterEditingSolutions {
LibraryInterfaceJNI.ClusterEditingSolutions_setFlags(swigCPtr, this, SolutionFlags.getCPtr(f), f);
}
public void printSolution(long index) {
LibraryInterfaceJNI.ClusterEditingSolutions_printSolution(swigCPtr, this, index);
}
public ClusterEditingSolutions() {
this(LibraryInterfaceJNI.new_ClusterEditingSolutions(), true);
}
......
......@@ -25,8 +25,8 @@ public class LibraryInterface {
LibraryInterfaceJNI.setVerbosity(level);
}
public static CoreAlgorithm getRun(LibraryInput input, int nrOptimalSolutions, String rulesBitMask, double multiplicativeFactor, boolean useHeuristic, boolean separatePartitionCuts, boolean separateTriangles) {
long cPtr = LibraryInterfaceJNI.getRun(LibraryInput.getCPtr(input), input, nrOptimalSolutions, rulesBitMask, multiplicativeFactor, useHeuristic, separatePartitionCuts, separateTriangles);
public static CoreAlgorithm getRun(LibraryInput input, int nrOptimalSolutions, String rulesBitMask, double multiplicativeFactor, boolean useHeuristic, boolean separatePartitionCuts, boolean separateTriangles, int targetClusterCount) {
long cPtr = LibraryInterfaceJNI.getRun(LibraryInput.getCPtr(input), input, nrOptimalSolutions, rulesBitMask, multiplicativeFactor, useHeuristic, separatePartitionCuts, separateTriangles, targetClusterCount);
return (cPtr == 0) ? null : new CoreAlgorithm(cPtr, false);
}
......
......@@ -53,6 +53,7 @@ public class LibraryInterfaceJNI {
public final static native long ClusterEditingSolutions_getNumberOfSolutions(long jarg1, ClusterEditingSolutions jarg1_);
public final static native long ClusterEditingSolutions_getFlags(long jarg1, ClusterEditingSolutions jarg1_);
public final static native void ClusterEditingSolutions_setFlags(long jarg1, ClusterEditingSolutions jarg1_, long jarg2, SolutionFlags jarg2_);
public final static native void ClusterEditingSolutions_printSolution(long jarg1, ClusterEditingSolutions jarg1_, long jarg2);
public final static native long new_ClusterEditingSolutions();
public final static native void delete_ClusterEditingSolutions(long jarg1);
public final static native long new_LibraryInput();
......@@ -79,7 +80,7 @@ public class LibraryInterfaceJNI {
public final static native void setTimeLimit(int jarg1);
public final static native void setThreadLimit(int jarg1);
public final static native void setVerbosity(int jarg1);
public final static native long getRun(long jarg1, LibraryInput jarg1_, int jarg2, String jarg3, double jarg4, boolean jarg5, boolean jarg6, boolean jarg7);
public final static native long getRun(long jarg1, LibraryInput jarg1_, int jarg2, String jarg3, double jarg4, boolean jarg5, boolean jarg6, boolean jarg7, int jarg8);
public static void SwigDirector_CplexInformer_updateStatus__SWIG_0(CplexInformer jself, int state) {
jself.updateStatus(YoshikoState.swigToEnum(state));
......
/*******************************************************************************
* Copyright (C) 2017 Philipp Spohr
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
******************************************************************************/
package de.hhu.ba.yoshikoWrapper.swing.components;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import de.hhu.ba.yoshikoWrapper.core.LocalizationManager;
import de.hhu.ba.yoshikoWrapper.swing.SwingUtil;
@SuppressWarnings("serial")
public class ClusterCountChooser extends JPanel {
private final IntegerInputField numSolutionsSetter;
private final JLabel label;
public ClusterCountChooser() {
//Swing Component init
numSolutionsSetter = new IntegerInputField(1,Integer.MAX_VALUE);
numSolutionsSetter.setValue(2);
label = new JLabel(LocalizationManager.get("nrClusters"));
SwingUtil.addAll(this,label, numSolutionsSetter);
BoxLayout layout = new BoxLayout(this, BoxLayout.LINE_AXIS);
this.setLayout(layout);
}
@Override
public void setEnabled(boolean enabled) {
numSolutionsSetter.setEnabled(enabled);
}
public int getClusterCount() {
return numSolutionsSetter.getValueAsInt();
}
}
......@@ -60,7 +60,7 @@ SetCurrentNetworkListener
{
//Swing components
private final JComboBox<CyColumn> editingCostMapper;
private final JComboBox<CyColumn> weightMapper;
private final JComboBox<CyColumn> permanentMapper;
private final JComboBox<CyColumn> forbiddenMapper;
......@@ -79,12 +79,12 @@ SetCurrentNetworkListener
//SWING COMPONENTS
//Combo-Boxes that map to the CyColumns
editingCostMapper = new JComboBox<CyColumn>();
weightMapper = new JComboBox<CyColumn>();
permanentMapper = new JComboBox<CyColumn>();
forbiddenMapper = new JComboBox<CyColumn>();
//Should only be enabled if the option is checked
editingCostMapper.setEnabled(false);
weightMapper.setEnabled(false);
permanentMapper.setEnabled(false);
forbiddenMapper.setEnabled(false);
......@@ -93,7 +93,7 @@ SetCurrentNetworkListener
useMappingForb = new JCheckBox("Map edges as forbidden");
useMappingCost.addActionListener(
new EnableWhenSelectedListener(useMappingCost, editingCostMapper)
new EnableWhenSelectedListener(useMappingCost, weightMapper)
);
useMappingPerm.addActionListener(
new EnableWhenSelectedListener(useMappingPerm, permanentMapper)
......@@ -103,7 +103,7 @@ SetCurrentNetworkListener
);
SwingUtil.addAll(this,useMappingCost,editingCostMapper);
SwingUtil.addAll(this,useMappingCost,weightMapper);
SwingUtil.addAll(this,useMappingPerm,permanentMapper);
SwingUtil.addAll(this,useMappingForb,forbiddenMapper);
......@@ -117,7 +117,7 @@ SetCurrentNetworkListener
.addComponent(useMappingForb)
)
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(editingCostMapper)
.addComponent(weightMapper)
.addComponent(permanentMapper)
.addComponent(forbiddenMapper)
)
......@@ -127,7 +127,7 @@ SetCurrentNetworkListener
layout.setVerticalGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup()
.addComponent(useMappingCost)
.addComponent(editingCostMapper)
.addComponent(weightMapper)
)
.addGroup(layout.createParallelGroup()
.addComponent(useMappingPerm)
......@@ -153,18 +153,18 @@ SetCurrentNetworkListener
if (net != null) { //Check if a network is loaded
//Clear entries
editingCostMapper.removeAllItems();
weightMapper.removeAllItems();
for (CyColumn c : net.getDefaultEdgeTable().getColumns()){
//Only add columns with numeric values
if (c.getType() == Integer.class || c.getType() == Double.class) {
editingCostMapper.addItem(c);
weightMapper.addItem(c);
}
}
boolean enable = (editingCostMapper.getItemCount() > 0) ? true : false;
boolean enable = (weightMapper.getItemCount() > 0) ? true : false;
useMappingCost.setEnabled(enable);
if (!useMappingCost.isEnabled()) {
useMappingCost.setSelected(false);
editingCostMapper.setEnabled(false);
weightMapper.setEnabled(false);
}
forbiddenMapper.removeAllItems();
......@@ -247,7 +247,7 @@ SetCurrentNetworkListener
public CyColumn getEditingCostColumn() {
if (useMappingCost.isSelected()) {
return editingCostMapper.getItemAt(editingCostMapper.getSelectedIndex());
return weightMapper.getItemAt(weightMapper.getSelectedIndex());
}
return null;
}
......
......@@ -25,10 +25,9 @@ package de.hhu.ba.yoshikoWrapper.swing.components;
import javax.swing.GroupLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.GroupLayout.Alignment;
import org.cytoscape.model.CyColumn;
import de.hhu.ba.yoshikoWrapper.core.LocalizationManager;
import de.hhu.ba.yoshikoWrapper.swing.SwingUtil;
......@@ -40,6 +39,8 @@ public class EditCostPanel extends JPanel {
private final DoubleInputField icField;
private final DoubleInputField dcField;
private final JSeparator separator;
private final JLabel icLabel;
private final JLabel dcLabel;
......@@ -59,15 +60,16 @@ public class EditCostPanel extends JPanel {
icField.setText("-1.0");
icField.setToolTipText(LocalizationManager.get("icTooltip"));
dcField.setText("1.0");
separator = new JSeparator(JSeparator.HORIZONTAL);
icLabel = new JLabel(LocalizationManager.get("defaultInsertion"));
dcLabel = new JLabel(LocalizationManager.get("defaultDeletion"));
//Add components
SwingUtil.addAll(this,icLabel,icField);
SwingUtil.addAll(this,dcLabel,dcField);
SwingUtil.addAll(this,columnMapper,separator,icLabel,icField,dcLabel,dcField);
//SwingUtil.addAll(helpButton);
SwingUtil.addAll(this,columnMapper);
//Layout
......@@ -76,6 +78,7 @@ public class EditCostPanel extends JPanel {
layout.setHorizontalGroup(layout.createParallelGroup()
//.addComponent(helpButton,Alignment.TRAILING)
.addComponent(columnMapper)
.addComponent(separator)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(icLabel)
......@@ -92,6 +95,7 @@ public class EditCostPanel extends JPanel {
layout.setVerticalGroup(layout.createSequentialGroup()
//.addComponent(helpButton)
.addComponent(columnMapper)
.addComponent(separator)
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(icLabel)
.addGap(4)
......@@ -109,17 +113,11 @@ public class EditCostPanel extends JPanel {
}
//SETTER / GETTER
public CyColumn getWeightColumn() {
return columnMapper.getEditingCostColumn();
}
public CyColumn getPermanentColumn() {
return columnMapper.getPermanentColumn();
}
public String getPermanentColumnName() {
return columnMapper.getPermanentColumn() != null ? columnMapper.getPermanentColumn().getName() : null; }
public CyColumn getForbiddenColumn() {
return columnMapper.getForbiddenColumn();
}
public String getForbiddenColumnName() {
return columnMapper.getForbiddenColumn() != null ? columnMapper.getForbiddenColumn().getName() : null; }
public double getDefaultInsertionCost() {
return icField.getValueAsDouble();
......@@ -133,4 +131,8 @@ public class EditCostPanel extends JPanel {
return columnMapper;
}
public String getWeightColumnName() {
return columnMapper.getEditingCostColumn() != null ? columnMapper.getEditingCostColumn().getName() : null;
}
}
......@@ -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();
......
......@@ -209,7 +209,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(about,DEFAULT_SIZE, DEFAULT_SIZE,DEFAULT_SIZE)
)
.addGap(4)
.addGap(8)
.addComponent(showAdvancedOptions,DEFAULT_SIZE, DEFAULT_SIZE,DEFAULT_SIZE)
.addComponent(scrollPane,DEFAULT_SIZE, DEFAULT_SIZE,DEFAULT_SIZE)
.addComponent(runButton,DEFAULT_SIZE, DEFAULT_SIZE,DEFAULT_SIZE)
......@@ -228,7 +228,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
.addComponent(header,DEFAULT_SIZE,DEFAULT_SIZE,PREFERRED_SIZE)
.addComponent(about,Alignment.TRAILING,DEFAULT_SIZE,DEFAULT_SIZE,PREFERRED_SIZE)
)
.addGap(4)
.addGap(8)
.addComponent(showAdvancedOptions,DEFAULT_SIZE,DEFAULT_SIZE,PREFERRED_SIZE)
.addComponent(scrollPane,DEFAULT_SIZE,DEFAULT_SIZE,DEFAULT_SIZE)
.addComponent(runButton,DEFAULT_SIZE,DEFAULT_SIZE,PREFERRED_SIZE)
......@@ -314,7 +314,6 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
if (YoshikoLoader.isLibraryLoaded()){
AbstractTask yoshiko = new AlgorithmTask(
popupLevel,
networkToBeProcessed,
fetchParameters(networkToBeProcessed)
);
/**
......@@ -345,10 +344,11 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
*/
private ParameterSet fetchParameters(CyNetwork net) {
ParameterSet ret = new ParameterSet();
ret.net = net;
ret.timeLimit = opModePanel.getTimeLimit();
ret.weightColumn = ecPanel.getWeightColumn();
ret.permanentColumn = ecPanel.getPermanentColumn();
ret.forbiddenColumn = ecPanel.getForbiddenColumn();
ret.weightColumnName = ecPanel.getWeightColumnName();
ret.permanentColumnName = ecPanel.getPermanentColumnName();
ret.forbiddenColumnName = ecPanel.getForbiddenColumnName();
ret.defaultInsertionCost = ecPanel.getDefaultInsertionCost();
ret.defaultDeletionCost = ecPanel.getDefaultDeletionCost();
ret.useHeuristic = opModePanel.useHeuristic();
......@@ -359,6 +359,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
ret.usePartitionCuts = opModePanel.usePartitionCuts();
ret.solCount = opModePanel.getSolCount();
ret.disableMultiThreading = opModePanel.isMultiThreadingDisabled();
ret.clusterCount = opModePanel.getClusterCount();
return ret;
}
......
......@@ -41,6 +41,8 @@ import javax.swing.GroupLayout.Alignment;
public class OperationModePanel extends JPanel{
//SWING COMPONENTS
private final JCheckBox useClusterCount;
private final ClusterCountChooser ccChooser;
private final JRadioButton useHeuristic;
private final JRadioButton useILP;
private final TimeLimitSetter timeLimitSetter;
......@@ -53,6 +55,12 @@ public class OperationModePanel extends JPanel{
public OperationModePanel() {
useClusterCount = new JCheckBox(LocalizationManager.get("useClusterCount"));
ccChooser = new ClusterCountChooser();
ccChooser.setEnabled(false);
useClusterCount.addActionListener(ccSwitch);
heuristicGroup = new ButtonGroup();
useILP = new JRadioButton("Use Integer Linear Programming");
......@@ -79,6 +87,8 @@ public class OperationModePanel extends JPanel{
useHeuristic.addActionListener(ilpHeuristicSwitch);
SwingUtil.addAll(this,
useClusterCount,
ccChooser,
useHeuristic,
useILP,
solutionNumberChooser,
......@@ -97,6 +107,8 @@ public class OperationModePanel extends JPanel{
layout.setAutoCreateContainerGaps(true);
layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING,true)
.addComponent(useClusterCount, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(ccChooser, DEFAULT_SIZE, DEFAULT_SIZE, DEFAULT_SIZE)
.addComponent(useHeuristic, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(useILP, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(solutionNumberChooser, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE)
......@@ -107,6 +119,8 @@ public class OperationModePanel extends JPanel{
);
layout.setVerticalGroup(layout.createSequentialGroup()
.addComponent(useClusterCount)
.addComponent(ccChooser)
.addComponent(useHeuristic)
.addComponent(useILP)
.addComponent(solutionNumberChooser)
......@@ -137,13 +151,21 @@ public class OperationModePanel extends JPanel{
}
}
ActionListener ilpHeuristicSwitch = new ActionListener() {
private ActionListener ilpHeuristicSwitch = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
ilpHeuristicSwitch();
}