Commit 26552aa1 authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Workaround for CyColumn being not tunable (as of now, Cyto 3.7 maybe?)

parent a49f59eb
...@@ -14,7 +14,7 @@ public class ParameterSet implements TunableValidator ...@@ -14,7 +14,7 @@ public class ParameterSet implements TunableValidator
public int timeLimit = -1; public int timeLimit = -1;
@Tunable(description="A column in the edge table containing weights", context="nogui") @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") @Tunable(description="A column containing boolean entries for edges that are to be treated as permanent",context="nogui")
public CyColumn permanentColumn; public CyColumn permanentColumn;
@Tunable(description="A column containing boolean entries for edges that are to be treated as forbidden",context="nogui") @Tunable(description="A column containing boolean entries for edges that are to be treated as forbidden",context="nogui")
......
...@@ -346,7 +346,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent { ...@@ -346,7 +346,7 @@ public class MainPanel extends JPanel implements CytoPanelComponent {
private ParameterSet fetchParameters(CyNetwork net) { private ParameterSet fetchParameters(CyNetwork net) {
ParameterSet ret = new ParameterSet(); ParameterSet ret = new ParameterSet();
ret.timeLimit = opModePanel.getTimeLimit(); ret.timeLimit = opModePanel.getTimeLimit();
ret.weightColumn = ecPanel.getWeightColumn(); ret.weightColumnName = ecPanel.getWeightColumn().getName();
ret.permanentColumn = ecPanel.getPermanentColumn(); ret.permanentColumn = ecPanel.getPermanentColumn();
ret.forbiddenColumn = ecPanel.getForbiddenColumn(); ret.forbiddenColumn = ecPanel.getForbiddenColumn();
ret.defaultInsertionCost = ecPanel.getDefaultInsertionCost(); ret.defaultInsertionCost = ecPanel.getDefaultInsertionCost();
......
...@@ -226,6 +226,9 @@ public class SolutionTab extends JPanel { ...@@ -226,6 +226,9 @@ public class SolutionTab extends JPanel {
this.setLayout(layout); this.setLayout(layout);
} }
/**
* Simply disables the CCV and CMG graph to visually highlight the fact that those tasks are no longer possible
*/
public void invalidateResult() { public void invalidateResult() {
createClusterView.setEnabled(false); createClusterView.setEnabled(false);
createMetaGraph.setEnabled(false); createMetaGraph.setEnabled(false);
......
...@@ -138,7 +138,7 @@ public class AlgorithmTask extends AbstractTask implements ObservableTask { ...@@ -138,7 +138,7 @@ public class AlgorithmTask extends AbstractTask implements ObservableTask {
c_input = NetworkParser.parseNetwork( c_input = NetworkParser.parseNetwork(
net, net,
nodeMap, nodeMap,
parameterSet.weightColumn, net.getDefaultEdgeTable().getColumn(parameterSet.weightColumnName),
parameterSet.permanentColumn, parameterSet.permanentColumn,
parameterSet.forbiddenColumn, parameterSet.forbiddenColumn,
parameterSet.defaultDeletionCost parameterSet.defaultDeletionCost
...@@ -147,7 +147,7 @@ public class AlgorithmTask extends AbstractTask implements ObservableTask { ...@@ -147,7 +147,7 @@ public class AlgorithmTask extends AbstractTask implements ObservableTask {
boolean containsRealValues = GraphAnalyzer.containsRealValues( boolean containsRealValues = GraphAnalyzer.containsRealValues(
net, net,
parameterSet.weightColumn, net.getDefaultEdgeTable().getColumn(parameterSet.weightColumnName),
parameterSet.permanentColumn, parameterSet.permanentColumn,
parameterSet.forbiddenColumn, parameterSet.forbiddenColumn,
parameterSet.defaultInsertionCost, parameterSet.defaultInsertionCost,
......
...@@ -20,6 +20,8 @@ import de.hhu.ba.yoshikoWrapper.cytoUtil.StyleManager; ...@@ -20,6 +20,8 @@ import de.hhu.ba.yoshikoWrapper.cytoUtil.StyleManager;
import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoCluster; import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoCluster;
import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoSolution; import de.hhu.ba.yoshikoWrapper.graphModel.YoshikoSolution;
//TODO: Should also not be possible / throw an exception if the result was invalidated (might currently just be disabled via GUI)
public class CreateMetaGraphTask extends AbstractTask{ public class CreateMetaGraphTask extends AbstractTask{
private final YoshikoSolution solution; private final YoshikoSolution solution;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment