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

minor stuff, codestyle

parent 3cfe5eaf
No related branches found
No related tags found
No related merge requests found
......@@ -35,11 +35,18 @@ import org.cytoscape.work.util.ListSingleSelection;
public class ParameterSet implements TunableValidator
{
//GLOBAL ACCESSIBLE DEFAULT VALUES FOR REFERENCE
public static final int DEFAULT_VALUE_TIME_LIMIT = -1;
public static final int DEFAULT_VALUE_TIME_LIMIT_IF_USED = 30;
public static final double DEFAULT_INSERTION_COST = -1.0;
public static final double DEFAULT_DELETION_COST = 1.0;
@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;
public int timeLimit = DEFAULT_VALUE_TIME_LIMIT;
//COLUMN-MAPPINGS
......@@ -51,9 +58,9 @@ public class ParameterSet implements TunableValidator
public ListSingleSelection<CyColumn> forbiddenColumn = null;
@Tunable(description="The default insertion cost that is to be used for non-existing edges",context="nogui")
public double defaultInsertionCost = -1;
public double defaultInsertionCost = DEFAULT_INSERTION_COST;
@Tunable(description="The default deletion cost that is to be used for edges without an associated weight",context="nogui")
public double defaultDeletionCost = 1;
public double defaultDeletionCost = DEFAULT_DELETION_COST;
@Tunable(description="A bitmask representing which reduction rules should be used",context="nogui")
public String reductionRulesBitMask = "000000";
......@@ -72,7 +79,7 @@ public class ParameterSet implements TunableValidator
public int solCount = 1;
@Tunable(description="Disable multithreading to keep the system responsive",context="nogui")
public boolean disableMultiThreading;
public boolean disableMultiThreading = false;
@Tunable(description="Automatically choose an appopriate set of reduction rules (overrides a given bitmask)",context="nogui")
/**Describes whether auto configuration of the reduction rules is to be used. Overrides the bit mask.**/
......
/*******************************************************************************
* Copyright (C) 2017 Philipp Spohr
* Copyright (C) 2018 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
......@@ -32,11 +32,14 @@ import org.cytoscape.model.CyColumn;
import javax.swing.GroupLayout.Alignment;
import de.hhu.ba.yoshikoWrapper.core.LocalizationManager;
import de.hhu.ba.yoshikoWrapper.core.ParameterSet;
import de.hhu.ba.yoshikoWrapper.swing.SwingUtil;
@SuppressWarnings("serial") //Will never be serialized
public class EditCostPanel extends JPanel {
private static final int GAP_SIZE_EC_PANEL = 4;
//SWING COMPONENTS
private final ColumnMapper columnMapper;
......@@ -60,9 +63,9 @@ public class EditCostPanel extends JPanel {
icField = new DoubleInputField(Double.NEGATIVE_INFINITY,0);
dcField = new DoubleInputField(0,Double.POSITIVE_INFINITY);
icField.setText("-1.0");
icField.setText(""+ParameterSet.DEFAULT_INSERTION_COST);
icField.setToolTipText(LocalizationManager.get("icTooltip"));
dcField.setText("1.0");
dcField.setText(""+ParameterSet.DEFAULT_DELETION_COST);
separator = new JSeparator(JSeparator.HORIZONTAL);
......@@ -87,7 +90,7 @@ public class EditCostPanel extends JPanel {
.addComponent(icLabel)
.addComponent(dcLabel)
)
.addGap(4)
.addGap(GAP_SIZE_EC_PANEL)
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(icField)
.addComponent(dcField)
......@@ -101,12 +104,12 @@ public class EditCostPanel extends JPanel {
.addComponent(separator)
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(icLabel)
.addGap(4)
.addGap(GAP_SIZE_EC_PANEL)
.addComponent(icField)
)
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(dcLabel)
.addGap(4)
.addGap(GAP_SIZE_EC_PANEL)
.addComponent(dcField)
)
);
......
/*******************************************************************************
* Copyright (C) 2017 Philipp Spohr
* Copyright (C) 2018 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
......@@ -29,6 +29,7 @@ import javax.swing.JCheckBox;
import javax.swing.JPanel;
import de.hhu.ba.yoshikoWrapper.core.LocalizationManager;
import de.hhu.ba.yoshikoWrapper.core.ParameterSet;
import de.hhu.ba.yoshikoWrapper.swing.SwingUtil;
@SuppressWarnings("serial")
......@@ -41,7 +42,7 @@ public class TimeLimitSetter extends JPanel{
this.setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
checkBox = new JCheckBox(LocalizationManager.get("timeLimitILP"));
numberField = new IntegerInputField();
numberField.setText("30");
numberField.setText(""+ParameterSet.DEFAULT_VALUE_TIME_LIMIT_IF_USED);
checkBox.addActionListener(
new ActionListener() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment