src/pendulum/view/ExperimentLayoutController.java
/**
     * Private method responsible for loading data and updating fields related
     * to pendulum.
     *
     * @param properties the object that will be read
     */
Private method responsible for loading data and updating fields related
to pendulum.

@param properties the object that will be read
Private method responsible for loading data and updating fields related to pendulum . @param properties the object that will be read
@SuppressWarnings ("UnnecessaryReturnStatement")
    private void restoreProperties (Properties properties)
    {
	double stringLengthValue = Double.parseDouble (properties.getProperty ("length"));
	double gravityAccelerationValue = Double.parseDouble (properties.getProperty ("acceleration"));
	double angleValue = Double.parseDouble (properties.getProperty ("angle"));
	double massValue = Double.parseDouble (properties.getProperty ("mass"));
	stringLengthTextField.setText (String.format ("%.2f", stringLengthValue));
	gravityAccelerationTextField.setText (String.format ("%.2f", gravityAccelerationValue));
	angleTextField.setText (String.format ("%.2f", angleValue));
	massTextField.setText (String.format ("%.2f", massValue));
	stringLengthSlider.valueProperty ().set (stringLengthValue);
	gravityAccelerationSlider.valueProperty ().set (gravityAccelerationValue);
	angleSlider.valueProperty ().set (angleValue);
	massSlider.valueProperty ().set (massValue);
	view.getController ().getModel ().setStringLength (stringLengthValue);
	view.getController ().getModel ().setGravityAcceleration (gravityAccelerationValue);
	view.getController ().getModel ().setAngle (angleValue);
	view.getController ().getModel ().setMass (massValue);
	return;
    }
@ SuppressWarnings ( "UnnecessaryReturnStatement" ) private void restoreProperties ( Properties properties ) { double stringLengthValue = Double . parseDouble ( properties . getProperty ( "length" ) ) ; double gravityAccelerationValue = Double . parseDouble ( properties . getProperty ( "acceleration" ) ) ; double angleValue = Double . parseDouble ( properties . getProperty ( "angle" ) ) ; double massValue = Double . parseDouble ( properties . getProperty ( "mass" ) ) ; stringLengthTextField . setText ( String . format ( "%.2f" , stringLengthValue ) ) ; gravityAccelerationTextField . setText ( String . format ( "%.2f" , gravityAccelerationValue ) ) ; angleTextField . setText ( String . format ( "%.2f" , angleValue ) ) ; massTextField . setText ( String . format ( "%.2f" , massValue ) ) ; stringLengthSlider . valueProperty ( ) . set ( stringLengthValue ) ; gravityAccelerationSlider . valueProperty ( ) . set ( gravityAccelerationValue ) ; angleSlider . valueProperty ( ) . set ( angleValue ) ; massSlider . valueProperty ( ) . set ( massValue ) ; view . getController ( ) . getModel ( ) . setStringLength ( stringLengthValue ) ; view . getController ( ) . getModel ( ) . setGravityAcceleration ( gravityAccelerationValue ) ; view . getController ( ) . getModel ( ) . setAngle ( angleValue ) ; view . getController ( ) . getModel ( ) . setMass ( massValue ) ; return ; }
Private method responsible for loading data and updating fields related
 to pendulum.
Private method responsible for loading data and updating fields related to pendulum .
// Update TextFields // In fact, no need to update the textfields since sliders are bound to them they will update automatically. // Update Sliders // Update Model