insensa.view.dialogs.options
Class SetVariableBreaksSettings

java.lang.Object
  extended by insensa.view.dialogs.options.SetVariableBreaksSettings
All Implemented Interfaces:
IViewOptionSetting

public class SetVariableBreaksSettings
extends java.lang.Object
implements IViewOptionSetting


Field Summary
private  OptionFileChanger option
           
private  CView view
           
 
Constructor Summary
SetVariableBreaksSettings()
           
 
Method Summary
 void setModel(CModel model)
          Sets the CModel instance.
 void setOption(OptionFileChanger option)
          sets the OptionFileChanger.
 void setParentFrame(java.awt.Frame parent)
          Sets the Parent Frame.
 void setView(CView view)
          Sets the active CView instance.
 void startView()
          This method should define the insensa.view and activate it

Example:
In case of using the abstract class AbstractViewOptionSetting:
Check that the variables are set correctly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

option

private OptionFileChanger option

view

private CView view
Constructor Detail

SetVariableBreaksSettings

public SetVariableBreaksSettings()
Method Detail

setModel

public void setModel(CModel model)
Description copied from interface: IViewOptionSetting
Sets the CModel instance.

Specified by:
setModel in interface IViewOptionSetting
Parameters:
model - active model instance
See Also:
IViewOptionSetting.setModel(insensa.CModel)

setOption

public void setOption(OptionFileChanger option)
               throws java.io.IOException
Description copied from interface: IViewOptionSetting
sets the OptionFileChanger.

Specified by:
setOption in interface IViewOptionSetting
Parameters:
option - active OptionFileChanger
Throws:
java.io.IOException
See Also:
IViewOptionSetting.setOption(insensa.optionfilechanger.OptionFileChanger)

setParentFrame

public void setParentFrame(java.awt.Frame parent)
Description copied from interface: IViewOptionSetting
Sets the Parent Frame.

Specified by:
setParentFrame in interface IViewOptionSetting
Parameters:
parent - parent frame from which this method is executed
See Also:
IViewOptionSetting.setParentFrame(java.awt.Frame)

setView

public void setView(CView view)
Description copied from interface: IViewOptionSetting
Sets the active CView instance.

Specified by:
setView in interface IViewOptionSetting
See Also:
IViewOptionSetting.setView(insensa.view.CView)

startView

public void startView()
               throws java.io.IOException
Description copied from interface: IViewOptionSetting
This method should define the insensa.view and activate it

Example:
In case of using the abstract class AbstractViewOptionSetting:
Check that the variables are set correctly.
 if(option==null)
 throw new IOException("OptionFileChanger not set");
 if(!(option instanceof MyOptionClass))
 throw new IOException("option is not of type MyOptionClass");
 

Specified by:
startView in interface IViewOptionSetting
Throws:
java.io.IOException - SettingsDialog.initComponents(javax.swing.JPanel) creates a standard JDialog, you just have to create a JPanel with the required Components.
 initComponents(myJPanel);
 
the last important steps are to add a Listener for the Ok button and start the insensa.view
 getButtonOk().addActionListener(new OKButtonActionListener());
 this.setVisible(true);
 
See Also:
IViewOptionSetting.startView()