private void addSetTerrain(){
  ITerrain toAdd=enteredTerrain();
  if (((toAdd.getType() == Terrains.BLDG_ELEV) || (toAdd.getType() == Terrains.BRIDGE_ELEV)) && toAdd.getLevel() < 0) {
    JOptionPane.showMessageDialog(frame,Messages.getString("BoardEditor.BridgeBuildingElevError"),Messages.getString("BoardEditor.invalidTerrainTitle"),JOptionPane.ERROR_MESSAGE);
    return;
  }
  curHex.addTerrain(toAdd);
  refreshTerrainList();
  repaintWorkingHex();
}

private void addSetTerrain ( ) { ITerrain toAdd = enteredTerrain ( ) ; if ( ( ( toAdd . getType ( ) == Terrains . BLDG_ELEV ) || ( toAdd . getType ( ) == Terrains . BRIDGE_ELEV ) ) && toAdd . getLevel ( ) < 0 ) { JOptionPane . showMessageDialog ( frame , Messages . getString ( "BoardEditor.BridgeBuildingElevError" ) , Messages . getString ( "BoardEditor.invalidTerrainTitle" ) , JOptionPane . ERROR_MESSAGE ) ; return ; } curHex . addTerrain ( toAdd ) ; refreshTerrainList ( ) ; repaintWorkingHex ( ) ; }
add or set the terrain to the list based on the fields .
