simulator.views
Class SimulationOptionsDlg

java.lang.Object
  extended by simulator.views.SimulationOptionsDlg

public class SimulationOptionsDlg
extends java.lang.Object

This window is used to get the SimulationOptions for a simulation from the user.

Author:
Leo Bosnjak

Field Summary
private  javax.swing.JButton jButtonCancel
           
private  javax.swing.JButton jButtonOK
           
private  javax.swing.JCheckBox jCheckBox
           
private  javax.swing.JCheckBox jCheckBox1
           
private  javax.swing.JCheckBox jCheckBox2
           
private  javax.swing.JCheckBox jCheckBox3
           
private  javax.swing.JCheckBox jCheckBox4
           
private  javax.swing.JCheckBox jCheckBox5
           
private  javax.swing.JPanel jContentPane
           
private  javax.swing.JDialog jDialog
           
private  javax.swing.JLabel jLabel
           
private  javax.swing.JLabel jLabel1
           
private  javax.swing.JPanel jPanelOKCancel
           
private  javax.swing.JTextField jTextField
           
private  boolean okPressed
           
 
Constructor Summary
SimulationOptionsDlg()
           
 
Method Summary
 boolean askUserForSimOptions(javax.swing.JFrame parent, ScenarioConfig scenarioConfig, SimulationOptions optionsIn, SimulationOptions optionsOut)
          Asks the user for some options that are required to execute a simulation.
private  javax.swing.JButton getJButtonCancel()
          This method initializes jButtonCancel
private  javax.swing.JButton getJButtonOK()
          This method initializes jButtonOK
private  javax.swing.JCheckBox getJCheckBox()
          This method initializes jCheckBox
private  javax.swing.JCheckBox getJCheckBox1()
          This method initializes jCheckBox1
private  javax.swing.JCheckBox getJCheckBox2()
          This method initializes jCheckBox2
private  javax.swing.JCheckBox getJCheckBox3()
          This method initializes jCheckBox3
private  javax.swing.JCheckBox getJCheckBox4()
          This method initializes jCheckBox4
private  javax.swing.JCheckBox getJCheckBox5()
          This method initializes jCheckBox5
private  javax.swing.JPanel getJContentPane()
          This method initializes jContentPane
private  javax.swing.JDialog getJDialog()
          This method initializes jFrame
private  javax.swing.JPanel getJPanelOKCancel()
          This method initializes jPanelOKCancel
private  javax.swing.JTextField getJTextField()
          This method initializes jTextField
 boolean isOkPressed()
           
 boolean performOperations(javax.swing.JFrame parent, ScenarioConfig scenarioConfig, PlanetLabMgr planetLabApi, PlanetLabXmlRpcCaller planetSh, NodeEdgeMap map, Simulator sim, SimulationOptions options)
          Performs the operations needed before a simulation can be started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jDialog

private javax.swing.JDialog jDialog

jContentPane

private javax.swing.JPanel jContentPane

jLabel

private javax.swing.JLabel jLabel

jCheckBox

private javax.swing.JCheckBox jCheckBox

jCheckBox1

private javax.swing.JCheckBox jCheckBox1

jCheckBox2

private javax.swing.JCheckBox jCheckBox2

jCheckBox3

private javax.swing.JCheckBox jCheckBox3

jCheckBox4

private javax.swing.JCheckBox jCheckBox4

jCheckBox5

private javax.swing.JCheckBox jCheckBox5

jLabel1

private javax.swing.JLabel jLabel1

jTextField

private javax.swing.JTextField jTextField

jPanelOKCancel

private javax.swing.JPanel jPanelOKCancel

jButtonOK

private javax.swing.JButton jButtonOK

jButtonCancel

private javax.swing.JButton jButtonCancel

okPressed

private boolean okPressed
Constructor Detail

SimulationOptionsDlg

public SimulationOptionsDlg()
Method Detail

getJDialog

private javax.swing.JDialog getJDialog()
This method initializes jFrame

Returns:
javax.swing.JFrame

getJContentPane

private javax.swing.JPanel getJContentPane()
This method initializes jContentPane

Returns:
javax.swing.JPanel

getJCheckBox

private javax.swing.JCheckBox getJCheckBox()
This method initializes jCheckBox

Returns:
javax.swing.JCheckBox

getJCheckBox1

private javax.swing.JCheckBox getJCheckBox1()
This method initializes jCheckBox1

Returns:
javax.swing.JCheckBox

getJCheckBox2

private javax.swing.JCheckBox getJCheckBox2()
This method initializes jCheckBox2

Returns:
javax.swing.JCheckBox

getJCheckBox3

private javax.swing.JCheckBox getJCheckBox3()
This method initializes jCheckBox3

Returns:
javax.swing.JCheckBox

getJCheckBox4

private javax.swing.JCheckBox getJCheckBox4()
This method initializes jCheckBox4

Returns:
javax.swing.JCheckBox

getJCheckBox5

private javax.swing.JCheckBox getJCheckBox5()
This method initializes jCheckBox5

Returns:
javax.swing.JCheckBox

getJTextField

private javax.swing.JTextField getJTextField()
This method initializes jTextField

Returns:
javax.swing.JTextField

getJPanelOKCancel

private javax.swing.JPanel getJPanelOKCancel()
This method initializes jPanelOKCancel

Returns:
javax.swing.JPanel

getJButtonOK

private javax.swing.JButton getJButtonOK()
This method initializes jButtonOK

Returns:
javax.swing.JButton

getJButtonCancel

private javax.swing.JButton getJButtonCancel()
This method initializes jButtonCancel

Returns:
javax.swing.JButton

isOkPressed

public boolean isOkPressed()
Returns:
the okPressed

askUserForSimOptions

public boolean askUserForSimOptions(javax.swing.JFrame parent,
                                    ScenarioConfig scenarioConfig,
                                    SimulationOptions optionsIn,
                                    SimulationOptions optionsOut)
Asks the user for some options that are required to execute a simulation.

Parameters:
parent -
scenarioConfig -
optionsIn -
optionsOut -
Returns:
true - if successful, false - if user canceled the operation

performOperations

public boolean performOperations(javax.swing.JFrame parent,
                                 ScenarioConfig scenarioConfig,
                                 PlanetLabMgr planetLabApi,
                                 PlanetLabXmlRpcCaller planetSh,
                                 NodeEdgeMap map,
                                 Simulator sim,
                                 SimulationOptions options)
Performs the operations needed before a simulation can be started.

Parameters:
parent -
scenarioConfig -
planetLabApi -
planetSh -
sim -
options - - tells which operations should be performed
Returns:
true - if successful. false - if there was an error during execution of an an operation.