Skip to content

Commit

Permalink
Remove run in server button and listener. Close #18
Browse files Browse the repository at this point in the history
  • Loading branch information
Saitel Daniela Agudelo Sanabria committed Sep 6, 2019
1 parent 6b5f0bb commit 31ff018
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 52 deletions.
60 changes: 32 additions & 28 deletions projects/memapGui/src/main/java/fortiss/controller/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
Expand All @@ -20,7 +19,6 @@
import com.jgoodies.forms.layout.RowSpec;

import fortiss.controller.listener.selectionitem.DaysListener;
import fortiss.controller.listener.selectionitem.RunInServerListener;
import fortiss.controller.listeners.button.AcceptListener;
import fortiss.controller.listeners.button.PriceListener;
import fortiss.controller.listeners.button.WeatherListener;
Expand Down Expand Up @@ -51,8 +49,6 @@ public class Controller extends JFrame {
public JLabel lbOptCriteria2; // Optimization criteria icon
public JLabel lbMemap2;
public JComboBox<Integer> sDays;

private JCheckBox chckbxRunInServer;
private JLabel lbTitle;
private JLabel lbLength;
private JLabel lbSteps;
Expand Down Expand Up @@ -93,8 +89,6 @@ public void paint(Graphics g) {
btFixed.setForeground(Colors.normal);
btVolatile.setBackground(Colors.background);
btVolatile.setForeground(Colors.normal);
chckbxRunInServer.setBackground(Colors.background);
chckbxRunInServer.setForeground(Colors.normal);
lbTitle.setForeground(Colors.title);
lbLength.setForeground(Colors.normal);
lbSteps.setForeground(Colors.normal);
Expand Down Expand Up @@ -123,31 +117,45 @@ public Controller() {
*/
private void initialize() {
// Sets frame properties
setSize(new Dimension(377, 404));
setSize(new Dimension(377, 370));
setLocationRelativeTo(null);
setType(Type.POPUP);
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
setPreferredSize(new Dimension(325, 325));
setTitle("MEMAP - Parameter input");
setName("fController");
setIconImage(Icon.smallMemapLogo.getImage());
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
getContentPane()
.setLayout(new FormLayout(
new ColumnSpec[] { ColumnSpec.decode("20dlu:grow"), FormSpecs.DEFAULT_COLSPEC,
ColumnSpec.decode("15dlu"), ColumnSpec
.decode("50dlu:grow"),
FormSpecs.RELATED_GAP_COLSPEC, ColumnSpec.decode("max(33dlu;default)"),
ColumnSpec.decode("20dlu:grow"), },
new RowSpec[] { RowSpec.decode("5dlu:grow"), FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC, FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("14dlu"), FormSpecs.RELATED_GAP_ROWSPEC,
RowSpec.decode("14dlu"), FormSpecs.UNRELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC,
RowSpec.decode("default:grow"), }));
.setLayout(new FormLayout(new ColumnSpec[] {
ColumnSpec.decode("20dlu:grow"),
FormSpecs.DEFAULT_COLSPEC,
ColumnSpec.decode("15dlu"),
ColumnSpec.decode("50dlu:grow"),
FormSpecs.RELATED_GAP_COLSPEC,
ColumnSpec.decode("max(33dlu;default)"),
ColumnSpec.decode("20dlu:grow"),},
new RowSpec[] {
RowSpec.decode("5dlu:grow"),
FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC,
RowSpec.decode("14dlu"),
FormSpecs.RELATED_GAP_ROWSPEC,
RowSpec.decode("14dlu"),
FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC,
RowSpec.decode("default:grow"),}));

lbTitle = new JLabel("Memap Simulation parameters");
lbTitle.setFont(Fonts.getOswald());
Expand Down Expand Up @@ -233,11 +241,7 @@ private void initialize() {
lbOptCriteria2.addMouseListener(new OptimizationCriteriaListener());
getContentPane().add(lbOptCriteria2, "4, 18");

chckbxRunInServer = new JCheckBox("Run simulation on MEMAP server");
chckbxRunInServer.addItemListener(new RunInServerListener());
getContentPane().add(chckbxRunInServer, "2, 20, 3, 1");

getContentPane().add(btAccept, "2, 22, 5, 1, center, center");
getContentPane().add(btAccept, "2, 20, 5, 1, center, center");

}

Expand Down

This file was deleted.

0 comments on commit 31ff018

Please sign in to comment.