private void commitChanges(){
  try {
    double floorVal=Double.parseDouble(floor.getText());
    double ceilingVal=Double.parseDouble(ceiling.getText());
    double decAmount=Double.parseDouble(decrementAmount.getText());
    double incAmount=Double.parseDouble(incrementAmount.getText());
    if (!betweenZeroAndOne("Floor",floorVal)) {
      return;
    }
    if (!betweenZeroAndOne("Ceiling",ceilingVal)) {
      return;
    }
    if (!betweenZeroAndOne("Decrement Amount",decAmount)) {
      return;
    }
    if (!betweenZeroAndOne("Increment Amount",incAmount)) {
      return;
    }
    if (hotPointCheckBox.isSelected()) {
      colorManager.setHotPointMode(true);
      colorManager.setHotColor(hotColor);
    }
 else {
      colorManager.setHotPointMode(false);
    }
    if (coloringMethod.getSelectedItem() == "None") {
      colorManager.setColoringMethod("None");
      colorManager.setBaseColor(baseColor);
    }
    if (coloringMethod.getSelectedItem() == "DecayTrail") {
      colorManager.setColoringMethod("DecayTrail");
      colorManager.setBaseColor(baseColor);
      colorManager.setDecrementAmount(decAmount);
      colorManager.setCeiling(ceilingVal);
      colorManager.setFloor(floorVal);
    }
    if (coloringMethod.getSelectedItem() == "Frequency") {
      colorManager.setColoringMethod("Frequency");
      colorManager.setBaseColor(baseColor);
      colorManager.setIncrementAmount(incAmount);
      colorManager.setCeiling(ceilingVal);
    }
  }
 catch (  NumberFormatException nfe) {
    JOptionPane.showMessageDialog(null,"Non-numeric field values:" + "\nNetwork construction failed.","Error",JOptionPane.ERROR_MESSAGE);
    nfe.printStackTrace();
  }
}

private void commitChanges ( ) { try { double floorVal = Double . parseDouble ( floor . getText ( ) ) ; double ceilingVal = Double . parseDouble ( ceiling . getText ( ) ) ; double decAmount = Double . parseDouble ( decrementAmount . getText ( ) ) ; double incAmount = Double . parseDouble ( incrementAmount . getText ( ) ) ; if ( ! betweenZeroAndOne ( "Floor" , floorVal ) ) { return ; } if ( ! betweenZeroAndOne ( "Ceiling" , ceilingVal ) ) { return ; } if ( ! betweenZeroAndOne ( "Decrement Amount" , decAmount ) ) { return ; } if ( ! betweenZeroAndOne ( "Increment Amount" , incAmount ) ) { return ; } if ( hotPointCheckBox . isSelected ( ) ) { colorManager . setHotPointMode ( true ) ; colorManager . setHotColor ( hotColor ) ; } else { colorManager . setHotPointMode ( false ) ; } if ( coloringMethod . getSelectedItem ( ) == "None" ) { colorManager . setColoringMethod ( "None" ) ; colorManager . setBaseColor ( baseColor ) ; } if ( coloringMethod . getSelectedItem ( ) == "DecayTrail" ) { colorManager . setColoringMethod ( "DecayTrail" ) ; colorManager . setBaseColor ( baseColor ) ; colorManager . setDecrementAmount ( decAmount ) ; colorManager . setCeiling ( ceilingVal ) ; colorManager . setFloor ( floorVal ) ; } if ( coloringMethod . getSelectedItem ( ) == "Frequency" ) { colorManager . setColoringMethod ( "Frequency" ) ; colorManager . setBaseColor ( baseColor ) ; colorManager . setIncrementAmount ( incAmount ) ; colorManager . setCeiling ( ceilingVal ) ; } } catch ( NumberFormatException nfe ) { JOptionPane . showMessageDialog ( null , "Non-numeric field values:" + "\nNetwork construction failed." , "Error" , JOptionPane . ERROR_MESSAGE ) ; nfe . printStackTrace ( ) ; } }
commit changes to coloringmanager based on selected coloring method .
